Aller au contenu

« Modèle BPMN.js - Workflow avec lignes d'eau » : différence entre les versions

De Loic Wiki
Loic (discussion | contributions)
Loic (discussion | contributions)
Harmonisation du titre interne (BPMN.js)
 
(2 versions intermédiaires par le même utilisateur non affichées)
Ligne 1 : Ligne 1 :
= Modèle BPMN JS - Workflow avec lignes d'eau =
= Modèle BPMN.js - Workflow avec lignes d'eau =


== Objectif ==
== Objectif ==
Ligne 11 : Ligne 11 :
<bpmn:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<bpmn:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL"
   xmlns:bpmn="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"
   id="Definitions_1"
   id="Definitions_1"
   targetNamespace="http://bpmn.io/schema/bpmn">
   targetNamespace="http://bpmn.io/schema/bpmn">
Ligne 16 : Ligne 19 :
   <bpmn:process id="Process_Workflow" isExecutable="false">
   <bpmn:process id="Process_Workflow" isExecutable="false">
     <bpmn:laneSet id="LaneSet_1">
     <bpmn:laneSet id="LaneSet_1">
       <bpmn:lane id="Lane_User" name="Utilisateur" />
       <bpmn:lane id="Lane_User" name="Utilisateur">
       <bpmn:lane id="Lane_Service" name="Service" />
        <bpmn:flowNodeRef>StartEvent_1</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Task_Submit</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Task_CheckResult</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Task_Correct</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>EndEvent_1</bpmn:flowNodeRef>
      </bpmn:lane>
       <bpmn:lane id="Lane_Service" name="Service">
        <bpmn:flowNodeRef>Task_Validate</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Gateway_Valid</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Task_Process</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Task_Error</bpmn:flowNodeRef>
      </bpmn:lane>
     </bpmn:laneSet>
     </bpmn:laneSet>


Ligne 40 : Ligne 54 :
     <bpmn:sequenceFlow id="Flow_9" sourceRef="Task_Correct" targetRef="Task_Submit"/>
     <bpmn:sequenceFlow id="Flow_9" sourceRef="Task_Correct" targetRef="Task_Submit"/>
   </bpmn:process>
   </bpmn:process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_1">
    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_Workflow">
      <bpmndi:BPMNShape id="Lane_User_di" bpmnElement="Lane_User" isHorizontal="true"><dc:Bounds x="20" y="40" width="1060" height="180"/></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Lane_Service_di" bpmnElement="Lane_Service" isHorizontal="true"><dc:Bounds x="20" y="220" width="1060" height="180"/></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="StartEvent_1_di" bpmnElement="StartEvent_1"><dc:Bounds x="100" y="112" width="36" height="36"/></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Task_Submit_di" bpmnElement="Task_Submit"><dc:Bounds x="180" y="90" width="170" height="80"/></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Task_Validate_di" bpmnElement="Task_Validate"><dc:Bounds x="400" y="270" width="170" height="80"/></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Gateway_Valid_di" bpmnElement="Gateway_Valid" isMarkerVisible="true"><dc:Bounds x="620" y="285" width="50" height="50"/></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Task_Process_di" bpmnElement="Task_Process"><dc:Bounds x="730" y="270" width="170" height="80"/></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Task_CheckResult_di" bpmnElement="Task_CheckResult"><dc:Bounds x="930" y="90" width="130" height="80"/></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Task_Error_di" bpmnElement="Task_Error"><dc:Bounds x="730" y="370" width="170" height="80"/></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Task_Correct_di" bpmnElement="Task_Correct"><dc:Bounds x="420" y="90" width="170" height="80"/></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="EndEvent_1_di" bpmnElement="EndEvent_1"><dc:Bounds x="1080" y="112" width="36" height="36"/></bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="Flow_1_di" bpmnElement="Flow_1"><di:waypoint x="136" y="130"/><di:waypoint x="180" y="130"/></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_2_di" bpmnElement="Flow_2"><di:waypoint x="350" y="130"/><di:waypoint x="400" y="310"/></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_3_di" bpmnElement="Flow_3"><di:waypoint x="570" y="310"/><di:waypoint x="620" y="310"/></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_4_di" bpmnElement="Flow_4"><di:waypoint x="670" y="310"/><di:waypoint x="730" y="310"/></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_5_di" bpmnElement="Flow_5"><di:waypoint x="900" y="310"/><di:waypoint x="995" y="170"/></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_6_di" bpmnElement="Flow_6"><di:waypoint x="1060" y="130"/><di:waypoint x="1080" y="130"/></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_7_di" bpmnElement="Flow_7"><di:waypoint x="645" y="335"/><di:waypoint x="645" y="410"/><di:waypoint x="730" y="410"/></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_8_di" bpmnElement="Flow_8"><di:waypoint x="730" y="410"/><di:waypoint x="590" y="130"/></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_9_di" bpmnElement="Flow_9"><di:waypoint x="420" y="130"/><di:waypoint x="350" y="130"/></bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn:definitions>
