Skip to content
ralphhanna edited this page Dec 18, 2023 · 3 revisions

bpmn-server / Engine

Class: Engine

super class for various objects that are part of the server

Hierarchy

Implements

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new Engine(server): Engine

Parameters

Name Type
server any

Returns

Engine

Overrides

ServerComponent.constructor

Defined in

server/Engine.ts:12

Properties

server

server: any

Inherited from

ServerComponent.server

Defined in

server/ServerComponent.ts:9

Accessors

appDelegate

get appDelegate(): any

Returns

any

Inherited from

ServerComponent.appDelegate

Defined in

server/ServerComponent.ts:18


cache

get cache(): CacheManager

Returns

CacheManager

Inherited from

ServerComponent.cache

Defined in

server/ServerComponent.ts:17


configuration

get configuration(): any

Returns

any

Inherited from

ServerComponent.configuration

Defined in

server/ServerComponent.ts:14


cron

get cron(): Cron

Returns

Cron

Inherited from

ServerComponent.cron

Defined in

server/ServerComponent.ts:16


dataStore

get dataStore(): any

Returns

any

Inherited from

ServerComponent.dataStore

Defined in

server/ServerComponent.ts:20


definitions

get definitions(): any

Returns

any

Inherited from

ServerComponent.definitions

Defined in

server/ServerComponent.ts:21


engine

get engine(): IEngine

Returns

IEngine

Inherited from

ServerComponent.engine

Defined in

server/ServerComponent.ts:19


listener

get listener(): any

Returns

any

Inherited from

ServerComponent.listener

Defined in

server/ServerComponent.ts:22


logger

get logger(): any

Returns

any

Inherited from

ServerComponent.logger

Defined in

server/ServerComponent.ts:15

Methods

assign

assign(itemQuery, data?, assignment?, userName, options?): Promise<Execution>

update an existing item that is in a wait state with an assignment can modify data or assignment or both


Parameters

Name Type Description
itemQuery any criteria to retrieve the item
data Object
assignment Object -
userName string -
options Object -

Returns

Promise<Execution>

Implementation of

IEngine.assign

Defined in

server/Engine.ts:173


get

get(instanceQuery): Promise<Execution>

restores an instance into memeory or provides you access to a running instance

this will also resume execution

Parameters

Name Type Description
instanceQuery any criteria to fetch the instance query example: { id: instanceId} { data: {caseId: 1005}} { items.item.id : 'abcc111322'} { items.item.itemKey : 'businesskey here'}

Returns

Promise<Execution>

Implementation of

IEngine.get

Defined in

server/Engine.ts:85


invoke

invoke(itemQuery, data?, userName?, options?): Promise<Execution>

Continue an existing item that is in a wait state


scenario: itemId {itemId: value } itemKey {itemKey: value} instance,task {instanceId: instanceId, elementId: value }

Parameters

Name Type Default value Description
itemQuery any undefined criteria to retrieve the item
data Object {}
userName string null -
options Object {} -

Returns

Promise<Execution>

Implementation of

IEngine.invoke

Defined in

server/Engine.ts:214


invokeItem

invokeItem(itemQuery, data?): Promise<Execution>

Parameters

Name Type
itemQuery any
data Object

Returns

Promise<Execution>

Defined in

server/Engine.ts:160


start

start(name, data?, startNodeId?, userName?, options?): Promise<Execution>

loads a definitions and start execution

Parameters

Name Type Default value Description
name any undefined name of the process to start
data any {} input data
startNodeId string null in process has multiple start node; you need to specify which one
userName string null -
options Object {} -

Returns

Promise<Execution>

Implementation of

IEngine.start

Defined in

server/Engine.ts:23


startEvent

startEvent(instanceId, elementId, data?): Promise<Execution>

Invoking an event (usually start event of a secondary process) against an existing instance or Invoking a start event (of a secondary process) against an existing instance

 instance,task 
	{instanceId: instanceId, elementId: value } 

Parameters

Name Type
instanceId any
elementId any
data Object

Returns

Promise<Execution>

Implementation of

IEngine.startEvent

Defined in

server/Engine.ts:312


startRepeatTimerEvent

startRepeatTimerEvent(instanceId, prevItem, data?, options?): Promise<Execution>

Repeat Timers need to create new Item

Parameters

Name Type
instanceId any
prevItem any
data Object
options Object

Returns

Promise<Execution>

Implementation of

IEngine.startRepeatTimerEvent

Defined in

server/Engine.ts:275


throwMessage

throwMessage(messageId, data?, matchingQuery?): Promise<Execution>

signal/message raise a signal or throw a message

will seach for a matching event/task given the signalId/messageId

that can be againt a running instance or it may start a new instance

Parameters

Name Type Description
messageId any the id of the message or signal as per bpmn definition
data Object message data
matchingQuery Object -

Returns

Promise<Execution>

Implementation of

IEngine.throwMessage

Defined in

server/Engine.ts:336


throwSignal

throwSignal(signalId, data?, matchingQuery?): Promise<any[]>

signal/message raise a signal or throw a message

will seach for a matching event/task given the signalId/messageId

that can be againt a running instance or it may start a new instance

Parameters

Name Type Description
signalId any -
data Object message data
matchingQuery Object should match the itemKey (if specified)

Returns

Promise<any[]>

Implementation of

IEngine.throwSignal

Defined in

server/Engine.ts:393

Clone this wiki locally