public class MockDataWorkItemHandler extends Object implements org.kie.api.runtime.process.WorkItemHandler
Constructor and Description |
---|
MockDataWorkItemHandler(Function<Map<String,Object>,Map<String,Object>> outputDataSupplier)
Create 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.
|
Modifier and Type | Method and Description |
---|---|
void |
abortWorkItem(org.kie.api.runtime.process.WorkItem workItem,
org.kie.api.runtime.process.WorkItemManager manager) |
void |
executeWorkItem(org.kie.api.runtime.process.WorkItem workItem,
org.kie.api.runtime.process.WorkItemManager manager) |
public MockDataWorkItemHandler(Map<String,Object> outputData)
outputData
- data to be used when completing work itemspublic MockDataWorkItemHandler(Function<Map<String,Object>,Map<String,Object>> outputDataSupplier)
outputDataSupplier
- function responsible to provide output datapublic void executeWorkItem(org.kie.api.runtime.process.WorkItem workItem, org.kie.api.runtime.process.WorkItemManager manager)
executeWorkItem
in interface org.kie.api.runtime.process.WorkItemHandler
public void abortWorkItem(org.kie.api.runtime.process.WorkItem workItem, org.kie.api.runtime.process.WorkItemManager manager)
abortWorkItem
in interface org.kie.api.runtime.process.WorkItemHandler
Copyright © 2001–2019 JBoss by Red Hat. All rights reserved.