Class FlowableWorkObjectRule

java.lang.Object
com.flowable.workobject.engine.test.FlowableWorkObjectRule
All Implemented Interfaces:
org.junit.rules.TestRule

public class FlowableWorkObjectRule
extends java.lang.Object
implements org.junit.rules.TestRule
Convenience for WorkObjectEngine and services initialization in the form of a JUnit rule.

Usage:

 public class YourTest {
 
   @Rule
   public FlowableWorkObjectRule flowableWorkObjectRule = new FlowableWorkObjectRule();
   
   ...
 }
 

The WorkObjectEngine and the services will be made available to the test class through the getters of the FlowableRule. The WorkObjectEngine will be initialized by default with the flowable.workobject.cfg.xml resource on the classpath. To specify a different configuration file, pass the resource location in the appropriate constructor. Work object engines will be cached statically. Right before the first time the setUp is called for a given configuration resource, the work object engine will be constructed.

You can declare a deployment with the WorkObjectDeploymentAnnotation annotation. This base class will make sure that this deployment gets deployed before the setUp and cascade deleted after the tearDown.

Author:
Tijs Rademakers