JBoss Community

Re: ProcessContext Throwing NPE

created by Thomas Setiabudi in jBPM - View the full discussion

Hi, (changed your name is it? was Roxy1987 right?)

 

So please find the attached process definition (test1.testAssignUser.v1.bpmn2)

The process has two process variables, they are:

1. pvFirstActor

2. pvSecondActor

 

The process is like what you said, it has 2 human task:

1. HumanTask1 with actor Id taken from the value of "pvFirstActor"

2. HumanTask2 with actor Id taken from the value of "pvSecondActor"

 

 

when we first start process we set the value of variable "pvFirstActor" that will be used as the first Human Task actor Id

 

then the first human task has output variable that called "secondActorName" that is mapped to "pvSecondActor"

 

so after we complete HumanTask1 then the value of "pvSecondActor" will be set based on the output of the HumanTask1

 

Attached a working test case too, look at the testAssignVariableAsActorId() test function inside PersistentProcessTest class in jbpm5-PersistentProcess.7z (it is based on sample from Mauricio Salatino / Salaboy)

 

 

Regards,

Thomas Setiabudi

Reply to this message by going to Community

Start a new discussion in jBPM at Community