Hi, I wanna know how to get the next task(s) name ?
Can you be more precise ? What is your use case ?
Are they next human task ? Are they any activity, whatever their kind ? Are they from the current process, or from any process ? For the same user or for any user ?
Surely you will end up with a list. You will have to go through the process definition to determine what are the available choice.
Getting the next task name means that you need to check all the different alternative from the current task. You may have a set of gateways to go through. First get the current task instance. Retrieve the corresponding task definition. Check on the process definition what are the output from this task definition. Follow the list of possible outputs… etc…
Hi
In the processAPI, you will find a getDesignProcessDefinition method
from this DesignProcessDefinition class, call getProcessContainer() method returning a FlowElementContainerDefinition
from the latest, call getTransitions(), iterate through this Set and check your current position (current task) to the one returned by the getSource() method. Once you have found Transition, get the Destination
then depending on the complexity of your process you should be able to find your way to the next gateway and then to the next tasks available…
keep me informed!
cheers,
RP
in fact I wanna get the next human tasks for an Actor.
I mean the different human tasks that I could do after a gateway.
a task being finished, you want to display for the current user the list of available tasks ?
No, I want to show to the actual user before his task being finished, the possible next tasks after a gateway.
The way I did this was to build a database of next tasks, and used that…easier and much less complex than connectors and Java running through…as RP says…
> getProcessContainer() method returning a FlowElementContainerDefinition from the latest, call getTransitions(), iterate through this Set and check your current position (current task) to the one returned by the getSource() method. Once you have found Transition, get the Destination then depending on the complexity of your process you should be able to find your way to the next gateway and then to the next tasks available…