how to define group/role in bpmn2.0
bulejava Jan 3, 2014 11:57 AMi defined bpmn2.0 like this:
<bpmn2:userTask id="UserTask_3" name="caigou"> <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing> <bpmn2:potentialOwner id="PotentialOwner_6"> <bpmn2:resourceAssignmentExpression> <bpmn2:formalExpression id="FormalExpression_6">user</bpmn2:formalExpression> </bpmn2:resourceAssignmentExpression> </bpmn2:potentialOwner> </bpmn2:userTask>
but it is not work,the "user" is a role in jbpm5. but it skip from the condition "if (powner instanceof Group)", so i think the xml format i had define in bpmn2.0 is wrong.
what the right xml node for role /group?
List<OrganizationalEntity> potentialOwners = assignments.getPotentialOwners(); if(potentialOwners != null) { for(OrganizationalEntity powner : potentialOwners) { if(powner instanceof User) { boolean userExists = doCallbackUserOperation(powner.getId()); if (!userExists) { nonExistingEntities.add(powner); } } if(powner instanceof Group) { boolean groupExists = doCallbackGroupOperation(powner.getId()); if (!groupExists) { nonExistingEntities.add(powner); } } } if (!nonExistingEntities.isEmpty()) { potentialOwners.removeAll(nonExistingEntities); nonExistingEntities.clear(); } }
the right define :
<bpmn2:userTask id="UserTask_3" name="caigou">
<bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
<bpmn2:ioSpecification id="_InputOutputSpecification_12">
<bpmn2:dataInput id="_DataInput_15" name="GroupId"/>
</bpmn2:ioSpecification>
<bpmn2:dataInputAssociation id="DataInputAssociation_1">
<bpmn2:targetRef>_DataInput_15</bpmn2:targetRef>
<bpmn2:assignment id="Assignment_1">
<bpmn2:from xsi:type="bpmn2:tFormalExpression" id="FormalExpression_1">user</bpmn2:from>
<bpmn2:to xsi:type="bpmn2:tFormalExpression" id="FormalExpression_2">.</bpmn2:to>
</bpmn2:assignment>
</bpmn2:dataInputAssociation>
</bpmn2:userTask>
-
role.xml 6.9 KB
-
roles.properties.zip 243 bytes