8 Replies Latest reply on Nov 30, 2005 5:37 AM by Koen Aers

    problem adding swimlane to a workflow

    for Jbpm Novice

      Hi!

      Whats wrong with this simple workflow.
      When I add swimlane, it gives me error saying that *Invalid content was found starting with element 'start-state' one of (https://jbpm.org/3/jpdl":swimlane.............etc...)

      <?xml version="1.0" encoding="UTF-8"?>

      <process-definition
      xmlns="http://jbpm.org/3/jpdl" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://jbpm.org/3/jpdl http://jbpm.org/xsd/jpdl-3.0.xsd"
      name="Demo_ver0.01">



      //Error at this place//
      <start-state name="step1">


      </start-state>




      <end-state name="end"></end-state>
      </process-definition>

      Thanks,

        • 1. Re: problem adding swimlane to a workflow
          for Jbpm Novice

          Hi!
          ooops! I just noriced that my process definition is printed partially!! I dont know why there are so many blank spaces. All the content I typed is missing.

          When in my processdefinition I dont define/declare swimlane and use it ( without declaring it) as *task name="task" swimlane ="FirstUser"* , I dont get any error though I should be getting error as swimlanes are not declared/defined before using them.

          But when I declare/ define swimlane with *swimlane name ="FirstUser"*
          I get error as
          *Invalid content was found starting with element 'start-state' one of (https://jbpm.org/3/jpdl":swimlane.............etc...)

          Any opinion regarding this???
          Regards,

            [img][/img]

            • 2. Re: problem adding swimlane to a workflow
              David Sanchez Novice

              I'm having the exact same problem. Here is my processdefinition.xml

              <?xml version="1.0" encoding="UTF-8"?>
              
              <process-definition
               xmlns="http://jbpm.org/3/jpdl" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:schemaLocation="http://jbpm.org/3/jpdl http://jbpm.org/xsd/jpdl-3.0.xsd"
               name="RoHSBud_3_Workflow">
              
               <swimlane name="compliance manager">
               <assignment class="com.regutrack.rohsbud.assignment.GenericAssignmentHandler"></assignment>
               </swimlane>
              
               <start-state name="Start Workflow 3">
               <task swimlane="compliance manager">
               <controller>
               <variable name="manuf_part_number" mapped-name="Manuf. Part Number" />
               <variable name="manuf_part_description" mapped-name="Manuf. Part Description" />
               <variable name="vendor_name" mapped-name="Vendor Name" />
               <variable name="vendor_part_number" mapped-name="Vendor Part Number" />
               <variable name="sourcing" mapped-name="Sourcing Type" />
               <variable name="owner" mapped-name="Owner" />
               </controller>
               </task>
               <transition name="tr1" to="task1"></transition>
               </start-state>
              
               <end-state name="end1"></end-state>
              
               <task-node name="Determine RoHS Status">
               <task name="task1">
               <assignment class="com.regutrack.rohsbud.assignment.GenericAssignmentHandler"></assignment>
               </task>
               <transition name="tr1" to="end1"></transition>
               </task-node>
              
              </process-definition>
              

              "In gpd, "start-state" is underlined. When putting the cursor over this there is a long list of elements it expects, one of which is "task"

              Is there a workaround for this? I'm actually having a lot of problems with assignments in general. I also tried using my class "GenericAssignmentHandler" in the task node "Determine RoHS Status" with no luck



              • 3. Re: problem adding swimlane to a workflow
                Alejandro Guizar Master

                From the jPDL 3.0 schema, available at http://jbpm.org/xsd/jpdl-3.0.xsd:

                <xs:complexType name="process-definition-v3.0">
                 <xs:sequence>
                 <xs:element name="start-state" .../>
                 <xs:element ref="swimlane" .../>
                 ...
                 </xs:sequence>
                </xs:complexType>

                The start-state element is declared before swimlane in the sequence. Therefore you have to declare swimlanes after the start state. This is a bit counterintuitive. In fact, in the updated schema for version 3.1, swimlanes come before start states.

                • 4. Re: problem adding swimlane to a workflow
                  for Jbpm Novice

                  That also contradict with given example of websale.par/processdefinition. In websale.par Swimlane comes before start-state and which sounds logical also!
                  To create websale.par what version of jbpm has been used?

                  Thanks

                  • 5. Re: problem adding swimlane to a workflow
                    Alejandro Guizar Master

                    The trick with the websale example is that it has no schema location:

                    <process-definition name="websale" xmlns="http://jbpm.org/3/jpdl">
                    ...
                    </process-definition>

                    The XML editor included with the GPD won't validate a definition missing the xsi:schemaLocation attribute.

                    • 6. Re: problem adding swimlane to a workflow
                      David Sanchez Novice

                      Not only is that awkward but its what the current gpd does.

                      I did try your suggestion, it made the red underline go away but it didn't deploy, got a -1 for process version.

                      ..this is what I tried

                      <?xml version="1.0" encoding="UTF-8"?>
                      
                      <process-definition
                       xmlns="http://jbpm.org/3/jpdl" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                       xsi:schemaLocation="http://jbpm.org/3/jpdl http://jbpm.org/xsd/jpdl-3.0.xsd"
                       name="Part_Workflow_1">
                      
                       <start-state name="Start Part Project">
                       <task>
                       <controller>
                       <variable name="manuf_part_number" mapped-name="Manuf. Part Number" />
                       <variable name="manuf_part_description" mapped-name="Manuf. Part Description" />
                       <variable name="vendor_name" mapped-name="Vendor Name" />
                       <variable name="vendor_part_number" mapped-name="Vendor Part Number" />
                       <variable name="sourcing" mapped-name="Sourcing Type" />
                       <variable name="owner" mapped-name="Owner" />
                       </controller>
                       </task>
                       <transition name="tr1" to="task1"></transition>
                       </start-state>
                       <swimlane name="compliance manager">
                       <assignment class="com.regutrack.rohsbud.assignment.GenericAssignmentHandler" />
                       </swimlane>
                      
                       <task-node name="task1">
                       <transition name="tr1" to="end1"></transition>
                       </task-node>
                      
                       <end-state name="end1"></end-state>
                      
                      </process-definition>
                      

                      Also, seems you can't do a simple assignment expression like in the websale exaample. You get the red underline which complains that 'assignment' requires a "class" property. Again the gpd guides you right into this error.

                      I still love jBPM, lets get this stuff ironed out.

                      • 7. Re: problem adding swimlane to a workflow
                        David Sanchez Novice

                        Still can't get any sort of assignment to work. Can you please modify this processdefinition.xml to show me what works.

                        <?xml version="1.0" encoding="UTF-8"?>
                        
                        <process-definition
                         xmlns="http://jbpm.org/3/jpdl" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                         xsi:schemaLocation="http://jbpm.org/3/jpdl http://jbpm.org/xsd/jpdl-3.0.xsd"
                         name="Part_Workflow_2">
                         <start-state name="Start Part Project">
                         <task>
                         <controller>
                         <variable name="manuf_part_number" mapped-name="Manuf. Part Number" />
                         <variable name="manuf_part_description" mapped-name="Manuf. Part Description" />
                         <variable name="vendor_name" mapped-name="Vendor Name" />
                         <variable name="vendor_part_number" mapped-name="Vendor Part Number" />
                         <variable name="sourcing" mapped-name="Sourcing Type" />
                         <variable name="owner" mapped-name="Owner" />
                         </controller>
                         </task>
                         <transition name="tr1" to="task1"></transition>
                         </start-state>
                         <task-node name="task1">
                         <transition name="tr1" to="end1"></transition>
                         </task-node>
                         <end-state name="end1"></end-state>
                        </process-definition>
                        

                        Thanks much!

                        • 8. Re: problem adding swimlane to a workflow
                          Koen Aers Master

                          First, the red line in the GPD is very inconvenient, but harmless. Upon deployment, there is no validation of the xml so even if it does not conform to the xsd, deployment will work.
                          Second, there is nothing to be assigned in your process definition. You should define a task and use your swimlane in the assignment element.

                          Regards,
                          Koen