Skip to content

bpmn-server / BehaviourLoader

Class: BehaviourLoader#

Table of contents#

Constructors#

Properties#

Methods#

Constructors#

constructor#

new BehaviourLoader(): BehaviourLoader

Returns#

BehaviourLoader

Properties#

behaviours#

Static behaviours: ({ name: string = Behaviour_names.CamundaFormData; funct: (node: any, def: any) => CamundaFormData } | { name: string = Behaviour_names.SignalEventDefinition; funct: (node: any, def: any) => SignalEventBehaviour } | { name: string = Behaviour_names.CamundaScript2; funct: (node: any, def: any) => ScriptBehaviour } | { name: string = Behaviour_names.TerminateEventDefinition; funct: (node: any, def: any) => TerminateBehaviour })[]

Defined in#

elements/behaviours/BehaviourLoader.ts:36

Methods#

register#

register(name, funct): void

Parameters#

Name Type
name any
funct any

Returns#

void

Defined in#

elements/behaviours/BehaviourLoader.ts:114


load#

load(node): void

1. Load behaviours from node definition#

node.definition[<name>]

2. Load behaviours from node definition.eventDefinitions#

node.definition.eventDefinitions
         $type == <name>
example:

       <bpmn:timerEventDefinition id="TimerEventDefinition_07xu06a">
          <bpmn:timeDuration xsi:type="bpmn:tExpression">PT2S</bpmn:timeDuration>
       </bpmn:timerEventDefinition>
 ```
 #### 3. Load behaviours from node definition.extensionElements

```ts
node.definitions.extensionElements
         $type == <name>
example:

'camunda:formData'
   <extensionElements>
       <camunda:formData >
           <camunda: formField id = "surname" label = "Surname" type = "string" />
               <camunda: formField id = "givenName" label = "Given name" type = "string" />
       </camunda:formData>
   < /extensionElements>

Parameters#

Name Type
node Node

Returns#

void

Defined in#

elements/behaviours/BehaviourLoader.ts:156