cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Step

ronyeid
Champ in-the-making
Champ in-the-making
Hello,

Do we have support for the notion of dynamic step in Activiti?
In fact at runtime, we may need to create an extra step specifically for a workflow instance.
This step/task will not be part of the original workflow design, but will be recorded and logged for the instance.

If we consider the virus incident service, where the support member handling the “Resolution” task had to launch the “Reset password” service. This is a specific system task that should be recorded.

Thank you for any help,
Rony
9 REPLIES 9

ronyeid
Champ in-the-making
Champ in-the-making
Hello again,

We have come into an idea of creating a detail table that holds all the dynamicaly created steps with there corresponding parent execution id. This will help us to know on execution time the list of the dynamic activities to be executed.

Would that be appropriate as a solution for dyanmic step?

Thank you,
Rony

vickyk
Champ in-the-making
Champ in-the-making
We have come into an idea of creating a detail table that holds all the dynamicaly created steps with there corresponding parent execution id. This will help us to know on execution time the list of the dynamic activities to be executed.

Would that be appropriate as a solution for dyanmic step?

Thank you,
Rony

Ideally for dynamic activities should be added through the ProcessInstance class which means that there should be method supporting such operations in the org.activiti.ProcessInstance. I don't see such method yet in the implementation.
It could turn to be complex thing to do while the dymamic activity(task) is added to the process which is currently being executed by Process engine, this one looks tricky IMHO.
I don't understand how you would update the process instance from the information since I can't find the api's in ProcessIntance which could do that.
Let us hear more from others, I am yet in process of taking a deep dive into the internals.

Regards,
Vicky

dfrench1
Champ in-the-making
Champ in-the-making
Being able to modify the instance of a process that is executing would really help with the more agile uses of business process management. For example: a user activity could be viewed as ok you have the ball; decide how you are going to proceed; specify the necessary process steps and start the execution of them. Logically you could view it as a sub-process to be hooked in at execution time. I like the idea because it means that a BPMS can be the source all information of current state of process and the process does not have to exhaustively analysed and described before being usable.
Is this impossible, hard, useless ….?

tombaeyens
Champ in-the-making
Champ in-the-making
We plan to have the notion of dynamic subtasks.  This means that a top level task could be part of the fixed process definition.  Then the assignee can create dynamically subtasks, assign them to people and eventually decide to complete the top level task.  Then the process continues.

Does this cover your use case?

dfrench1
Champ in-the-making
Champ in-the-making
Thanks Tom, Definitely going in the right direction with inclusion of new subtasks that fill in an empty higher level task. Refinements …
(1) if the dynamic subtask could be stored in a library of canned subtasks, the business dynamically builds lego components for future use
(2) versioning and editing of the canned subtasks would support the agile business modifying bits of the overall process from a base version of the subtask. For example … a simple? voting mechanism could start as a task to gather all opinions; automate a mailout/get responses; be further refined by introducing quorums; ….
(3)allowing a dynamic subtask to become a fixed part of the process potentially allows the business to grow a process from a seed. Fractal processes???

tombaeyens
Champ in-the-making
Champ in-the-making
For (1), could I see this as dynamically starting and associating a new process execution related to a task?  So a user gets a task, then decides that this requires an official approval process, so he selects the official approval process.  then a new process instance is started dynamically related to that task.  Would that match with your notion of dynamic canned subtasks?

(i find this a very interesting idea)

dfrench1
Champ in-the-making
Champ in-the-making
I may have been thinking (rather than doing) too much about this scenario, Tom.
Starting up a new process, with or without the design of that process, in order to complete a task is I believe a really good and practical way of doing a business process. However, I do not want to lose sight of the relationship between higher level or originating process. If an enterprise embraces BPM as the way to do things, questions like "where are we upto on this instance of process X" and "how did we actually proceed on the last months instances of process X" become significant.
So from the engine perspective, I would need the instance of lower level process linked to the upper-level. Looking at the issue deeper, the process using another process should not be limited to a single level.
You might have a well defined but simple overview process of how the business operates around say publishing a document (with approvals etc) with the how the detailed tasks get carried out being decided on each instance by the responsible person at the time (a bit like a project breakdown). For compliance reasons or simple day to day management a view may be taken of the complete process where you would see what the actual instance of process looks like in detail just as though some process designer had drawn it all up in BPMN.
I do not see the participants in the process as being bound to define their bits of the process in BPMN … they may simply be providing parameters to a workflow pattern to generate the required executable bits.
Happy to continue this exchange here or take it offline

aivaras
Champ in-the-making
Champ in-the-making
Hey,

I think first thing is to describe use cases:
1. Going to doctor:
a) You describe your problems;
b) depend on your description and your medical card information doctor choose:
    diagnosis services ( various blood analysis, tests and etc.)
c) after all needed information gathered doctor can asign you treatment:
    home;
    hospital;
    sanatory.
From every doctor steps process can shift dramatically, but we can describe main abstract steps - analysis, treatment.

This is process as described above, you can chose sub tasks  from main process. Sub task list must depend on main task, available data, already executed sub tasks (you can not assign two x-rays in half a year) and so on.
So rule based available task list generation would be best option.

2. Account errors correction - where is various ways to solve accounting errors, depend on error, time when you solving it, accounting policies and so on. So better to give user task list and let him pick best options. Also task can be small processes, rule dependent.

3. Simple selling process - where could be a lot of turns of processes, so user can pick some task in middle of execution an change process flow. Again you need rules engine to describe which task at witch moment to execute.

So we need task repository, rule based selection of task.

My two cents.

tombaeyens
Champ in-the-making
Champ in-the-making
I may have been thinking too much about this scenario, Tom.

tell me about it!  I've been thinking about nothing else then bpm and state machines for 8 years.
😉

Starting up a new process, with or without the design of that process, in order to complete a task is I believe a really good and practical way of doing a business process. However, I do not want to lose sight of the relationship between higher level or originating process. If an enterprise embraces BPM as the way to do things, questions like "where are we upto on this instance of process X" and "how did we actually proceed on the last months instances of process X" become significant.

maintaining the relation in the history (permanent) storage is indeed crucial and very easy.  letting people browse this information is easy too.  the hard part will be reporting.  you can't really build statistics on the pieces that don't have a fixed structure.

Happy to continue this exchange here or take it offline

i think i get the picture. 

I've added "Extend dynamic task creation to allow subprocesses to be dynamically linked to user tasks." as an idea on to our roadmap page: http://docs.codehaus.org/display/ACT/Roadmap