Skip to content
ralphhanna edited this page Aug 7, 2020 · 3 revisions

bpmn-serverEngine

Class: Engine

Hierarchy

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

+ new Engine(server: IBPMNServer): Engine

Inherited from ServerComponent.constructor

Defined in src/server/ServerContext.ts:9

Parameters:

Name Type
server IBPMNServer

Returns: Engine

Properties

server

server: any

Inherited from ServerComponent.server

Defined in src/server/ServerContext.ts:9

Accessors

appDelegate

get appDelegate(): any

Inherited from ServerComponent.appDelegate

Defined in src/server/ServerContext.ts:20

Returns: any


cache

get cache(): CacheManager

Inherited from ServerComponent.cache

Defined in src/server/ServerContext.ts:18

Returns: CacheManager


configuration

get configuration(): any

Inherited from ServerComponent.configuration

Defined in src/server/ServerContext.ts:13

Returns: any


cron

get cron(): Cron

Inherited from ServerComponent.cron

Defined in src/server/ServerContext.ts:17

Returns: Cron


dataStore

get dataStore(): any

Inherited from ServerComponent.dataStore

Defined in src/server/ServerContext.ts:15

Returns: any


definitions

get definitions(): any

Inherited from ServerComponent.definitions

Defined in src/server/ServerContext.ts:19

Returns: any


engine

get engine(): IEngine

Inherited from ServerComponent.engine

Defined in src/server/ServerContext.ts:16

Returns: IEngine


logger

get logger(): any

Inherited from ServerComponent.logger

Defined in src/server/ServerContext.ts:14

Returns: any

Methods

get

get(instanceQuery: any, listener: EventEmitter): Promise‹ExecutionContext

Defined in src/server/Engine.ts:66

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

this will also resume execution

Parameters:

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

Returns: Promise‹ExecutionContext


invoke

invoke(itemQuery: any, data: object, listener: EventEmitter): Promise‹ExecutionContext

Defined in src/server/Engine.ts:118

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 Description
itemQuery any - criteria to retrieve the item
data object {}
listener EventEmitter null -

Returns: Promise‹ExecutionContext


invokeItem

invokeItem(itemQuery: any, data: object, listener: EventEmitter): Promise‹ExecutionContext

Defined in src/server/Engine.ts:102

Parameters:

Name Type Default
itemQuery any -
data object {}
listener EventEmitter null

Returns: Promise‹ExecutionContext


restore

restore(instanceQuery: any, listener: EventEmitter): Promise‹ExecutionContext

Defined in src/server/Engine.ts:71

Parameters:

Name Type Default
instanceQuery any -
listener EventEmitter null

Returns: Promise‹ExecutionContext


start

start(name: any, data: any, listener: EventEmitter, startNodeId: string, options: object): Promise‹ExecutionContext

Defined in src/server/Engine.ts:18

loads a definitions  and start execution

Parameters:

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

Returns: Promise‹ExecutionContext


startEvent

startEvent(instanceId: any, elementId: any, data: object, listener: EventEmitter): Promise‹ExecutionContext

Defined in src/server/Engine.ts:168

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 Default Description
instanceId any - -
elementId any - -
data object {}
listener EventEmitter null -

Returns: Promise‹ExecutionContext


throwMessage

throwMessage(messageId: any, data: object, matchingQuery: object, listener: EventEmitter): Promise‹ExecutionContext

Defined in src/server/Engine.ts:192

Parameters:

Name Type Default
messageId any -
data object {}
matchingQuery object {}
listener EventEmitter null

Returns: Promise‹ExecutionContext


throwSignal

throwSignal(messageId: any, data: object, matchingQuery: object, listener: EventEmitter): Promise‹ExecutionContext

Defined in src/server/Engine.ts:234

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 Default Description
messageId any - the id of the message or signal as per bpmn definition
data object {} message data
matchingQuery object {} should match the itemKey (if specified)
listener EventEmitter null -

Returns: Promise‹ExecutionContext

Clone this wiki locally