cancel
Showing results for 
Search instead for 
Did you mean: 

How to achieve flexible workflow

tll
Champ in-the-making
Champ in-the-making
hi,
    I'm trying to implement flexible process which users can determine the next task dynamically. I have used the ActivityImpl#getOutgoingTransitions(), createOutgoingTransition(), etc. in our method. This method need to change and restore the the process definition each time. I think this method has some risk. If multi-users use the same process definition simultaneously, the process maybe crashed.

Is there some interface in Activiti that I can complete the task with specified “destinationTaskKey”?

Thanks!

-
best regards,

tll
3 REPLIES 3

trademak
Star Contributor
Star Contributor
How many different tasks are we talking about? And are these tasks flexible as well, or do you have a fixed pool of 100 different tasks or so? You could do something with call activities and expressions on the calledElement to make your process flexible. If there are only a couple of tasks you could use the outgoing transitions to show a list of options to the user. Also, it's possible to use a form key expression to dynamically determine the task type. So a lot of possibilities.

Best regards,

tll
Champ in-the-making
Champ in-the-making
There are about ten tasks in total.
what is"form key expression" ?  Does that mean the TaskDefinitionKey of a task that defined in the process definition ".xml" file?
If so, how can I complete the current task by using the supplied complete() function? It only has a parameter " taskId". Maybe I could extend the complete() by adding another parameter "TaskDefinitionKey". Also I need to modify the corresponding source code in org.activiti.engine.impl.interceptor.Command.

jbarrez
Star Contributor
Star Contributor
My guess ( i think i posted this in the other thread to) is to work with expressions for the task name and form key, combined with exclusive gateways that check whether a new task needs to be created.