<?xml version="1.0" encoding="UTF-8"?> 
<definitions id="Definition"
             typeLanguage="http://www.java.com/javaTypes"
             expressionLanguage="http://www.mvel.org/2.0"
             xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd"
             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">

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

  <process processType="Private" isExecutable="true" id="com.sample.evaluation" name="Evaluation" >

    <!-- process variables -->
    <property id="employee" itemSubjectRef="_employeeItem"/>

    <!-- nodes -->
    <startEvent id="_1" name="StartProcess" />
    <userTask id="_2" name="Self Evaluation" >
      <ioSpecification>
        <dataInput id="_2_CommentInput" name="Comment" />
        <dataInput id="_2_SkippableInput" name="Skippable" />
        <dataInput id="_2_ContentInput" name="Content" />
        <dataInput id="_2_TaskNameInput" name="TaskName" />
        <dataInput id="_2_PriorityInput" name="Priority" />
        <inputSet>
          <dataInputRefs>_2_CommentInput</dataInputRefs>
          <dataInputRefs>_2_SkippableInput</dataInputRefs>
          <dataInputRefs>_2_ContentInput</dataInputRefs>
          <dataInputRefs>_2_TaskNameInput</dataInputRefs>
          <dataInputRefs>_2_PriorityInput</dataInputRefs>
        </inputSet>
        <outputSet>
        </outputSet>
      </ioSpecification>
      <dataInputAssociation>
        <targetRef>_2_CommentInput</targetRef>
        <assignment>
          <from xsi:type="tFormalExpression">You need to perform a self evaluation</from>
          <to xsi:type="tFormalExpression">_2_CommentInput</to>
        </assignment>
      </dataInputAssociation>
      <dataInputAssociation>
        <targetRef>_2_SkippableInput</targetRef>
        <assignment>
          <from xsi:type="tFormalExpression">false</from>
          <to xsi:type="tFormalExpression">_2_SkippableInput</to>
        </assignment>
      </dataInputAssociation>
      <dataInputAssociation>
        <targetRef>_2_ContentInput</targetRef>
        <assignment>
          <from xsi:type="tFormalExpression"></from>
          <to xsi:type="tFormalExpression">_2_ContentInput</to>
        </assignment>
      </dataInputAssociation>
      <dataInputAssociation>
        <targetRef>_2_TaskNameInput</targetRef>
        <assignment>
          <from xsi:type="tFormalExpression">Performance Evaluation</from>
          <to xsi:type="tFormalExpression">_2_TaskNameInput</to>
        </assignment>
      </dataInputAssociation>
      <dataInputAssociation>
        <targetRef>_2_PriorityInput</targetRef>
        <assignment>
          <from xsi:type="tFormalExpression">1</from>
          <to xsi:type="tFormalExpression">_2_PriorityInput</to>
        </assignment>
      </dataInputAssociation>
      <potentialOwner>
        <resourceAssignmentExpression>
          <formalExpression>#{employee}</formalExpression>
        </resourceAssignmentExpression>
      </potentialOwner>
    </userTask>
    <parallelGateway id="_3" name="Diverge" gatewayDirection="Diverging" />
    <userTask id="_4" name="Project Manager" >
      <ioSpecification>
        <dataInput id="_4_CommentInput" name="Comment" />
        <dataInput id="_4_SkippableInput" name="Skippable" />
        <dataInput id="_4_ContentInput" name="Content" />
        <dataInput id="_4_TaskNameInput" name="TaskName" />
        <dataInput id="_4_PriorityInput" name="Priority" />
        <inputSet>
          <dataInputRefs>_4_CommentInput</dataInputRefs>
          <dataInputRefs>_4_SkippableInput</dataInputRefs>
          <dataInputRefs>_4_ContentInput</dataInputRefs>
          <dataInputRefs>_4_TaskNameInput</dataInputRefs>
          <dataInputRefs>_4_PriorityInput</dataInputRefs>
        </inputSet>
        <outputSet>
        </outputSet>
      </ioSpecification>
      <dataInputAssociation>
        <targetRef>_4_CommentInput</targetRef>
        <assignment>
          <from xsi:type="tFormalExpression">You need to perform an evaluation for employee #{employee}</from>
          <to xsi:type="tFormalExpression">_4_CommentInput</to>
        </assignment>
      </dataInputAssociation>
      <dataInputAssociation>
        <targetRef>_4_SkippableInput</targetRef>
        <assignment>
          <from xsi:type="tFormalExpression">false</from>
          <to xsi:type="tFormalExpression">_4_SkippableInput</to>
        </assignment>
      </dataInputAssociation>
      <dataInputAssociation>
        <targetRef>_4_ContentInput</targetRef>
        <assignment>
          <from xsi:type="tFormalExpression"></from>
          <to xsi:type="tFormalExpression">_4_ContentInput</to>
        </assignment>
      </dataInputAssociation>
      <dataInputAssociation>
        <targetRef>_4_TaskNameInput</targetRef>
        <assignment>
          <from xsi:type="tFormalExpression">Performance Evaluation</from>
          <to xsi:type="tFormalExpression">_4_TaskNameInput</to>
        </assignment>
      </dataInputAssociation>
      <dataInputAssociation>
        <targetRef>_4_PriorityInput</targetRef>
        <assignment>
          <from xsi:type="tFormalExpression">1</from>
          <to xsi:type="tFormalExpression">_4_PriorityInput</to>
        </assignment>
      </dataInputAssociation>
      <potentialOwner>
        <resourceAssignmentExpression>
          <formalExpression>john</formalExpression>
        </resourceAssignmentExpression>
      </potentialOwner>
    </userTask>
    <userTask id="_5" name="HR Manager" >
      <ioSpecification>
        <dataInput id="_5_CommentInput" name="Comment" />
        <dataInput id="_5_SkippableInput" name="Skippable" />
        <dataInput id="_5_ContentInput" name="Content" />
        <dataInput id="_5_TaskNameInput" name="TaskName" />
        <dataInput id="_5_PriorityInput" name="Priority" />
        <inputSet>
          <dataInputRefs>_5_CommentInput</dataInputRefs>
          <dataInputRefs>_5_SkippableInput</dataInputRefs>
          <dataInputRefs>_5_ContentInput</dataInputRefs>
          <dataInputRefs>_5_TaskNameInput</dataInputRefs>
          <dataInputRefs>_5_PriorityInput</dataInputRefs>
        </inputSet>
        <outputSet>
        </outputSet>
      </ioSpecification>
      <dataInputAssociation>
        <targetRef>_5_CommentInput</targetRef>
        <assignment>
          <from xsi:type="tFormalExpression">You need to perform an evaluation for employee #{employee}</from>
          <to xsi:type="tFormalExpression">_5_CommentInput</to>
        </assignment>
      </dataInputAssociation>
      <dataInputAssociation>
        <targetRef>_5_SkippableInput</targetRef>
        <assignment>
          <from xsi:type="tFormalExpression">false</from>
          <to xsi:type="tFormalExpression">_5_SkippableInput</to>
        </assignment>
      </dataInputAssociation>
      <dataInputAssociation>
        <targetRef>_5_ContentInput</targetRef>
        <assignment>
          <from xsi:type="tFormalExpression"></from>
          <to xsi:type="tFormalExpression">_5_ContentInput</to>
        </assignment>
      </dataInputAssociation>
      <dataInputAssociation>
        <targetRef>_5_TaskNameInput</targetRef>
        <assignment>
          <from xsi:type="tFormalExpression">Performance Evaluation</from>
          <to xsi:type="tFormalExpression">_5_TaskNameInput</to>
        </assignment>
      </dataInputAssociation>
      <dataInputAssociation>
        <targetRef>_5_PriorityInput</targetRef>
        <assignment>
          <from xsi:type="tFormalExpression">1</from>
          <to xsi:type="tFormalExpression">_5_PriorityInput</to>
        </assignment>
      </dataInputAssociation>
      <potentialOwner>
        <resourceAssignmentExpression>
          <formalExpression>mary</formalExpression>
        </resourceAssignmentExpression>
      </potentialOwner>
    </userTask>
    <parallelGateway id="_6" name="Converge" gatewayDirection="Converging" />
    <endEvent id="_7" name="EndProcess" >
        <terminateEventDefinition/>
    </endEvent>

    <!-- connections -->
    <sequenceFlow id="_1-_2" sourceRef="_1" targetRef="_2" />
    <sequenceFlow id="_2-_3" sourceRef="_2" targetRef="_3" />
    <sequenceFlow id="_3-_4" sourceRef="_3" targetRef="_4" />
    <sequenceFlow id="_3-_5" sourceRef="_3" targetRef="_5" />
    <sequenceFlow id="_4-_6" sourceRef="_4" targetRef="_6" />
    <sequenceFlow id="_5-_6" sourceRef="_5" targetRef="_6" />
    <sequenceFlow id="_6-_7" sourceRef="_6" targetRef="_7" />

  </process>

  <bpmndi:BPMNDiagram>
    <bpmndi:BPMNPlane bpmnElement="com.sample.evaluation" >
      <bpmndi:BPMNShape bpmnElement="_1" >
        <dc:Bounds x="16" y="56" width="48" height="48" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="_2" >
        <dc:Bounds x="83" y="56" width="124" height="48" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="_3" >
        <dc:Bounds x="228" y="56" width="48" height="48" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="_4" >
        <dc:Bounds x="309" y="16" width="129" height="48" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="_5" >
        <dc:Bounds x="309" y="96" width="128" height="48" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="_6" >
        <dc:Bounds x="463" y="56" width="48" height="48" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="_7" >
        <dc:Bounds x="547" y="56" width="48" height="48" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="_1-_2" >
        <di:waypoint x="40" y="80" />
        <di:waypoint x="145" y="80" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="_2-_3" >
        <di:waypoint x="145" y="80" />
        <di:waypoint x="252" y="80" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="_3-_4" >
        <di:waypoint x="252" y="80" />
        <di:waypoint x="373" y="40" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="_3-_5" >
        <di:waypoint x="252" y="80" />
        <di:waypoint x="373" y="120" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="_4-_6" >
        <di:waypoint x="373" y="40" />
        <di:waypoint x="487" y="80" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="_5-_6" >
        <di:waypoint x="373" y="120" />
        <di:waypoint x="487" y="80" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="_6-_7" >
        <di:waypoint x="487" y="80" />
        <di:waypoint x="571" y="80" />
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>

</definitions>