JBoss Community

Re: Result Mapping for ServiceTask in CustomWorkItemEditor

created by Chris Melas in jBPM - View the full discussion

Hi,

If i understood correctly, you can return results from your custom work item by passing your parameters to the

completeWorkItem(WorkItem workItem, WorkItemManager manager, Map<String, Object> results) method of WorkItemManager object

i.e.

 

Map<String, Object> results;

results.put("result", resultObject); results.put("error",errorObject);

manager.completeWorkItem(workItem.getId(), results);

or even better from the StatefulKnowledgeSession object via

ksession.getWorkItemManager().completeWorkItem(....) .

 

Then you can assign the result mapping i.e from editors.

Reply to this message by going to Community

Start a new discussion in jBPM at Community