0
votes

I advancing learning about JBPM 5 and Drools flows. I have successfully setup a User Registration process and managed to run it as a web application. The process looks is shown below

You can check out the screenshot here [http://i.stack.imgur.com/y7JZ1.png]

What i want to do right now is, before reaching the User Task node where the user verifies his email, i need to send him a link in the Email task. The link must take the User TaskID (primary key), so that when the user clicks on the link, i can complete the task using the TaskID supplied in the URL.

My worry now is, the User task node is reached only after the email is sent. Therefore the Task is not yet created in the database. Is there any alternative way of doing this.

Or

If i can send a mail after reaching the User task, how can i get the primary key of the User Task??

Please help.

1

1 Answers

0
votes

You should try with the onExit and onEntry extensions attached to the User Task node and remove the Email node. In that way as soon as the process reaches the Task Node you can get the work Item Id (something like the nodeId) that you can use to query the Human Task component to find the task associated with that node to complete it.

Cheers