</bpmn:definitions>
</syntaxhighlight>
</syntaxhighlight>


== Modèle ==  
== Modèle ==
 
<div class="oc-bpmn-container" style="width:100%; max-width:100%; overflow:auto; border:1px solid #ccc; padding:8px; box-sizing:border-box;">
<div class="oc-bpmn-container" style="width:100%; max-width:100%; overflow:auto; border:1px solid #ccc; padding:8px; box-sizing:border-box;">
   <div class="oc-bpmn-viewer" style="width:100%; height:600px; min-height:600px;"></div>
   <div class="oc-bpmn-viewer" style="width:100%; height:650px; min-height:650px;"></div>
   <pre class="oc-bpmn-xml" style="display:none;"><?xml version="1.0" encoding="UTF-8"?>
   <pre class="oc-bpmn-xml" style="display:none;"><?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<bpmn:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL"
   xmlns:bpmn="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"
   id="Definitions_1"
   id="Definitions_1"
   targetNamespace="http://bpmn.io/schema/bpmn">
   targetNamespace="http://bpmn.io/schema/bpmn">
Ligne 55 : Ligne 97 :
   <bpmn:process id="Process_Workflow" isExecutable="false">
   <bpmn:process id="Process_Workflow" isExecutable="false">
     <bpmn:laneSet id="LaneSet_1">
     <bpmn:laneSet id="LaneSet_1">
       <bpmn:lane id="Lane_User" name="Utilisateur" />
       <bpmn:lane id="Lane_User" name="Utilisateur">
       <bpmn:lane id="Lane_Service" name="Service" />
        <bpmn:flowNodeRef>StartEvent_1</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Task_Submit</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Task_CheckResult</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Task_Correct</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>EndEvent_1</bpmn:flowNodeRef>
      </bpmn:lane>
       <bpmn:lane id="Lane_Service" name="Service">
        <bpmn:flowNodeRef>Task_Validate</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Gateway_Valid</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Task_Process</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Task_Error</bpmn:flowNodeRef>
      </bpmn:lane>
     </bpmn:laneSet>
     </bpmn:laneSet>


Ligne 79 : Ligne 132 :
     <bpmn:sequenceFlow id="Flow_9" sourceRef="Task_Correct" targetRef="Task_Submit"/>
     <bpmn:sequenceFlow id="Flow_9" sourceRef="Task_Correct" targetRef="Task_Submit"/>
   </bpmn:process>
   </bpmn:process>
