cancel
Showing results for 
Search instead for 
Did you mean: 

Which object should i use?

c_nick
Champ in-the-making
Champ in-the-making
Have a dynamic task which task name and the role user is come from database, this dynamic task will be call by itself base on some conditions.

the diagram as following :
                |<————-|                    
(start) - [dynamic task] - <X> - (end)

<X> : is a gateway

Question is :
how to create [dynamic task] and assign the variable from database to it?

should i create a empty node and set a start event at [dynamic task]. when enter this node will create a task and set role and name to it or activiti have existing task object to handle it?
1 REPLY 1

frederikherema1
Star Contributor
Star Contributor
If you have an "external" task-management system, you can do 2 things in the activiti diagram:

  • Model a UserTask in your process, nevertheless and when the dynamic task is completed, use taskService.complete(…) passing in any variables you have in your external task-model to allow activiti to use those. Your diagram shows clearly that a user-task is waiting.

  • Model a signal-task in your process. When the dynamic task is finished, call runtimeService.setVariables() and runtimeService.signal() to make the process continue after the signal-task. This leaves no "task" trace in history. The downside is that your diagram is harder to read, since you can't see from the signal-task that this is a task that a human will perform in your system.