Hashiru BPMN v0.1.0-dev Bpmn View Source

BPMN Execution Engine

Hashiru BPMN allows you to execute any BPMN process in Elixir.

Each node in the BPMN process can be mapped to the appropriate Elixir token and added to a process. Each loaded process will be added to a Registry under the id of that process. From there they can be loaded by any node and executed by the system.

Node definitions

Each node can be represented in Elixir as a token in the following format: {:bpmn_node_type, :any_data_type}

The nodes can return one of the following sets of data:

  • {:ok, context} => The process has completed successfully and returned some data in the context
  • {:error, _message, %{field: “Error message”}} => Error in the execution of the process with message and fields
  • {:manual, _} => The process has reached an external manual activity
  • {:fatal, _} => Fatal error in the execution of the process
  • {:not_implemented} => Process reached an unimplemented section of the process-

Events


End Event

BPMN definition:

<bpmn:endEvent id="EndEvent_1s3wrav">
  <bpmn:incoming>SequenceFlow_1keu1zs</bpmn:incoming>
  <bpmn:errorEventDefinition />
</bpmn:endEvent>

Elixir token:

{:bpmn_event_end,

%{
  id: "EndEvent_1s3wrav",
  name: "END",
  incoming: ["SequenceFlow_1keu1zs"],
  definitions: [{:error_event_definition, %{}}]
}

}

Link to this section Summary

Functions

Execute a node in the process

Get a node from a process by target id

Parse a string representation of a process into an executable process representation

Release token to another target node

Link to this section Functions

Execute a node in the process

Get a node from a process by target id

Parse a string representation of a process into an executable process representation

Link to this function releaseToken(targets, context) View Source

Release token to another target node