2 Replies Latest reply on Feb 20, 2006 12:35 AM by aguizar

    Double update/review process

    jeffw

      Im wondering how (or if) I could model the following scenario:

      I have a scenario where when a process is started, it goes through a review/update step. For example, a customer and salesman can both review and update an order; If either changes its details, then the other needs to review it again.

      How could I do this?

        • 1. Re: Double update/review process
          aguizar

          Here's my suggestion. The general idea is to have a review task for each actor in the process and require a certain number of confirmations. If the number is not reached, the review process is started all over again.

          I modeled this with the GPD. If you want a copy of the process project, drop me an email and I'll send it to you.

          <?xml version="1.0" encoding="UTF-8"?>
          
          <process-definition
           xmlns="urn:jbpm.org:jpdl-3.1"
           name="revision">
           <end-state name="end"></end-state>
           <fork name="fork1">
           <transition name="client branch" to="Client Revision"></transition>
           <transition name="sales branch" to="Sales Revision"></transition>
           </fork>
           <task-node name="Client Revision">
           <transition name="Update" to="Client Adjustment"></transition>
           <transition name="Confirm" to="Post Client Step">
           <script>
           <variable name="confirmCount"/>
           <expression>confirmCount++</expression>
           </script>
           </transition>
           </task-node>
           <task-node name="Sales Revision">
           <transition name="Update" to="Sales Adjustment"></transition>
           <transition name="Confirm" to="Post Sales Step">
           <script>
           <variable name="confirmCount"/>
           <expression>confirmCount++</expression>
           </script>
           </transition>
           </task-node>
           <node name="Post Sales Step">
           <transition name="" to="join1"></transition>
           </node>
           <task-node name="Sales Adjustment">
           <transition name="" to="Post Sales Step"></transition>
           </task-node>
           <task-node name="Client Adjustment">
           <transition name="" to="Post Client Step"></transition>
           </task-node>
           <node name="Post Client Step">
           <transition name="" to="join1"></transition>
           </node>
           <join name="join1">
           <transition name="" to="Confirmed?"></transition>
           </join>
           <decision name="Confirmed?">
           <transition name="Yes" to="end">
           <condition>confirmCount == 2</condition>
           </transition>
           <transition name="No" to="Pre Revision Step"></transition>
           </decision>
           <start-state name="start">
           <transition name="" to="Pre Revision Step"></transition>
           </start-state>
           <node name="Pre Revision Step">
           <transition name="" to="fork1">
           <script>
           <variable name="confirmCount" access="write"/>
           <expression>confirmCount = 0</expression>
           </script>
           </transition>
           </node>
          </process-definition>


          • 2. Re: Double update/review process
            aguizar

            I might as well paste the contents of gpd.xml here.

            <?xml version="1.0" encoding="UTF-8"?>
            
            <process-diagram name="revision" width="866" height="832">
             <node name="end" x="214" y="638" width="105" height="40"/>
             <node name="fork1" x="214" y="183" width="113" height="25">
             <transition name="client branch">
             <label x="4" y="1"/>
             <bendpoint w1="77" h1="14" w2="0" h2="-70"/>
             </transition>
             <transition name="sales branch">
             <label x="-74" y="3"/>
             <bendpoint w1="-84" h1="17" w2="0" h2="-65"/>
             </transition>
             </node>
             <node name="Client Revision" x="283" y="259" width="129" height="40">
             <transition name="Update">
             <label x="5" y="-2"/>
             <bendpoint w1="81" h1="24" w2="0" h2="-60"/>
             </transition>
             <transition name="Confirm">
             <label x="7" y="-50"/>
             <bendpoint w1="-74" h1="21" w2="-73" h2="-142"/>
             <bendpoint w1="-74" h1="136" w2="-73" h2="-27"/>
             </transition>
             </node>
             <node name="Sales Revision" x="123" y="257" width="126" height="40">
             <transition name="Update">
             <label x="-44" y="-1"/>
             <bendpoint w1="-79" h1="26" w2="-1" h2="-62"/>
             </transition>
             <transition name="Confirm">
             <label x="-50" y="-49"/>
             <bendpoint w1="73" h1="22" w2="77" h2="-142"/>
             <bendpoint w1="73" h1="134" w2="68" h2="-30"/>
             </transition>
             </node>
             <node name="Post Sales Step" x="129" y="421" width="116" height="40">
             <transition name="">
             <label x="5" y="-10"/>
             <bendpoint w1="-1" h1="50" w2="-80" h2="-15"/>
             </transition>
             </node>
             <node name="Sales Adjustment" x="45" y="345" width="126" height="40">
             <transition name="">
             <label x="5" y="-10"/>
             <bendpoint w1="79" h1="24" w2="0" h2="-52"/>
             </transition>
             </node>
             <node name="Client Adjustment" x="362" y="343" width="132" height="40">
             <transition name="">
             <label x="5" y="-10"/>
             <bendpoint w1="-81" h1="22" w2="1" h2="-57"/>
             </transition>
             </node>
             <node name="Post Client Step" x="287" y="422" width="121" height="40">
             <transition name="">
             <label x="5" y="-10"/>
             <bendpoint w1="0" h1="49" w2="81" h2="-15"/>
             </transition>
             </node>
             <node name="join1" x="207" y="494" width="119" height="25">
             <transition name="">
             <label x="5" y="-10"/>
             </transition>
             </node>
             <node name="Confirmed?" x="215" y="559" width="103" height="40">
             <transition name="Yes">
             <label x="5" y="-10"/>
             </transition>
             <transition name="No">
             <label x="-199" y="234"/>
             <bendpoint w1="230" h1="-1" w2="225" h2="447"/>
             <bendpoint w1="259" h1="-25" w2="254" h2="423"/>
             <bendpoint w1="259" h1="-433" w2="254" h2="15"/>
             <bendpoint w1="242" h1="-449" w2="237" h2="-1"/>
             </transition>
             </node>
             <node name="start" x="212" y="40" width="115" height="40">
             <transition name="">
             <label x="5" y="-10"/>
             </transition>
             </node>
             <node name="Pre Revision Step" x="206" y="111" width="130" height="40">
             <transition name="">
             <label x="5" y="-10"/>
             </transition>
             </node>
            </process-diagram>