12 Replies Latest reply on Nov 8, 2012 9:43 AM by a_nat

    Swimlanes and ActorId

    lucazamador

      Hi there,

      I'm currently facing some issues trying to use swmimlanes in jBPM 5.3. The fact is that isn't working as I suppose it should works.

      My current business process is really simple. I have two human tasks assigned to the same swmimlane as you can see in the next image.

       

      Screen Shot 2012-07-31 at 9.57.50 AM.png

       

      both tasks are assigned to the same group, but when the first task is completed the second one isn't automatically assigned to the user id who completed the first one. The task is only created and AFAIK the Swimlane context is updated with the current ActorId.

       

      Am I missing something?

       

      Regards

        • 1. Re: Swimlanes and ActorId
          eaa

          Hi Lucas! Long time no see!

          Could you please share the xml definition of your process?

           

          Best Regards,

          • 2. Re: Swimlanes and ActorId
            lucazamador

            Hey Esteban, how is life going?

             

            My process definition is the next, just removed the DI declarations. Both human tasks are assigned to the group "engineer" and assigned to the engineers swimlane. I'm struggling with this since a few days.

             

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

            <bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:tns="http://www.jboss.org/drools" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="Definitions_1" targetNamespace="http://www.jboss.org/drools">

              <bpmn2:process id="swimlaneTest" tns:version="1" tns:packageName="defaultPackage" name="Default Process">

                <bpmn2:laneSet id="LaneSet_1">

                  <bpmn2:lane id="ingenieros" name="engineers">

                    <bpmn2:flowNodeRef>UserTask_2</bpmn2:flowNodeRef>

                    <bpmn2:flowNodeRef>UserTask_1</bpmn2:flowNodeRef>

                  </bpmn2:lane>

                </bpmn2:laneSet>

                <bpmn2:startEvent id="StartEvent_1">

                  <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>

                </bpmn2:startEvent>

                <bpmn2:sequenceFlow id="SequenceFlow_2" tns:priority="1" sourceRef="StartEvent_1" targetRef="UserTask_1"/>

                <bpmn2:userTask id="UserTask_2" name="Final Human Task">

                  <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>

                  <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>

                  <bpmn2:ioSpecification id="_InputOutputSpecification_17">

                    <bpmn2:dataInput id="_DataInput_92" name="TaskName"/>

                    <bpmn2:dataInput id="_DataInput_93" name="Priority"/>

                    <bpmn2:dataInput id="_DataInput_94" name="Comment"/>

                    <bpmn2:dataInput id="_DataInput_95" name="GroupId"/>

                    <bpmn2:dataInput id="_DataInput_96" name="Skippable"/>

                    <bpmn2:dataInput id="_DataInput_97" name="Content"/>

                    <bpmn2:inputSet id="_InputSet_17" name="  Input Set 17">

                      <bpmn2:dataInputRefs>_DataInput_92</bpmn2:dataInputRefs>

                      <bpmn2:dataInputRefs>_DataInput_93</bpmn2:dataInputRefs>

                      <bpmn2:dataInputRefs>_DataInput_94</bpmn2:dataInputRefs>

                      <bpmn2:dataInputRefs>_DataInput_95</bpmn2:dataInputRefs>

                      <bpmn2:dataInputRefs>_DataInput_96</bpmn2:dataInputRefs>

                      <bpmn2:dataInputRefs>_DataInput_97</bpmn2:dataInputRefs>

                    </bpmn2:inputSet>

                  </bpmn2:ioSpecification>

                  <bpmn2:dataInputAssociation id="_DataInputAssociation_92">

                    <bpmn2:targetRef>_DataInput_92</bpmn2:targetRef>

                    <bpmn2:assignment id="Assignment_1">

                      <bpmn2:from xsi:type="bpmn2:tFormalExpression" id="FormalExpression_3">Final Human Task</bpmn2:from>

                      <bpmn2:to xsi:type="bpmn2:tFormalExpression" id="FormalExpression_6">_DataInput_92</bpmn2:to>

                    </bpmn2:assignment>

                  </bpmn2:dataInputAssociation>

                  <bpmn2:dataInputAssociation id="_DataInputAssociation_93">

                    <bpmn2:targetRef>_DataInput_93</bpmn2:targetRef>

                  </bpmn2:dataInputAssociation>

                  <bpmn2:dataInputAssociation id="_DataInputAssociation_94">

                    <bpmn2:targetRef>_DataInput_94</bpmn2:targetRef>

                  </bpmn2:dataInputAssociation>

                  <bpmn2:dataInputAssociation id="_DataInputAssociation_95">

                    <bpmn2:targetRef>_DataInput_95</bpmn2:targetRef>

                    <bpmn2:assignment id="Assignment_4">

                      <bpmn2:from xsi:type="bpmn2:tFormalExpression" id="FormalExpression_6">engineer</bpmn2:from>

                      <bpmn2:to xsi:type="bpmn2:tFormalExpression" id="FormalExpression_7">_DataInput_95</bpmn2:to>

                    </bpmn2:assignment>

                  </bpmn2:dataInputAssociation>

                  <bpmn2:dataInputAssociation id="_DataInputAssociation_96">

                    <bpmn2:targetRef>_DataInput_96</bpmn2:targetRef>

                  </bpmn2:dataInputAssociation>

                  <bpmn2:dataInputAssociation id="_DataInputAssociation_97">

                    <bpmn2:targetRef>_DataInput_97</bpmn2:targetRef>

                  </bpmn2:dataInputAssociation>

                </bpmn2:userTask>

                <bpmn2:sequenceFlow id="SequenceFlow_4" tns:priority="1" name="" sourceRef="UserTask_2" targetRef="EndEvent_1"/>

                <bpmn2:endEvent id="EndEvent_1">

                  <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>

                </bpmn2:endEvent>

                <bpmn2:userTask id="UserTask_1" name="First Human Task">

                  <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>

                  <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>

                  <bpmn2:ioSpecification id="_InputOutputSpecification_16">

                    <bpmn2:dataInput id="_DataInput_86" name="TaskName"/>

                    <bpmn2:dataInput id="_DataInput_87" name="Priority"/>

                    <bpmn2:dataInput id="_DataInput_88" name="Comment"/>

                    <bpmn2:dataInput id="_DataInput_89" name="GroupId"/>

                    <bpmn2:dataInput id="_DataInput_90" name="Skippable"/>

                    <bpmn2:dataInput id="_DataInput_91" name="Content"/>

                    <bpmn2:inputSet id="_InputSet_16" name="  Input Set 16">

                      <bpmn2:dataInputRefs>_DataInput_86</bpmn2:dataInputRefs>

                      <bpmn2:dataInputRefs>_DataInput_87</bpmn2:dataInputRefs>

                      <bpmn2:dataInputRefs>_DataInput_88</bpmn2:dataInputRefs>

                      <bpmn2:dataInputRefs>_DataInput_89</bpmn2:dataInputRefs>

                      <bpmn2:dataInputRefs>_DataInput_90</bpmn2:dataInputRefs>

                      <bpmn2:dataInputRefs>_DataInput_91</bpmn2:dataInputRefs>

                    </bpmn2:inputSet>

                  </bpmn2:ioSpecification>

                  <bpmn2:dataInputAssociation id="_DataInputAssociation_86">

                    <bpmn2:targetRef>_DataInput_86</bpmn2:targetRef>

                    <bpmn2:assignment id="Assignment_2">

                      <bpmn2:from xsi:type="bpmn2:tFormalExpression" id="FormalExpression_4">First Human Task</bpmn2:from>

                      <bpmn2:to xsi:type="bpmn2:tFormalExpression" id="FormalExpression_1">_DataInput_86</bpmn2:to>

                    </bpmn2:assignment>

                  </bpmn2:dataInputAssociation>

                  <bpmn2:dataInputAssociation id="_DataInputAssociation_87">

                    <bpmn2:targetRef>_DataInput_87</bpmn2:targetRef>

                  </bpmn2:dataInputAssociation>

                  <bpmn2:dataInputAssociation id="_DataInputAssociation_88">

                    <bpmn2:targetRef>_DataInput_88</bpmn2:targetRef>

                  </bpmn2:dataInputAssociation>

                  <bpmn2:dataInputAssociation id="_DataInputAssociation_89">

                    <bpmn2:targetRef>_DataInput_89</bpmn2:targetRef>

                    <bpmn2:assignment id="Assignment_3">

                      <bpmn2:from xsi:type="bpmn2:tFormalExpression" id="FormalExpression_5">engineer</bpmn2:from>

                      <bpmn2:to xsi:type="bpmn2:tFormalExpression" id="FormalExpression_2">_DataInput_89</bpmn2:to>

                    </bpmn2:assignment>

                  </bpmn2:dataInputAssociation>

                  <bpmn2:dataInputAssociation id="_DataInputAssociation_90">

                    <bpmn2:targetRef>_DataInput_90</bpmn2:targetRef>

                  </bpmn2:dataInputAssociation>

                  <bpmn2:dataInputAssociation id="_DataInputAssociation_91">

                    <bpmn2:targetRef>_DataInput_91</bpmn2:targetRef>

                  </bpmn2:dataInputAssociation>

                </bpmn2:userTask>

                <bpmn2:sequenceFlow id="SequenceFlow_3" tns:priority="1" sourceRef="UserTask_1" targetRef="UserTask_2"/>

              </bpmn2:process>

            </bpmn2:definitions>

             

            • 3. Re: Swimlanes and ActorId
              salaboy21

              Hi there,

              Swimlanes in BPMN2 just don't work like in jBPM3, are you using expressions for the assingments in each task?

              • 4. Re: Swimlanes and ActorId
                eaa

                I don't see anything wrong in your process. I think I had a similar process running fine in jBPM5.2. I'll check and let you know.

                • 5. Re: Swimlanes and ActorId
                  lucazamador

                  The tasks are assigned using the groupId, so far I can see in the bpmn file there aren't expressions involved. How is that?

                   

                  I'll give try it with a previous release

                   

                  thanks

                  • 6. Re: Swimlanes and ActorId
                    salaboy21

                    Yeah, experssions are not being used. But it could be a problem in your runtime, are you using callbacks for groups resolutions? are you not using the environment provided in the jBPM installer? is it a custom environment?

                    • 7. Re: Swimlanes and ActorId
                      salaboy21

                      If it's not working in master, a failing test will be great!

                      • 8. Re: Swimlanes and ActorId
                        lucazamador

                        Not using callbacks, is that obligatory? I was forced to upgrade from 5.2 to 5.3 and everything was working well until I tried to implement the swimlanes. I'm currently just registering the user and groups to the TaskService, the old approach.

                         

                        as far I know, there's only one simple and mocked swimlane test in master. And it works passing the ActorId to the workitemManager on complete. Not the best scenario to test, maybe later it can be improved

                         

                        regards

                        • 9. Re: Swimlanes and ActorId
                          geus

                          It seems I am facing the same issue: the groupId (e.g. "sales") of a human task is not assigned to the actual user belonging to that group (e.g. "sales-rep"). 

                           

                          This prevents this user ("sales-rep") from actually being able to claim a "sales " group task when I log on as "sales-rep" in the jbpm-console

                           

                          I found this bug https://issues.jboss.org/browse/JBPM-3401Is this the bug which is causing this? And does anybody know a workaround?

                           

                          Thanks!

                           

                          My BPMN2 proces is as follows:

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

                          <model:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.omg.org/bpmn20" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:drools="http://www.jboss.org/drools" xmlns:model="http://www.omg.org/spec/BPMN/20100524/MODEL" id="_MvBWUdytEeGjZI5cVksRYQ" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" targetNamespace="http://www.omg.org/bpmn20">

                            <model:itemDefinition id="_employeeItem" structureRef="String"/>

                            <model:process id="Test.TestBPMN" drools:packageName="Test" drools:version="2" name="TestBPMN" isExecutable="true">

                              <model:property id="employee" itemSubjectRef="_employeeItem"/>

                              <model:laneSet id="_MvB9YNytEeGjZI5cVksRYQ">

                                <model:lane id="_8C1EC1A3-BC43-4483-9E2B-7567D05BBC66" drools:bgcolor="#ffffff" drools:selectable="true" name="sales">

                                  <model:flowNodeRef>_C6A55EF5-7C66-4B7B-B8DE-68191620D936</model:flowNodeRef>

                                  <model:flowNodeRef>_7285E55F-3FC5-45DC-9628-C3203659F3A9</model:flowNodeRef>

                                  <model:flowNodeRef>_B3338629-A70B-4695-B041-F984A7377452</model:flowNodeRef>

                                </model:lane>

                              </model:laneSet>

                              <model:sequenceFlow id="_580EAA85-D258-4B3A-A172-44F797ED5B48" drools:selectable="true" sourceRef="_7285E55F-3FC5-45DC-9628-C3203659F3A9" targetRef="_C6A55EF5-7C66-4B7B-B8DE-68191620D936"/>

                              <model:sequenceFlow id="_700C3CB3-A3E4-4A97-A6FF-B62771E33F65" drools:selectable="true" sourceRef="_C6A55EF5-7C66-4B7B-B8DE-68191620D936" targetRef="_B3338629-A70B-4695-B041-F984A7377452"/>

                              

                             <model:userTask id="_C6A55EF5-7C66-4B7B-B8DE-68191620D936" drools:selectable="true" drools:taskName="whatever" drools:scriptFormat="http://www.java.com/java" name="TaskNr1">

                                <model:incoming>_580EAA85-D258-4B3A-A172-44F797ED5B48</model:incoming>

                                <model:outgoing>_700C3CB3-A3E4-4A97-A6FF-B62771E33F65</model:outgoing>

                              

                                     <model:ioSpecification id="_MvB9YdytEeGjZI5cVksRYQ">

                                  <model:dataInput id="_C6A55EF5-7C66-4B7B-B8DE-68191620D936_TaskNameInput" name="TaskName"/>

                                  <model:dataInput id="_C6A55EF5-7C66-4B7B-B8DE-68191620D936_sales=GroupIdInput" name="sales=GroupId"/>

                                  <model:dataInput id="_C6A55EF5-7C66-4B7B-B8DE-68191620D936_TaskName=whateverInput" name="TaskName=whatever"/>

                                  <model:dataInput id="_C6A55EF5-7C66-4B7B-B8DE-68191620D936_GroupIdInput" name="GroupId"/>

                                  <model:inputSet id="_MvB9YtytEeGjZI5cVksRYQ">

                                    <model:dataInputRefs>_C6A55EF5-7C66-4B7B-B8DE-68191620D936_sales=GroupIdInput</model:dataInputRefs>

                                    <model:dataInputRefs>_C6A55EF5-7C66-4B7B-B8DE-68191620D936_TaskName=whateverInput</model:dataInputRefs>

                                    <model:dataInputRefs>_C6A55EF5-7C66-4B7B-B8DE-68191620D936_GroupIdInput</model:dataInputRefs>

                                    <model:dataInputRefs>_C6A55EF5-7C66-4B7B-B8DE-68191620D936_TaskNameInput</model:dataInputRefs>

                                  </model:inputSet>

                                  <model:outputSet id="_MvB9Y9ytEeGjZI5cVksRYQ"/>

                                </model:ioSpecification>

                           

                                    <model:dataInputAssociation id="_MvB9ZNytEeGjZI5cVksRYQ">

                                  <model:targetRef>_C6A55EF5-7C66-4B7B-B8DE-68191620D936_TaskNameInput</model:targetRef>

                                  <model:assignment id="_MvB9ZdytEeGjZI5cVksRYQ">

                                    <model:from xsi:type="model:tFormalExpression" id="_MvB9ZtytEeGjZI5cVksRYQ">whatever</model:from>

                                    <model:to xsi:type="model:tFormalExpression" id="_MvB9Z9ytEeGjZI5cVksRYQ">_C6A55EF5-7C66-4B7B-B8DE-68191620D936_TaskNameInput</model:to>

                                  </model:assignment>

                                </model:dataInputAssociation>

                              

                                     <model:dataInputAssociation id="_MvB9aNytEeGjZI5cVksRYQ">

                                  <model:targetRef>_C6A55EF5-7C66-4B7B-B8DE-68191620D936_GroupIdInput</model:targetRef>

                                  <model:assignment id="_MvB9adytEeGjZI5cVksRYQ">

                                    <model:from xsi:type="model:tFormalExpression" id="_MvB9atytEeGjZI5cVksRYQ">sales</model:from>

                                    <model:to xsi:type="model:tFormalExpression" id="_MvB9a9ytEeGjZI5cVksRYQ">_C6A55EF5-7C66-4B7B-B8DE-68191620D936_GroupIdInput</model:to>

                                  </model:assignment>

                                </model:dataInputAssociation>

                            

                              </model:userTask>

                             

                            [...]

                          </model:definitions>

                          • 10. Re: Swimlanes and ActorId
                            lucazamador

                            Hi geus,

                             

                            that's a different issue. Just copy the ormTask.xml file attached to the jira ticket to your project and add it to the mapping configuration of the persistence.xml file. At least it worked for me.

                             

                            Regards

                            • 11. Re: Swimlanes and ActorId
                              a_nat

                              Hi,

                               

                              I get the same issue, has a jira been raised for this already?. If so, can I get the reference please?

                               

                              Regards,

                              • 12. Re: Swimlanes and ActorId
                                a_nat

                                Hi,

                                I raised a case myslef and here goes the details of it.

                                https://issues.jboss.org/browse/JBPM-3848

                                Regards,