Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:rule:conditional_event_collaboration [2024-08-28 19:19] – [Notes] Anatoly Belaychuken:rule:conditional_event_collaboration [2024-08-28 20:56] (current) – [See also] Anatoly Belaychuk
Line 1: Line 1:
-====== 0-TBD Use conditional event to model collaboration ======+====== Use conditional event to model collaboration ======
  
 {{tag>collaboration conditional_event message_event intermediate_event}} {{tag>collaboration conditional_event message_event intermediate_event}}
- 
-{{en:underconstruction.png?nolink&200|}} 
  
 The message event creates a tight connection between processes: the sender process must know the internals of the receiver. The message event creates a tight connection between processes: the sender process must know the internals of the receiver.
Line 681: Line 679:
 ===== Notes ===== ===== Notes =====
  
-===== Примечания =====+There is no significant difference between two models as long as excactly one process issues invoices. 
 +The event-message scheme may look preferable since it more clearly shows the collaboration mechanism.
  
-Пока счета выставляет один процессбольшой разницы между схемами с событием-сообщением и событием-условием нет+The situation changes if that the company has different sales processes for different product lines (goodsservices) or channels (retail, partner, online). 
-Схема с событием-сообщением даже выглядит предпочтительнеепоскольку более наглядно показывает механизм взаимодействия между процессами.+In this case, the logic of the bank statement processing process becomes too complicated: 
 +it will need a gateway to send a message to the process from which this specific invoice has come
 +If a new variation of sales process emergesthe statement processing process should be modified.
  
-Ситуация меняется, если принять реалистичное допущение, что у компании несколько процессов продажи: товаров, услуг, розничная, партнерская и т.п+The conditional event eliminates this dependency
-В этом случае логика процесса обработки выписки банка сильно усложнится +Now the processes don't need to know anything about each other's internals, only about the datastore serving as the the common interface:
-в него придется добавить развилку, которая будет отправлять сообщение в тот процесс, из которого пришел данный конкретный счет. +
-При добавлении нового процесса продажи в процесс обработки выписки придется вносить изменения.+
  
-Событие-условие позволяет избавиться от этой зависимости. +* the client process (Order to pay) adds a record to the database table (Invoices) and waits until the value of the "status" field of this record changes to the required one (paid) 
-Здесь процессам не требуется ничего не знать о внутреннем устройстве друг другадостаточно интерфейса, роль которого играет хранилище данных:+* the server process (Bank statement processing) searches the database table for the record to which the payment refersand changes the status to "paid" 
 +* the client process awakens and continues working
  
-  * процесс-клиент (От заказа до оплаты) добавляет запись в таблицу базу данных (Выставленные счета) и ждет, пока значение поля "статус" этой записи изменится на требуемый (оплачен) +There may be unlimited number of client and server processes.
-  * процесс-сервер (Обработка выписки банка), обрабатывая очередную строку, ищет среди выставленных счетов тот, на который ссылается платеж, и меняет статус найденного счета на "оплачен" +
-  * процесс-клиент выходит из ожидания и продолжает работу+
  
-Процессов-клиентов и процессов-серверов при этом может быть сколько угодно. +In the case of an executable process model, the event message will be automatically processed by the engine
- +If the process engine does not support a conditional eventit can be easily replaced with a combination of an exclusive gateway and a timer:
-В случае исполняемой модели процесса событие-сообщение должно автоматически обрабатываться движком+
-Если процессный движок не поддерживает событие-условиеего легко заменить комбинацией развилки "или-или" и таймера:+
  
 <bpmnio type="bpmn"> <bpmnio type="bpmn">
Line 707: Line 703:
 <definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="sid-38422fae-e03e-43a3-bef4-bd33b32041b2" targetNamespace="http://bpmn.io/bpmn" exporter="http://bpmn.io" exporterVersion="0.10.1"> <definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="sid-38422fae-e03e-43a3-bef4-bd33b32041b2" targetNamespace="http://bpmn.io/bpmn" exporter="http://bpmn.io" exporterVersion="0.10.1">
   <process id="Process_1" isExecutable="false">   <process id="Process_1" isExecutable="false">
