libSmalldb  v0.7
Static Public Member Functions | Static Protected Member Functions | List of all members
BpmnReader Class Reference

Description

BPMN reader.

Read BPMN diagram and create state machine which implements given business proces. When multiple BPMN loaders used, the final state machine will implement all of the business processes.

The first step is to load all BPMN diagrams, but not to update state machine definition. The second step is performed during machine definition postprocessing, when all BPMN diagrams are combined together and state machine definition is generated.

Options:

See also
https://camunda.org/bpmn/tool/

Inheritance diagram for BpmnReader

Static Public Member Functions

static loadString ($machine_type, $data_string, $options=[], $filename=null)
 Parse string and return fragment of state machine definition. More...
 
static postprocessDefinition ($machine_type, &$machine_def, &$errors)
 If reader was invoked, it may need to postprocess the definition when everything is loaded (after last loadString call is completed). More...
 

Static Protected Member Functions

static inferStateMachine ($prefix, $fragment_file, &$fragment, &$errors)
 
static renderBpmn ($prefix, $fragment_file, $fragment, $errors, $extra_vars)
 
static renderBpmnJson ($prefix, $fragment_file, $fragment, $errors, $extra_vars)
 

Member Function Documentation

static loadString (   $machine_type,
  $data_string,
  $options = [],
  $filename = null 
)
static

Parse string and return fragment of state machine definition.

Parameters
$machine_type- Name of state machine (for better error messages)
$data_string- Data to parse.
$options- Additional options specified in master definition.
$filename- Name of the file (or similar identifier) - only for debug messages.
Returns
array - Fragment of machine definition.

Implements IMachineDefinitionReader.

static postprocessDefinition (   $machine_type,
$machine_def,
$errors 
)
static

If reader was invoked, it may need to postprocess the definition when everything is loaded (after last loadString call is completed).

Postprocessing is invoked only once, even when loadString has been invoked multiple times.

Parameters
$machine_type- Name of state machine (for better error messages)
$machine_def- Machine definition to be processed in place.
$errors- List of errors in state machine definition. Errors may be specified in the diagram as well.
Returns
bool True when machine is successfully loaded, false otherwise.

Implements IMachineDefinitionReader.