This is the second day of my participation in Gwen Challenge

BPMN overview

BPMN2.0 element classification

  • Stream objects
  • Connection object
  • data
  • lane
  • Describe objects

Stream object composition

The core elements that make up the flow object

BPMN2.0 symbols and XML files

Event symbols in Chinese

Time event

  • describe

    A timer event is an event triggered by a defined timer. They can be used as start events, intermediate events, or boundary events. The behavior of time events depends on the business calendar used. Each timer event has a default business calendar, but you can also define a business calendar on the timer event definition.

  • legend

  • Expression in an XML file
  <timerEventDefinition>
    <timeDuration>${duration}</timeDuration>
  </timerEventDefinition>
Copy the code

Error events

  • describe

    BPMN error events are a way to model business exceptions.

  • legend

  • Expression in an XML file
<endEvent id="myErrorEndEvent">
  <errorEventDefinition errorRef="myError" />
</endEvent>
Copy the code

Signal events

  • describe

    A signal event is an event that refers to a named signal. Signals are globally scoped events (broadcast semantics) and are passed to all activity handlers (wait for process instance/capture signal event).

    Declare the signalEventDefinition using the signalEventDefinition element. The signalRef attribute refers to an element that signal declares as a child of the Definitions root element.

  • legend

  • Expression in an XML file
  <definitions... >
   <! -- declaration of the signal -->
	<signal id="alertSignal" name="alert" />
     <! -- signal event definition -->
   <signalEventDefinition signalRef="alertSignal" /> 
  </definitions>    
Copy the code

News events

  • describe

    A message event is an event that refers to a named message. A message has a name and a payload. Unlike signals, message events are always targeted at a single receiver.

    The messageEventDefinition element is used to declare the messageEventDefinition. The attribute messageRef refers to an element declared by Message as a child of the Definitions root element.

  • legend

  • Expression in an XML file
<messageEventDefinition messageRef="payment" />
Copy the code

Start event

No start event
  • describe

A non-startup event technically means that the trigger of an instance of the startup process is indeterminate. This means that the engine cannot predict when a process instance must be started.

  • legend

  • Expression in an XML file
<startEvent id="start" name="my start event" />
Copy the code
Timer start event
  • describe

    Timer start events are used to create process instances at a given time. It can be used either for processes that should only be started once, or for processes that should be started at specific intervals.

    * Note: * Child processes cannot have timer start events.

    * Note: * Once the process is deployed, the start timer event is scheduled.

    * Note: * When a new version of the process with a start timer event is deployed, the job corresponding to the previous timer is deleted. The reason is that you usually don’t want to automatically start a new process instance of this old version of the process.

    • legend

  • Expression in an XML file

    Example: The process will start at 12:13 on March 11, 2011, four times at 5-minute intervals

<startEvent id="theStart">
  <timerEventDefinition>
    <timeCycle>R4/2011-03-11T12:13/PT5M</timeCycle>
</timerEventDefinition>
</startEvent>
Copy the code
Message start event
  • describe

    A Message start event can be used to start A process instance with named information. This effectively allows us to use the message name to select the correct startup event from a set of alternative startup events.

    • legend

  • Expression in an XML file

        <startEvent id="messageStart" >
        	<messageEventDefinition messageRef="tns:newInvoice" />
        </startEvent>
    Copy the code
Signal initiation event
  • describe

    A signal start event can be used to start A process instance with A named signal.

  • legend

  • Expressions in XML
  <startEvent id="theStart">
    <signalEventDefinition id="theSignalEventDefinition" signalRef="theSignal"  />
  </startEvent>
Copy the code

The end of the event

No end event
  • describe

    An event with no end means that the result is thrown indeterminate when the event is reached. Therefore, the engine does nothing more than terminate the current execution path.

  • legend

  • Expressions in XML
<endEvent id="end" name="my end event" />
Copy the code
Error end event
  • describe

    When process execution reaches the error end event, the current execution path terminates and throws an error. This error can be caught by the matching intermediate boundary error event. If no matching boundary error event is found, an exception is thrown.

    • legend

  • Expressions in XML

    And the error end event is represented as the end event, with an errorEventDefinition child element.

<endEvent id="myErrorEndEvent">
  <errorEventDefinition errorRef="myError" />
</endEvent>
Copy the code
Terminating event
  • describe

    When the terminating event is reached, the current process instance or subprocess is terminated. Conceptually, the first scope (process or subprocess) is identified and terminated when the execution reaches the terminating event. Note that in BPMN 2.0, a subprocess can be an embedded subprocess, an invoke activity, an event subprocess, or a transaction subprocess. This rule generally applies: for example, when a multi-instance calls an activity or embedded subprocess, only that instance is terminated, leaving other instances and process instances unaffected.

    There is an optional attribute terminateAll that can be added. When true, the (root) process instance is terminated regardless of where the terminating event is in the process definition and whether or not it is in a subprocess (or even nested).

  • legend

  • Expressions in XML

    A terminating End event is represented as an end event with a terminateEventDefinition child element.

    Note that the terminateAll attribute is optional (false by default).

<endEvent id="myEndEvent > true"></terminateEventDefinition>
</endEvent>
Copy the code
Cancel end event
  • describe

    Cancel-end events can only be used in conjunction with BPMN transaction subprocesses. When a cancellation end event is reached, a cancellation event is thrown, which must be caught by the cancellation boundary event. The boundary event is then cancelled to cancel the transaction and trigger compensation.

  • legend

  • Expressions in XML

    A cancelEventDefinition child element is represented as a cancelEventDefinition child element.

    <endEvent id="myCancelEndEvent">
      <cancelEventDefinition />
    </endEvent>
    Copy the code