-    <exclusiveGateway id="Gateway_04akzo7" name="Статус счета &#39;оплачен&#39;?"> +    <exclusiveGateway id="Gateway_04akzo7" name="Invoice status is &#39;paid&#39;?"> 
-      <incoming>Flow_03g3aas</incoming>+      <incoming>Flow_158maf0</incoming>
       <outgoing>Flow_0kylthe</outgoing>       <outgoing>Flow_0kylthe</outgoing>
       <outgoing>Flow_14u27z9</outgoing>       <outgoing>Flow_14u27z9</outgoing>
Line 715: Line 711:
       <incoming>Flow_0kylthe</incoming>       <incoming>Flow_0kylthe</incoming>
     </task>     </task>
-    <sequenceFlow id="Flow_0kylthe" name="да" sourceRef="Gateway_04akzo7" targetRef="Activity_03e92gq" />+    <sequenceFlow id="Flow_0kylthe" name="yes" sourceRef="Gateway_04akzo7" targetRef="Activity_03e92gq" />
     <task id="Activity_0t18jdq" name="...">     <task id="Activity_0t18jdq" name="...">
-      <outgoing>Flow_1uuhvx4</outgoing>+      <outgoing>Flow_1afx0lh</outgoing>
     </task>     </task>
-    <sequenceFlow id="Flow_1uuhvx4" sourceRef="Activity_0t18jdq" targetRef="Gateway_1x8erx9" /> 
     <intermediateCatchEvent id="Event_1dsja6c">     <intermediateCatchEvent id="Event_1dsja6c">
       <incoming>Flow_14u27z9</incoming>       <incoming>Flow_14u27z9</incoming>
-      <outgoing>Flow_1hwxgqr</outgoing>+      <incoming>Flow_1afx0lh</incoming> 
 +      <outgoing>Flow_158maf0</outgoing>
       <timerEventDefinition id="TimerEventDefinition_0s6iums" />       <timerEventDefinition id="TimerEventDefinition_0s6iums" />
     </intermediateCatchEvent>     </intermediateCatchEvent>
-    <exclusiveGateway id="Gateway_1x8erx9"+    <sequenceFlow id="Flow_14u27z9name="no" sourceRef="Gateway_04akzo7" targetRef="Event_1dsja6c" /> 
-      <incoming>Flow_1uuhvx4</incoming> +    <sequenceFlow id="Flow_158maf0" sourceRef="Event_1dsja6c" targetRef="Gateway_04akzo7" /> 
-      <incoming>Flow_1hwxgqr</incoming> +    <sequenceFlow id="Flow_1afx0lh" sourceRef="Activity_0t18jdq" targetRef="Event_1dsja6c" />
-      <outgoing>Flow_03g3aas</outgoing> +
-    </exclusiveGateway> +
-    <sequenceFlow id="Flow_03g3aas" sourceRef="Gateway_1x8erx9" targetRef="Gateway_04akzo7" /> +
-    <sequenceFlow id="Flow_14u27z9" name="нет" sourceRef="Gateway_04akzo7" targetRef="Event_1dsja6c" /> +
-    <sequenceFlow id="Flow_1hwxgqr" sourceRef="Event_1dsja6c" targetRef="Gateway_1x8erx9" />+
   </process>   </process>
   <bpmndi:BPMNDiagram id="BPMNDiagram_1">   <bpmndi:BPMNDiagram id="BPMNDiagram_1">
Line 742: Line 733:
         </bpmndi:BPMNLabel>         </bpmndi:BPMNLabel>
       </bpmndi:BPMNShape>       </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape id="Event_1qdilzi_di" bpmnElement="Event_1dsja6c"> +      <bpmndi:BPMNShape id="Activity_03e92gq_di" bpmnElement="Activity_03e92gq"> 
-        <omgdc:Bounds x="262" y="22" width="36" height="36" />+        <omgdc:Bounds x="360" y="90" width="100" height="80/> 
 +        <bpmndi:BPMNLabel />
       </bpmndi:BPMNShape>       </bpmndi:BPMNShape>
       <bpmndi:BPMNShape id="Activity_0t18jdq_di" bpmnElement="Activity_0t18jdq">       <bpmndi:BPMNShape id="Activity_0t18jdq_di" bpmnElement="Activity_0t18jdq">
Line 749: Line 741:
         <bpmndi:BPMNLabel />         <bpmndi:BPMNLabel />
       </bpmndi:BPMNShape>       </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape id="Gateway_1x8erx9_di" bpmnElement="Gateway_1x8erx9" isMarkerVisible="true"> +      <bpmndi:BPMNShape id="Event_1qdilzi_di" bpmnElement="Event_1dsja6c"> 
