2 Replies Latest reply on Jan 8, 2009 7:28 AM by Ronald van Kuijk

    How to model hierarchy recursion process ?

    wjq Newbie

      Hello,

      I have an organization hierarchy structure. and the business scenario as following:

      1, a man in one organization(Sales) apply for a licence
      2, the admin of Sales check the applying,if ok go next,else reject.
      3, the leader of Sales check the applying,if ok go next,else reject
      4, the admin of CityBranch (the parent organization of Sales) check the applying,if ok go next else reject.
      5, the leader of the CityBranch check the applying,if ok go next else reject.
      6, the admin of the subcompany(the parent organization of the CityBranch) check the applying,if ok go next else reject.
      ... ...

      the key of the problem is how i model the reoccuring process on same tasks that performed by different man in a hierarchy orgnazition structure(process will terminate on the uppermost organization).

      I think this is common to a workflow engine,but since i am new to workflow,i dont know how to deal it with jbpm.

      BTW, the following artical descript this,but it says jbpm has no support for it.is it true ?
      http://www.workflowpatterns.com/patterns/control/new/wcp22.php

        • 1. Re: How to model hierarchy recursion process ?
          insanely freak Newbie

          Hi Joy,
          I saw your post regarding requirement for hierarchical structure workflow. Even I have a similar requirement. I tried implementing it using a task node and a decision node to loop back to task node, but it gives a StackOverFLow exception.
          I figured out from few posts in this forum that it is known issue in JBPM. It would be great if you could post what approach or design did you use to implement the above pattern.

          Thanks in advance

          • 2. Re: How to model hierarchy recursion process ?
            Ronald van Kuijk Master

            Recusrion is not supported, but as you can see in 'their' complicated view, they use more atomic operations to achieve this. jBPM supoports almost all of these atomic operations and with e.g. a decision you can create a loop (I know looping is different, but I think a loop is better here than recursion). The stack overflow occurs if you finish the task and not save it and close the context. Otherwise it should work., I did this myself several times. In a custom assignmenthandler you can check which person/role should be the next one to act upon the task. Works for me.