RSS

Tag Archives: jbpm5

Drools and jBPM5 Open Training @London – August 8th/9th

Hi everyone,

Plugtree is going to organize an open training session, that will focus in Drools Expert and jBPM5, and also covering Drools Fusion. It is open to everyone who wants to learn about these projects, no matter if you have previous experience using them or not, as will it cover these technologies essential concepts as well as best practices and project internals.

You can check esteban and salaboy posts for more details, and also the event registration page.

Enjoy!

Demian

Advertisement
 
Leave a comment

Posted by on July 18, 2011 in Drools

 

Tags: , , , , , , ,

Using Variables in JBPM5 Human Tasks

I have been playing a bit with processes and human tasks, and I want to show how we can share variables between human tasks in Jbpm5.

Let’s see the following process:

There are three human tasks which may have input/output:

  • Write document: Should produce an output that should contain a document which will be used by the rest of the process.
  • Translate Document: Should take the “Write document” output to show to the user for reference, and produce an output that will contain the translated document.
  • Review Document: Should take the “Write document” output to show to the user for reference, and produce an output that will contain the review of this document.
First, let’s deal with the write document output.
In the .bpmn file, we will add a new item definition, which will define the structure and a name for this structure, and  then declare a variable inside our process:
Ok, now we should define the variable inside the “Write document” task, and bind it with this process property:
Results will be the name of the variable inside the task.
– In dataOutputAssociation we put the value of the Results to the approval.document variable.
Now, let’s use this variable as an input of “Translate Document”. We will use the already filled approval.document variable, and declare it as a parameter for the task.
Please note for the input variable, I used “Content” name variable. If you see the workitem for human tasks in jbpm5, its takes some predefined parameters and sends them to the task server, so the input information should be put in Content input. Edit: after a salaboy commit some time ago, now, the input of the task will be get from the “content” variable. If you want to send many separate variables, you can omit (send it blank) the content variable, and add other variables. If the human task work item handler  does not find anything in content variable, it will send a map with all the task variables as input.
The complete process definition can be found here:
Now, how can I use it from my human task?
To get the input, using the TaskClient and having the TaskSummary is possible:
To send the output:
The full example can be found in my examples github repository:
That’s all for now. Hope it helps.
Thanks for reading!
Demian
 
5 Comments

Posted by on May 6, 2011 in Drools, JBPM

 

Tags: , ,