7 Replies Latest reply on Dec 28, 2005 7:21 AM by Elmo

    Need Help for Sub-Process

    Srikanth Ramaswamy Newbie

      Hi,

      In my machine i installed jbpm-gpd-for-eclipse-3.0-beta1.zip and also overide jbpm jbpm-gpd-site-3.05 (pluggin and feature)

      In eclipse (Process Definition) i can see the component
      1. Select
      2. Marquee
      3. Start
      4. State
      5. End
      6. Fork
      7. Join
      8. Decision
      9. Node
      10. Task Node
      11. Transition

      I don't see for process-state, synconize and sub-process...

      How i can create the process-state, I want to work in Process associate with some other process (for eg sub-process)

      Please help me in this regards
      Thanks for advance
      Srikanth

        • 1. Re: Need Help for Sub-Process
          Sean Newbie

          You have to do it in the XML. There is no GUI component for the sub process.

          • 2. Re: Need Help for Sub-Process
            Srikanth Ramaswamy Newbie

            I did some example code.


            Parent Process
            **************

            <?xml version="1.0" encoding="UTF-8"?>
            
            <process-definition name="mainProcess">
            
             <!-- SWIMLANES (= process roles) -->
            
             <swimlane name="customer" >
             <assignment expression="user(customer)" />
             </swimlane>
            
             <swimlane name="operator1">
             <assignment expression="user(bert)" />
             </swimlane>
             <!-- NODES -->
             <start-state name="MainProcessStart">
             <task swimlane="customer">
             <controller>
             <variable name="Account Id" access="write"></variable>
             <variable name="Name" access="write"></variable>
             </controller>
             </task>
             <transition name="tr1" to="Mainstate1"></transition>
             </start-state>
            
             <end-state name="Mainend" />
            
             <state name="Mainstate1">
             <task swimlane="operator1">
             <controller>
             <variable name="Account Id" access="write"></variable>
             <variable name="Name" access="write"></variable>
             <variable name="Addresss" access="write"></variable>
             </controller>
             </task>
             <transition name="tr1" to="Parent Process"></transition>
             </state>
            
             <process-state name="Parent Process">
             <sub-process name = "subProcess"/>
             <variable name="Account Id" access="write" mapped-name="Account Id"></variable>
             <variable name="Name" access="write" mapped-name="Name"></variable>
             <transition name="tr1" to="Mainstate2"></transition>
             </process-state>
            
             <state name="Mainstate2">
             <transition name="tr1" to="Mainend"></transition>
             </state>
            
            </process-definition>
            


            sub Process
            ***********

            <?xml version="1.0" encoding="UTF-8"?>
            
            <process-definition name="subProcess">
            
             <!-- SWIMLANES (= process roles) -->
            
             <swimlane name="customer" >
             <assignment expression="user(customer)" />
             </swimlane>
            
             <swimlane name="operator1">
             <assignment expression="user(james)" />
             </swimlane>
             <!-- NODES -->
            
             <start-state name="Start">
             <task swimlane="customer">
             <controller>
             <variable name="Account Id" access="write"></variable>
             <variable name="Name" access="write"></variable>
             </controller>
             </task>
             <transition name="tr1" to="state1"></transition>
             </start-state>
            
             <end-state name="end" />
             <state name="state1">
             <task swimlane="operator1">
             <controller>
             <variable name="Account Id" access="write"></variable>
             <variable name="Name" access="write"></variable>
             <variable name="Addresss" access="write"></variable>
             </controller>
             </task>
             <transition name="tr1" to="state2"></transition>
             </state>
             <state name="state2">
             <transition name="tr1" to="end"></transition>
             </state>
            
            </process-definition>
            


            After deploying the both par in mysql and i experiment in JBPM application i am able to see the MainProcessStart Task, when i click that task and enter two fields value and click SaveAndClose. After that it's not coming in "Mainstate1" what is wrong. if i removed process-state it is working.
            Any Idea please.


            Thanks & Regards
            Srikanth



            [/img]

            • 3. Re: Need Help for Sub-Process
              Srikanth Ramaswamy Newbie

              Dear friends,

              Please response my above issue. It is very urgent

              thanks
              Srikanth

              • 4. Re: Need Help for Sub-Process
                Srikanth Ramaswamy Newbie

                Hey atleast some body let me know i am in right direction..

                • 5. Re: Need Help for Sub-Process
                  Elmo Novice

                  If you are using Jbpm 3.02 change your process-state name to subProcess. There seems to be a bug in that version but I cannot confirm since I already upgraded to 3.1. There is already some post in that I can't recall.

                  Also, for task-nodes use task-node, not state. Maybe it will work but task-nodes are much more appropriate.

                  Regards,

                  Elmo

                  • 6. Re: Need Help for Sub-Process
                    Srikanth Ramaswamy Newbie

                    Now it's creating the subprocess. what i did i download jbpm 3.02 and jbpm starter kit 3.02, Previously i use to worked in jbpm 3.1 alpha 1. this is not creating the subprocess i don't know why.

                    but one issue after creating the subprocess i am getting message in server given below:-


                    9:52:18,160 DEBUG [TaskInstance] completion of task 'startHire' results in taking the default transition
                    9:52:18,160 DEBUG [GraphElement] event 'before-signal' on 'StartState(startHire)' for 'Token(/)'
                    9:52:18,160 DEBUG [GraphElement] event 'node-leave' on 'StartState(startHire)' for 'Token(/)'
                    9:52:18,160 DEBUG [GraphElement] event 'transition' on 'Transition()' for 'Token(/)'
                    9:52:18,160 DEBUG [GraphElement] event 'node-enter' on 'ProcessState(initial interview)' for 'Token(/)'
                    9:52:18,160 DEBUG [GraphElement] event 'process-start' on 'ProcessDefinition(interview)' for 'Token(/)'
                    9:52:18,160 DEBUG [GraphElement] event 'subprocess-created' on 'ProcessState(initial interview)' for 'Token(/)'
                    9:52:18,176 DEBUG [GraphElement] event 'before-signal' on 'StartState(startSubProcess)' for 'Token(/)'
                    9:52:18,176 DEBUG [GraphElement] event 'node-leave' on 'StartState(startSubProcess)' for 'Token(/)'
                    9:52:18,176 DEBUG [GraphElement] event 'transition' on 'Transition(tr1)' for 'Token(/)'
                    9:52:18,176 DEBUG [GraphElement] event 'node-enter' on 'TaskNode(interviewTask)' for 'Token(/)'
                    9:52:18,176 DEBUG [GraphElement] event 'task-assign' on 'Task(interviewTask)' for 'Token(/)'
                    9:52:18,176 DEBUG [GraphElement] event 'task-create' on 'Task(interviewTask)' for 'Token(/)'
                    9:52:18,176 DEBUG [GraphElement] event 'after-signal' on 'StartState(startSubProcess)' for 'Token(/)'
                    9:52:18,176 DEBUG [GraphElement] event 'after-signal' on 'StartState(startHire)' for 'Token(/)'
                    9:52:18,176 DEBUG [TaskBean] assignmentlogs: []
                    9:52:18,191 INFO [[/jbpm]] WARNING: Component _id13 just got an automatic id, because there was no id assigned yet. If this component was created dynamically (i.e. not by a JSP tag) you should assign it an explicit static id or assign it the id you get from the createUniqueId from the current UIViewRoot component right after creation!
                    9:52:18,285 DEBUG [PersistenceContext] committing transaction

                    Here is the different code

                    Parent
                    ******

                    <?xml version="1.0" encoding="UTF-8"?>
                    
                    <process-definition name="hire">
                    
                     <swimlane name="customer"/>
                    
                     <start-state name="startHire">
                     <task swimlane="customer">
                     <controller>
                     <variable name="a"/>
                     <variable name="b"/>
                     </controller>
                     </task>
                     <transition name="" to="initial interview"></transition>
                    
                     </start-state>
                    
                     <process-state name="initial interview">
                     <sub-process name="interview"/>
                     <controller>
                     <variable name="a" access="read,write" mapped-name="aa" />
                     <variable name="b" access="read" mapped-name="bb" />
                     </controller>
                     <transition name="" to="LastTask"></transition>
                     </process-state>
                    
                     <task-node name="LastTask">
                     <transition name="" to="end1"></transition>
                     </task-node>
                     <end-state name="end1"></end-state>
                    
                    </process-definition>
                    


                    subprocess
                    **********
                    <?xml version="1.0" encoding="UTF-8"?>
                    
                    <process-definition name="interview">
                    
                    <swimlane name="customer"/>
                    
                     <swimlane name="operator1">
                     <assignment expression="user(james)" />
                     </swimlane>
                    
                     <start-state name="startSubProcess">
                     <task swimlane="customer">
                     <controller>
                     <variable name="aa"/>
                     <variable name="bb"/>
                     </controller>
                     </task>
                     <transition name="tr1" to="interviewTask"></transition>
                     </start-state>
                    
                     <task-node name="interviewTask">
                     <task swimlane="customer">
                     <controller>
                     <variable name="aa" access="read,write"/>
                     <variable name="bb" access="read,write"/>
                     </controller>
                     </task>
                     <transition name="tr1" to="HRInterview Task"></transition>
                     </task-node>
                    
                     <end-state name="end1"></end-state>
                    
                     <task-node name="HRInterview Task">
                     <task swimlane="operator1">
                     <controller>
                     <variable name="aa" access="read"/>
                     <variable name="bb" access="read"/>
                     </controller>
                     </task>
                     <transition name="tr1" to="end1"></transition>
                     </task-node>
                    
                    </process-definition>
                    


                    Please let me know what i did in right direction. or i need to some other logic...



                    • 7. Re: Need Help for Sub-Process
                      Elmo Novice

                      It seems its a UI, probably a jsp related problem. I think I've already seen that issue somewhere, just check some posts here. Use the search facility in the post. Tip: check the database for entries, if there are values in there that seems to be correct, then you are on the right track.


                      WARNING: Component _id13 just got an automatic id, because there was no id assigned yet. If this component was created dynamically (i.e. not by a JSP tag) you should assign it an explicit static id or assign it the id you get from the createUniqueId from the current UIViewRoot component right after creation!


                      Regards,

                      Elmo