</bpmn:definitions>
 
  <bpmndi:BPMNDiagram id="BPMNDiagram_1">
    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_Workflow">
      <bpmndi:BPMNShape id="Lane_User_di" bpmnElement="Lane_User" isHorizontal="true"><dc:Bounds x="20" y="40" width="1060" height="180"/></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Lane_Service_di" bpmnElement="Lane_Service" isHorizontal="true"><dc:Bounds x="20" y="220" width="1060" height="180"/></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="StartEvent_1_di" bpmnElement="StartEvent_1"><dc:Bounds x="100" y="112" width="36" height="36"/></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Task_Submit_di" bpmnElement="Task_Submit"><dc:Bounds x="180" y="90" width="170" height="80"/></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Task_Validate_di" bpmnElement="Task_Validate"><dc:Bounds x="400" y="270" width="170" height="80"/></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Gateway_Valid_di" bpmnElement="Gateway_Valid" isMarkerVisible="true"><dc:Bounds x="620" y="285" width="50" height="50"/></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Task_Process_di" bpmnElement="Task_Process"><dc:Bounds x="730" y="270" width="170" height="80"/></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Task_CheckResult_di" bpmnElement="Task_CheckResult"><dc:Bounds x="930" y="90" width="130" height="80"/></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Task_Error_di" bpmnElement="Task_Error"><dc:Bounds x="730" y="370" width="170" height="80"/></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Task_Correct_di" bpmnElement="Task_Correct"><dc:Bounds x="420" y="90" width="170" height="80"/></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="EndEvent_1_di" bpmnElement="EndEvent_1"><dc:Bounds x="1080" y="112" width="36" height="36"/></bpmndi:BPMNShape>
 
      <bpmndi:BPMNEdge id="Flow_1_di" bpmnElement="Flow_1"><di:waypoint x="136" y="130"/><di:waypoint x="180" y="130"/></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_2_di" bpmnElement="Flow_2"><di:waypoint x="350" y="130"/><di:waypoint x="400" y="310"/></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_3_di" bpmnElement="Flow_3"><di:waypoint x="570" y="310"/><di:waypoint x="620" y="310"/></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_4_di" bpmnElement="Flow_4"><di:waypoint x="670" y="310"/><di:waypoint x="730" y="310"/></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_5_di" bpmnElement="Flow_5"><di:waypoint x="900" y="310"/><di:waypoint x="995" y="170"/></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_6_di" bpmnElement="Flow_6"><di:waypoint x="1060" y="130"/><di:waypoint x="1080" y="130"/></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_7_di" bpmnElement="Flow_7"><di:waypoint x="645" y="335"/><di:waypoint x="645" y="410"/><di:waypoint x="730" y="410"/></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_8_di" bpmnElement="Flow_8"><di:waypoint x="730" y="410"/><di:waypoint x="590" y="130"/></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_9_di" bpmnElement="Flow_9"><di:waypoint x="420" y="130"/><di:waypoint x="350" y="130"/></bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn:definitions></pre>
</div>
</div>
Ok?

Dernière version du 2 avril 2026 à 19:27

Modèle BPMN.js - Workflow avec lignes d'eau

Objectif

Exemple BPMN avec deux lignes d'eau :

  • Utilisateur
  • Service

XML BPMN (compatible bpmn-js)

