Petals-SE-Flowable 1.0.0+

compared with
Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (5)

View Page History
We don't discuss how to use the Flowable JUnit framework but how to integrate it into a service unit project.

We provided a JUnit framework inherited from the Flowable one that add several utility methods to simplify checks about our process. These methods are available as member methods of {{PetalsFlowableRule}}:
* awaiting methods ({{wait...}}) as '{{waitEndOfProcessInstance}}' to wait the end of a process instance.
* assertion methods ({{assert...}}) as '{{assertProcessInstanceFinished}}' to check that your process instance is ended.
See the class {{PetalsFlowableRule}} to get the list of methods.

First, you must embedd an Flowable engine for your test, adding an dependency on it with scope {{test}} into your POM file. Don't forget to add also the JDBC driver, H2 for example, and the Petals JUnit Flowable framework:
{code:xml}
<project>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.ow2.petals</groupId>
<artifactId>petals-se-flowable-junit</artifactId>
<version>1.0.0</version>
<scope>test</scope>
</dependency>
...
</dependencies>
{code}

So, with this, you will be able to test the deployment of your process definition and check process instance creations using the Petals Flowable JUnit framework:
{code:java}
public class ProcessDeploymentTest {

@Rule
public final PetalsFlowableRule flowableRule = new PetalsFlowableRule();

@Test