<?xml version="1.0" encoding="UTF-8"?><bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:activiti="http://activiti.org/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" targetNamespace="http://www.intra-mart.jp/im_bpm" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <bpmn:collaboration id="Collaboration">
    <bpmn:participant id="pool_1" name="排他ゲートウェイを使用する" processRef="gateway_exclusive_gateway_process"/>
  </bpmn:collaboration>
  <bpmn:process id="gateway_exclusive_gateway_process" name="排他ゲートウェイを使用する" activiti:notUseBusinessKey="false" activiti:candidateStarterUsers="aoyagi" isExecutable="true">
    <bpmn:laneSet id="laneSet_gateway_exclusive_gateway_process">
      <bpmn:lane id="swimlane_1" name="レーン">
        <bpmn:flowNodeRef>start-event_1</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>script-task_1</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>exclusive-gateway_1</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>script-task_2</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>script-task_3</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>script-task_4</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>script-task_5</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>exclusive-gateway_2</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>script-task_6</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>end-event_1</bpmn:flowNodeRef>
      </bpmn:lane>
    </bpmn:laneSet>
    <bpmn:startEvent id="start-event_1" name="開始"/>
    <bpmn:scriptTask id="script-task_1" name="時間を取得する" activiti:color="fff9c4" activiti:autoStoreVariables="false" scriptFormat="im_javascript">    <bpmn:script><![CDATA[function run(variables, execution, entity) {
  var dateTime = new DateTime();

  entity.setVariable('hour', dateTime.hourOfDay);
}]]></bpmn:script>
</bpmn:scriptTask>
    <bpmn:exclusiveGateway id="exclusive-gateway_1" name="今何時？" default="sequence-flow_6"/>
    <bpmn:scriptTask id="script-task_2" name="お昼" activiti:color="fff9c4" activiti:autoStoreVariables="false" scriptFormat="im_javascript">    <bpmn:script><![CDATA[function run(variables, execution, entity) {
  entity.setVariable('todo', 'お昼');
}]]></bpmn:script>
</bpmn:scriptTask>
    <bpmn:scriptTask id="script-task_3" name="おやつ" activiti:color="fff9c4" activiti:autoStoreVariables="false" scriptFormat="im_javascript">    <bpmn:script><![CDATA[function run(variables, execution, entity) {
  entity.setVariable('todo', 'おやつ');
}]]></bpmn:script>
</bpmn:scriptTask>
    <bpmn:scriptTask id="script-task_4" name="仕事" activiti:color="fff9c4" activiti:autoStoreVariables="false" scriptFormat="im_javascript">    <bpmn:script><![CDATA[function run(variables, execution, entity) {
  entity.setVariable('todo', '仕事');
}]]></bpmn:script>
</bpmn:scriptTask>
    <bpmn:scriptTask id="script-task_5" name="その他" activiti:color="fff9c4" activiti:autoStoreVariables="false" scriptFormat="im_javascript">    <bpmn:script><![CDATA[function run(variables, execution, entity) {
  entity.setVariable('todo', 'その他');
}]]></bpmn:script>
</bpmn:scriptTask>
    <bpmn:exclusiveGateway id="exclusive-gateway_2"/>
    <bpmn:scriptTask id="script-task_6" name="結果を表示する" activiti:color="fff9c4" activiti:autoStoreVariables="false" scriptFormat="im_javascript">    <bpmn:script><![CDATA[function run(variables, execution, entity) {
  Debug.console('TIME:' + parseInt(entity.getVariable('hour')) + ', TODO:' + entity.getVariable('todo') + '.');

  entity.setVariable('timeAndTodo','TIME:' + parseInt(entity.getVariable('hour')) + ', TODO:' + entity.getVariable('todo') + '.');
}]]></bpmn:script>
</bpmn:scriptTask>
    <bpmn:endEvent id="end-event_1" name="終了"/>
    <bpmn:sequenceFlow id="sequence-flow_1" sourceRef="start-event_1" targetRef="script-task_1"/>
    <bpmn:sequenceFlow id="sequence-flow_2" sourceRef="script-task_1" targetRef="exclusive-gateway_1"/>
    <bpmn:sequenceFlow id="sequence-flow_3" sourceRef="exclusive-gateway_1" targetRef="script-task_2">
      <bpmn:conditionExpression xsi:type="bpmn:tExpression">${hour == 12}</bpmn:conditionExpression>
    </bpmn:sequenceFlow>
    <bpmn:sequenceFlow id="sequence-flow_4" sourceRef="exclusive-gateway_1" targetRef="script-task_3">
      <bpmn:conditionExpression xsi:type="bpmn:tExpression">${hour == 15}</bpmn:conditionExpression>
    </bpmn:sequenceFlow>
    <bpmn:sequenceFlow id="sequence-flow_5" sourceRef="exclusive-gateway_1" targetRef="script-task_4">
      <bpmn:conditionExpression xsi:type="bpmn:tExpression"><![CDATA[${(hour >= 8 && hour <= 17) && hour != 12 && hour != 15}]]></bpmn:conditionExpression>
    </bpmn:sequenceFlow>
    <bpmn:sequenceFlow id="sequence-flow_6" sourceRef="exclusive-gateway_1" targetRef="script-task_5"/>
    <bpmn:sequenceFlow id="sequence-flow_7" sourceRef="script-task_2" targetRef="exclusive-gateway_2"/>
    <bpmn:sequenceFlow id="sequence-flow_8" sourceRef="script-task_3" targetRef="exclusive-gateway_2"/>
    <bpmn:sequenceFlow id="sequence-flow_9" sourceRef="script-task_4" targetRef="exclusive-gateway_2"/>
    <bpmn:sequenceFlow id="sequence-flow_10" sourceRef="script-task_5" targetRef="exclusive-gateway_2"/>
    <bpmn:sequenceFlow id="sequence-flow_11" sourceRef="exclusive-gateway_2" targetRef="script-task_6"/>
    <bpmn:sequenceFlow id="sequence-flow_12" sourceRef="script-task_6" targetRef="end-event_1"/>
  </bpmn:process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_Collaboration">
    <bpmndi:BPMNPlane id="BPMNPlane_Collaboration" bpmnElement="Collaboration">
      <bpmndi:BPMNShape id="BPMNShape_pool_1" bpmnElement="pool_1">
        <dc:Bounds x="260" y="30" width="850" height="457"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_swimlane_1" bpmnElement="swimlane_1">
        <dc:Bounds x="290" y="30" width="820" height="457"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_start-event_1" bpmnElement="start-event_1">
        <dc:Bounds x="345" y="156" width="35" height="35"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_script-task_1" bpmnElement="script-task_1">
        <dc:Bounds x="420" y="133.5" width="100" height="80"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_exclusive-gateway_1" bpmnElement="exclusive-gateway_1">
        <dc:Bounds x="560" y="156" width="40" height="40"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_script-task_2" bpmnElement="script-task_2">
        <dc:Bounds x="660" y="40" width="100" height="80"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_script-task_3" bpmnElement="script-task_3">
        <dc:Bounds x="660" y="139" width="100" height="80"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_script-task_4" bpmnElement="script-task_4">
        <dc:Bounds x="660" y="260" width="100" height="80"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_script-task_5" bpmnElement="script-task_5">
        <dc:Bounds x="660" y="370" width="100" height="80"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_exclusive-gateway_2" bpmnElement="exclusive-gateway_2">
        <dc:Bounds x="830" y="156" width="40" height="40"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_script-task_6" bpmnElement="script-task_6">
        <dc:Bounds x="920" y="133.5" width="100" height="80"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_end-event_1" bpmnElement="end-event_1">
        <dc:Bounds x="1065" y="161" width="35" height="35"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="BPMNEdge_sequence-flow_1" bpmnElement="sequence-flow_1">
        <di:waypoint xsi:type="dc:Point" x="380" y="173.5"/>
        <di:waypoint xsi:type="dc:Point" x="420" y="173.5"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_sequence-flow_2" bpmnElement="sequence-flow_2">
        <di:waypoint xsi:type="dc:Point" x="520" y="174.63636363636363"/>
        <di:waypoint xsi:type="dc:Point" x="560" y="175.54545454545453"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_sequence-flow_3" bpmnElement="sequence-flow_3">
        <di:waypoint xsi:type="dc:Point" x="600" y="161.23076923076923"/>
        <di:waypoint xsi:type="dc:Point" x="660" y="116.92307692307693"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_sequence-flow_4" bpmnElement="sequence-flow_4">
        <di:waypoint xsi:type="dc:Point" x="600" y="176.46153846153845"/>
        <di:waypoint xsi:type="dc:Point" x="660" y="177.84615384615384"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_sequence-flow_5" bpmnElement="sequence-flow_5">
        <di:waypoint xsi:type="dc:Point" x="600" y="195.07692307692307"/>
        <di:waypoint xsi:type="dc:Point" x="668.0645161290323" y="260"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_sequence-flow_6" bpmnElement="sequence-flow_6">
        <di:waypoint xsi:type="dc:Point" x="580" y="196"/>
        <di:waypoint xsi:type="dc:Point" x="580" y="410"/>
        <di:waypoint xsi:type="dc:Point" x="660" y="410"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_sequence-flow_7" bpmnElement="sequence-flow_7">
        <di:waypoint xsi:type="dc:Point" x="760" y="114.28571428571428"/>
        <di:waypoint xsi:type="dc:Point" x="830" y="162.28571428571428"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_sequence-flow_8" bpmnElement="sequence-flow_8">
        <di:waypoint xsi:type="dc:Point" x="760" y="177.92857142857142"/>
        <di:waypoint xsi:type="dc:Point" x="830" y="176.42857142857142"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_sequence-flow_9" bpmnElement="sequence-flow_9">
        <di:waypoint xsi:type="dc:Point" x="755.1612903225806" y="260"/>
        <di:waypoint xsi:type="dc:Point" x="830" y="193.71428571428572"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_sequence-flow_10" bpmnElement="sequence-flow_10">
        <di:waypoint xsi:type="dc:Point" x="760" y="410"/>
        <di:waypoint xsi:type="dc:Point" x="850" y="410"/>
        <di:waypoint xsi:type="dc:Point" x="850" y="196"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_sequence-flow_11" bpmnElement="sequence-flow_11">
        <di:waypoint xsi:type="dc:Point" x="870" y="175.58333333333334"/>
        <di:waypoint xsi:type="dc:Point" x="920" y="174.54166666666666"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_sequence-flow_12" bpmnElement="sequence-flow_12">
        <di:waypoint xsi:type="dc:Point" x="1020" y="175.72222222222223"/>
        <di:waypoint xsi:type="dc:Point" x="1065" y="177.72222222222223"/>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn:definitions>