<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:bpmn="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"
  id="Definitions_1"
  targetNamespace="http://bpmn.io/schema/bpmn">

  <bpmn:process id="Process_Workflow" isExecutable="false">
    <bpmn:laneSet id="LaneSet_1">
      <bpmn:lane id="Lane_User" name="Utilisateur">
        <bpmn:flowNodeRef>StartEvent_1</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Task_Submit</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Task_CheckResult</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Task_Correct</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>EndEvent_1</bpmn:flowNodeRef>
      </bpmn:lane>
      <bpmn:lane id="Lane_Service" name="Service">
        <bpmn:flowNodeRef>Task_Validate</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Gateway_Valid</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Task_Process</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Task_Error</bpmn:flowNodeRef>
      </bpmn:lane>
    </bpmn:laneSet>

    <bpmn:startEvent id="StartEvent_1" name="Début"/>
    <bpmn:task id="Task_Submit" name="Soumettre la demande"/>
    <bpmn:task id="Task_Validate" name="Valider la demande"/>
    <bpmn:exclusiveGateway id="Gateway_Valid" name="Données valides ?"/>
    <bpmn:task id="Task_Process" name="Traiter la demande"/>
    <bpmn:task id="Task_CheckResult" name="Consulter le résultat"/>
    <bpmn:task id="Task_Error" name="Retourner erreur"/>
    <bpmn:task id="Task_Correct" name="Corriger et renvoyer"/>
    <bpmn:endEvent id="EndEvent_1" name="Fin"/>

    <bpmn:sequenceFlow id="Flow_1" sourceRef="StartEvent_1" targetRef="Task_Submit"/>
    <bpmn:sequenceFlow id="Flow_2" sourceRef="Task_Submit" targetRef="Task_Validate"/>
    <bpmn:sequenceFlow id="Flow_3" sourceRef="Task_Validate" targetRef="Gateway_Valid"/>
    <bpmn:sequenceFlow id="Flow_4" sourceRef="Gateway_Valid" targetRef="Task_Process"/>
    <bpmn:sequenceFlow id="Flow_5" sourceRef="Task_Process" targetRef="Task_CheckResult"/>
    <bpmn:sequenceFlow id="Flow_6" sourceRef="Task_CheckResult" targetRef="EndEvent_1"/>
    <bpmn:sequenceFlow id="Flow_7" sourceRef="Gateway_Valid" targetRef="Task_Error"/>
    <bpmn:sequenceFlow id="Flow_8" sourceRef="Task_Error" targetRef="Task_Correct"/>
    <bpmn:sequenceFlow id="Flow_9" sourceRef="Task_Correct" targetRef="Task_Submit"/>
  </bpmn:process>

  <bpmndi:BPMNDiagram id="BPMNDiagram_1">
    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_Workflow">
      <bpmndi:BPMNShape id="Lane_User_di" bpmnElement="Lane_User" isHorizontal="true"><dc:Bounds x="20" y="40" width="1060" height="180"/></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Lane_Service_di" bpmnElement="Lane_Service" isHorizontal="true"><dc:Bounds x="20" y="220" width="1060" height="180"/></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="StartEvent_1_di" bpmnElement="StartEvent_1"><dc:Bounds x="100" y="112" width="36" height="36"/></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Task_Submit_di" bpmnElement="Task_Submit"><dc:Bounds x="180" y="90" width="170" height="80"/></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Task_Validate_di" bpmnElement="Task_Validate"><dc:Bounds x="400" y="270" width="170" height="80"/></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Gateway_Valid_di" bpmnElement="Gateway_Valid" isMarkerVisible="true"><dc:Bounds x="620" y="285" width="50" height="50"/></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Task_Process_di" bpmnElement="Task_Process"><dc:Bounds x="730" y="270" width="170" height="80"/></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Task_CheckResult_di" bpmnElement="Task_CheckResult"><dc:Bounds x="930" y="90" width="130" height="80"/></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Task_Error_di" bpmnElement="Task_Error"><dc:Bounds x="730" y="370" width="170" height="80"/></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Task_Correct_di" bpmnElement="Task_Correct"><dc:Bounds x="420" y="90" width="170" height="80"/></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="EndEvent_1_di" bpmnElement="EndEvent_1"><dc:Bounds x="1080" y="112" width="36" height="36"/></bpmndi:BPMNShape>

      <bpmndi:BPMNEdge id="Flow_1_di" bpmnElement="Flow_1"><di:waypoint x="136" y="130"/><di:waypoint x="180" y="130"/></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_2_di" bpmnElement="Flow_2"><di:waypoint x="350" y="130"/><di:waypoint x="400" y="310"/></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_3_di" bpmnElement="Flow_3"><di:waypoint x="570" y="310"/><di:waypoint x="620" y="310"/></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_4_di" bpmnElement="Flow_4"><di:waypoint x="670" y="310"/><di:waypoint x="730" y="310"/></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_5_di" bpmnElement="Flow_5"><di:waypoint x="900" y="310"/><di:waypoint x="995" y="170"/></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_6_di" bpmnElement="Flow_6"><di:waypoint x="1060" y="130"/><di:waypoint x="1080" y="130"/></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_7_di" bpmnElement="Flow_7"><di:waypoint x="645" y="335"/><di:waypoint x="645" y="410"/><di:waypoint x="730" y="410"/></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_8_di" bpmnElement="Flow_8"><di:waypoint x="730" y="410"/><di:waypoint x="590" y="130"/></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_9_di" bpmnElement="Flow_9"><di:waypoint x="420" y="130"/><di:waypoint x="350" y="130"/></bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn:definitions>

Modèle