1 of 1 people found this helpful
Here is an example:
And Demian's blog explain a little bit more about how to use this feature:
Thanks Mauricio for your reply, I followed the blog and added those onEntry and onExit entries in the bpmn xml. I was trying to retrieve the taskID from the workItemID using the following codes.
long workItemId = ((org.jbpm.workflow.instance.node.WorkItemNodeInstance)kcontext.getNodeInstance()).getWorkItem());
I am able to retrieve the workItemId only on the onExit actionscript and not in the onEntry script. From the logger, i understand that the Task is created only after the onEntry script runs. I am still worried how i can send an email with the link pointing to the TaskID. Is there any alternative way of accomplishing this?
do you have a solution for that? I would like to send a notification in the onEntryAction with the taskId too. But actually I don't know how to get it.
WorkItemNodeInstance.getWorkItemId() returns -1, because the item isn't created in onEntryAction.