[jboss-user] [JBoss jBPM] - How to model this process??

frantisek.kocun@gmail.com do-not-reply at jboss.com
Sun Jun 21 16:03:21 EDT 2009

Hi, I have one interesting real world process and don't find the right elements to express it. This will be only part of a process. Of course u can advice me to code some custom nodes (more specifically Behaviors), we already use PVM. I can code this process with process specific nodes but I'm interested in some general nodes I can reuse. Also u can advice me what to put in a statemachine of object and what into the process logic.

BTW I think it is not a simple object state machine but a workflow or combination of both. Look at the process of reviewing.

In process are two role AUTHOR and REVIEWER. Process is about document with 3 states. CREATED<-->REVIEWING-->ACCEPTED

1. AUTHOR creates document and it is in state CREATED. Author can edit this document.
2. If AUTHOR's job is done he moves document to state REVIEWING.
3. There is a ordered list with REVIEWERs which is computed, when document comes to this state (given by runtime not definition, in definition is only computation). Tasks with reviewing are sequentially created or enabled for every REVIEWER. That means if first REVIEWER finish reviewing only then second REVIEWER has task to review document.
4. If last reviewer finish reviewing document comes to state ACCEPTED and some logic is done.
5. When document is in state REVIEWING, AUTHOR can every time put document back to state CREATED. I than time all unfinished task for REVIEWER should be deleted/deactivated. When AUTHOR put document to state REVIEWING all the REVIEWERs  has to review the document. (Even those who reviewed it already, because document changed).

Complicated to do are steps 3. and 5. 5 is more complicated for me. 

I can solve step 3 in two ways, even creating general behavior. Which one is better if any?
- Creating special SerialTask. I create serial  tasks for all the REVIEWERs. They are in state Inactive if first ends it activates second task and so on. When last ends it signals the token.
- Creating a special node. In this node One can specify how the first task should look like and how the next task should look like. So it gets the list of REVIEWERs and creates first task for the first in the list. Than it creates second task if first is finished. It gets the list and look who is next.. So in the condition for next task one can use previous task as variable. If there are no more REVIEWERs it will signal token.

Thank you for your help!


View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4238916#4238916

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4238916

More information about the jboss-user mailing list