-        <omgdc:Bounds x="175" y="105" width="50" height="50/> +        <omgdc:Bounds x="182" y="112" width="36" height="36" />
-      </bpmndi:BPMNShape> +
-      <bpmndi:BPMNShape id="Activity_03e92gq_di" bpmnElement="Activity_03e92gq"> +
-        <omgdc:Bounds x="360" y="90" width="100" height="80" /> +
-        <bpmndi:BPMNLabel />+
       </bpmndi:BPMNShape>       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="Flow_0kylthe_di" bpmnElement="Flow_0kylthe">       <bpmndi:BPMNEdge id="Flow_0kylthe_di" bpmnElement="Flow_0kylthe">
Line 762: Line 750:
           <omgdc:Bounds x="324" y="112" width="17" height="14" />           <omgdc:Bounds x="324" y="112" width="17" height="14" />
         </bpmndi:BPMNLabel>         </bpmndi:BPMNLabel>
-      </bpmndi:BPMNEdge> 
-      <bpmndi:BPMNEdge id="Flow_1uuhvx4_di" bpmnElement="Flow_1uuhvx4"> 
-        <di:waypoint x="130" y="130" /> 
-        <di:waypoint x="175" y="130" /> 
-      </bpmndi:BPMNEdge> 
-      <bpmndi:BPMNEdge id="Flow_03g3aas_di" bpmnElement="Flow_03g3aas"> 
-        <di:waypoint x="225" y="130" /> 
-        <di:waypoint x="255" y="130" /> 
       </bpmndi:BPMNEdge>       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="Flow_14u27z9_di" bpmnElement="Flow_14u27z9">       <bpmndi:BPMNEdge id="Flow_14u27z9_di" bpmnElement="Flow_14u27z9">
         <di:waypoint x="280" y="105" />         <di:waypoint x="280" y="105" />
-        <di:waypoint x="280" y="58" />+        <di:waypoint x="280" y="70" /> 
 +        <di:waypoint x="200" y="70" /> 
 +        <di:waypoint x="200" y="112" />
         <bpmndi:BPMNLabel>         <bpmndi:BPMNLabel>
-          <omgdc:Bounds x="289" y="79" width="13" height="14" />+          <omgdc:Bounds x="293" y="73" width="13" height="14" />
         </bpmndi:BPMNLabel>         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>       </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge id="Flow_1hwxgqr_di" bpmnElement="Flow_1hwxgqr"> +      <bpmndi:BPMNEdge id="Flow_158maf0_di" bpmnElement="Flow_158maf0"> 
-        <di:waypoint x="262" y="40" /> +        <di:waypoint x="218" y="130" /> 
-        <di:waypoint x="200" y="40" /> +        <di:waypoint x="255" y="130" /> 
-        <di:waypoint x="200" y="105" />+      </bpmndi:BPMNEdge> 
 +      <bpmndi:BPMNEdge id="Flow_1afx0lh_di" bpmnElement="Flow_1afx0lh"> 
 +        <di:waypoint x="130" y="130" /> 
 +        <di:waypoint x="182" y="130" />
       </bpmndi:BPMNEdge>       </bpmndi:BPMNEdge>
     </bpmndi:BPMNPlane>     </bpmndi:BPMNPlane>
Line 788: Line 773:
 </bpmnio> </bpmnio>
  
-В случае неисполняемой модели событие-условие моделирует действия сотрудникакоторый периодически нажимает клавишу F5 на странице информационной системы,  +In the case of a non-executable modelthe conditional event models an employee periodically pressing the F5 key  
-отображающей перечень выставленных счетов с их статусом.+on the automated system page displaying a list of issued invoices together with status.
  
 ===== Exceptions ===== ===== Exceptions =====
  
-  * Exceptions, if any +Collaboration via event message is acceptable if it involves exactly two processes.
 ===== See also ===== ===== See also =====
  
-  * References to similar rules (optional)+  * [[external_event]] 
 +  * [[event_gateway_warning]] 
 +  * [[collapsed_subprocess]] 
 +  * [[single_process]]
  
 ===== Author(s) ===== ===== Author(s) =====
  
-Signature + --- //[[user:bell|Anatoly Belaychuk]] 2024-08-28 19:36//