Class MockDataWorkItemHandler
java.lang.Object
org.jbpm.process.instance.impl.demo.MockDataWorkItemHandler
- All Implemented Interfaces:
KogitoWorkItemHandler
Simple work item handler that allows to provide output data or supplier
that can provide data based on supplied function. It can reason on top
of provided input data.
-
Constructor Summary
ConstructorsConstructorDescriptionCreate handler with custom function that will supply output data.MockDataWorkItemHandler(Map<String, Object> outputData) Create handler that will always complete work items with exact same map of data. -
Method Summary
Modifier and TypeMethodDescriptionvoidabortWorkItem(KogitoWorkItem workItem, KogitoWorkItemManager manager) voidexecuteWorkItem(KogitoWorkItem workItem, KogitoWorkItemManager manager) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.kie.kogito.internal.process.runtime.KogitoWorkItemHandler
getName, transitionToPhase
-
Constructor Details
-
MockDataWorkItemHandler
Create handler that will always complete work items with exact same map of data.- Parameters:
outputData- data to be used when completing work items
-
MockDataWorkItemHandler
Create handler with custom function that will supply output data. It can use input data to change the output data returned if needed.- Parameters:
outputDataSupplier- function responsible to provide output data
-
-
Method Details
-
executeWorkItem
- Specified by:
executeWorkItemin interfaceKogitoWorkItemHandler
-
abortWorkItem
- Specified by:
abortWorkItemin interfaceKogitoWorkItemHandler
-