cancel
Showing results for 
Search instead for 
Did you mean: 

Executing task

reaker
Champ in-the-making
Champ in-the-making

Hello,

Is there any possibility to execute a task (chosen by property)? Additionally I would like to make this task to finish after execution - not to proceed further.

1 REPLY 1

ryandawson
Elite Collaborator
Elite Collaborator

Do you mean make a choice between several different tasks by using a property? If so then you could do that using a gateway. See for example https://community.alfresco.com/thread/235681-activiti-is-ineffective-in-china-and-hopes-to-attract-o... 

If instead you want to switch the class/bean that implements a task then there are different options. If you are using the spring boot starter then the tasks can be matched to their implementations using spring expression language. So you might be able to build a property check into a spring expression. Another way would be to put a service task infront of the task that you want to switch the implementation of and use the DynamicBpmnService to switch the implementation. Or you could do that at startup, perhaps in a PostConstruct.

I'm not sure what you mean about finish after execution. That just sounds like you need an end event. Perhaps you have something like a dynamic subtask in mind. I don't want overcomplicate but you could look at the scenarios on  

Your scenario sounds like it is probably simpler but I'm not entirely sure. It might help if you could post what bpmn/ideas you do have.