-
Notifications
You must be signed in to change notification settings - Fork 49
engine
-
↳ Engine
+ new Engine(server
: IBPMNServer): Engine
Inherited from ServerComponent.constructor
Defined in src/server/ServerContext.ts:9
Parameters:
Name | Type |
---|---|
server |
IBPMNServer |
Returns: Engine
• server: any
Inherited from ServerComponent.server
Defined in src/server/ServerContext.ts:9
• get appDelegate(): any
Inherited from ServerComponent.appDelegate
Defined in src/server/ServerContext.ts:20
Returns: any
• get cache(): CacheManager
Inherited from ServerComponent.cache
Defined in src/server/ServerContext.ts:18
Returns: CacheManager
• get configuration(): any
Inherited from ServerComponent.configuration
Defined in src/server/ServerContext.ts:13
Returns: any
• get cron(): Cron
Inherited from ServerComponent.cron
Defined in src/server/ServerContext.ts:17
Returns: Cron
• get dataStore(): any
Inherited from ServerComponent.dataStore
Defined in src/server/ServerContext.ts:15
Returns: any
• get definitions(): any
Inherited from ServerComponent.definitions
Defined in src/server/ServerContext.ts:19
Returns: any
• get engine(): IEngine
Inherited from ServerComponent.engine
Defined in src/server/ServerContext.ts:16
Returns: IEngine
• get logger(): any
Inherited from ServerComponent.logger
Defined in src/server/ServerContext.ts:14
Returns: any
▸ 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(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(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(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(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(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(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(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
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›