bpmn-server / Execution
Class: Execution#
is accessed two ways: execute - start process signal - invoke a node (userTask, event, etc.)
Hierarchy#
↳ Execution
Implements#
Table of contents#
Constructors#
Properties#
- instance
- tokens
- definition
- process
- errors
- item
- messageMatchingKey
- worker
- userName
- promises
- servicesProvider
- isLocked
- options
- operation
- uids
- server
Accessors#
- id
- name
- status
- execution
- listener
- configuration
- logger
- cron
- cache
- appDelegate
- engine
- dataStore
- definitions
Methods#
- tillDone
- getNodeById
- getToken
- tokenEnded
- end
- terminate
- stop
- execute
- assign
- signalItem
- restart
- signalEvent
- signalRepeatTimerEvent
- save
- getItems
- getItemsData
- getState
- findSavePoint
- restore
- restored
- resume
- report
- formatDate
- getNewId
- getUUID
- doExecutionEvent
- doItemEvent
- log
- logS
- logE
- info
- error
- appendData
- getData
Constructors#
constructor#
• new Execution(server
, name
, source
, state?
): Execution
Parameters#
Name | Type | Default value | Description |
---|---|---|---|
server |
any |
undefined |
- |
name |
string |
undefined |
process name |
source |
any |
undefined |
bpmn source |
state |
any |
null |
- |
Returns#
Overrides#
Defined in#
Properties#
instance#
• instance: InstanceObject
Implementation of#
Defined in#
tokens#
• tokens: Map
\<any
, any
>
Implementation of#
Defined in#
definition#
• definition: IDefinition
Implementation of#
Defined in#
process#
• process: Process
Implementation of#
Defined in#
errors#
• errors: any
Implementation of#
Defined in#
item#
• item: any
Implementation of#
Defined in#
messageMatchingKey#
• messageMatchingKey: any
Implementation of#
Defined in#
worker#
• worker: any
Implementation of#
Defined in#
userName#
• userName: any
Implementation of#
Defined in#
promises#
• promises: any
[] = []
Implementation of#
Defined in#
servicesProvider#
• servicesProvider: any
Defined in#
isLocked#
• isLocked: boolean
= false
Implementation of#
Defined in#
options#
• options: any
Implementation of#
Defined in#
operation#
• operation: any
Defined in#
uids#
• uids: Object
= {}
Implementation of#
Defined in#
server#
• server: any
Implementation of#
Inherited from#
Defined in#
Accessors#
id#
• get
id(): any
Returns#
any
Implementation of#
Defined in#
name#
• get
name(): any
Returns#
any
Implementation of#
Defined in#
status#
• get
status(): EXECUTION_STATUS
Returns#
Implementation of#
Defined in#
execution#
• get
execution(): this
Returns#
this
Defined in#
listener#
• get
listener(): any
Returns#
any
Implementation of#
Overrides#
ServerComponent.listener
Defined in#
configuration#
• get
configuration(): any
Returns#
any
Implementation of#
Inherited from#
ServerComponent.configuration
Defined in#
logger#
• get
logger(): any
Returns#
any
Implementation of#
Inherited from#
ServerComponent.logger
Defined in#
cron#
• get
cron(): Cron
Returns#
Implementation of#
Inherited from#
ServerComponent.cron
Defined in#
cache#
• get
cache(): CacheManager
Returns#
Implementation of#
Inherited from#
ServerComponent.cache
Defined in#
appDelegate#
• get
appDelegate(): any
Returns#
any
Implementation of#
Inherited from#
ServerComponent.appDelegate
Defined in#
engine#
• get
engine(): IEngine
Returns#
Implementation of#
Inherited from#
ServerComponent.engine
Defined in#
dataStore#
• get
dataStore(): any
Returns#
any
Implementation of#
Inherited from#
ServerComponent.dataStore
Defined in#
definitions#
• get
definitions(): any
Returns#
any
Implementation of#
Inherited from#
ServerComponent.definitions
Defined in#
Methods#
tillDone#
▸ tillDone(): Promise
\<Execution
>
Returns#
Promise
\<Execution
>
Defined in#
getNodeById#
▸ getNodeById(id
): Node
Parameters#
Name | Type |
---|---|
id |
any |
Returns#
Implementation of#
Defined in#
getToken#
▸ getToken(id
): Token
Parameters#
Name | Type |
---|---|
id |
number |
Returns#
Implementation of#
Defined in#
tokenEnded#
▸ tokenEnded(token
): void
Parameters#
Name | Type |
---|---|
token |
Token |
Returns#
void
Implementation of#
Defined in#
end#
▸ end(): Promise
\<void
>
Returns#
Promise
\<void
>
Implementation of#
Defined in#
terminate#
▸ terminate(): void
causes the execution to stop from running any further
Returns#
void
Implementation of#
Defined in#
stop#
▸ stop(): void
causes the execution to stop from running any further
Returns#
void
Implementation of#
Defined in#
execute#
▸ execute(startNodeId?
, inputData?
, options?
): Promise
\<void
>
Parameters#
Name | Type | Default value |
---|---|---|
startNodeId |
any |
null |
inputData |
Object |
{} |
options |
Object |
{} |
Returns#
Promise
\<void
>
Implementation of#
Defined in#
assign#
▸ assign(executionId
, inputData
, assignment?
, userName
, options?
): Promise
\<void
>
Parameters#
Name | Type |
---|---|
executionId |
any |
inputData |
any |
assignment |
Object |
userName |
any |
options |
Object |
Returns#
Promise
\<void
>
Defined in#
signalItem#
▸ signalItem(itemId
, inputData
, userName
, options?
): Promise
\<IExecution
>
invoke scenarios: itemId elementId - but only one is active elementId - for a startEvent in a secondary process
Parameters#
Name | Type |
---|---|
itemId |
any |
inputData |
any |
userName |
any |
options |
Object |
Returns#
Promise
\<IExecution
>
Implementation of#
Defined in#
restart#
▸ restart(itemId
, inputData
, userName
, options?
): Promise
\<IExecution
>
restarting an already completed instance at a particular node
Parameters#
Name | Type |
---|---|
itemId |
any |
inputData |
any |
userName |
any |
options |
Object |
Returns#
Promise
\<IExecution
>
Defined in#
signalEvent#
▸ signalEvent(executionId
, inputData
, userName
, options?
): Promise
\<IExecution
>
Parameters#
Name | Type |
---|---|
executionId |
any |
inputData |
any |
userName |
any |
options |
Object |
Returns#
Promise
\<IExecution
>
Implementation of#
Defined in#
signalRepeatTimerEvent#
▸ signalRepeatTimerEvent(executionId
, prevItem
, inputData
, options?
): Promise
\<IExecution
>
Parameters#
Name | Type |
---|---|
executionId |
any |
prevItem |
any |
inputData |
any |
options |
Object |
Returns#
Promise
\<IExecution
>
Implementation of#
IExecution.signalRepeatTimerEvent
Defined in#
save#
▸ save(): Promise
\<void
>
Returns#
Promise
\<void
>
Implementation of#
Defined in#
getItems#
▸ getItems(): Item
[]
Returns#
Item
[]
Implementation of#
Defined in#
getItemsData#
▸ getItemsData(): any
[]
Returns#
any
[]
Implementation of#
Defined in#
getState#
▸ getState(): IInstanceData
Returns#
Implementation of#
Defined in#
findSavePoint#
▸ findSavePoint(state
, itemId
): any
Parameters#
Name | Type |
---|---|
state |
any |
itemId |
any |
Returns#
any
Defined in#
restore#
▸ restore(server
, state
, itemId?
): Promise
\<Execution
>
re-enstate the execution from db
Parameters#
Name | Type | Default value |
---|---|---|
server |
any |
undefined |
state |
IInstanceData |
undefined |
itemId |
any |
null |
Returns#
Promise
\<Execution
>
Defined in#
restored#
▸ restored(): Promise
\<void
>
Returns#
Promise
\<void
>
Implementation of#
Defined in#
resume#
▸ resume(): Promise
\<void
>
Returns#
Promise
\<void
>
Implementation of#
Defined in#
report#
▸ report(): void
Returns#
void
Implementation of#
Defined in#
formatDate#
▸ formatDate(date
): any
Parameters#
Name | Type |
---|---|
date |
any |
Returns#
any
Defined in#
getNewId#
▸ getNewId(scope
): number
Parameters#
Name | Type |
---|---|
scope |
string |
Returns#
number
Implementation of#
Defined in#
getUUID#
▸ getUUID(): any
Returns#
any
Implementation of#
Defined in#
doExecutionEvent#
▸ doExecutionEvent(process
, event
, eventDetails?
): Promise
\<void
>
Parameters#
Name | Type |
---|---|
process |
any |
event |
any |
eventDetails |
Object |
Returns#
Promise
\<void
>
Implementation of#
Defined in#
doItemEvent#
▸ doItemEvent(item
, event
, eventDetails?
): Promise
\<void
>
Parameters#
Name | Type |
---|---|
item |
any |
event |
any |
eventDetails |
Object |
Returns#
Promise
\<void
>
Implementation of#
Defined in#
log#
▸ log(...msg
): void
Parameters#
Name | Type |
---|---|
...msg |
any [] |
Returns#
void
Implementation of#
Defined in#
logS#
▸ logS(...msg
): void
Parameters#
Name | Type |
---|---|
...msg |
any [] |
Returns#
void
Implementation of#
Defined in#
logE#
▸ logE(...msg
): void
Parameters#
Name | Type |
---|---|
...msg |
any [] |
Returns#
void
Implementation of#
Defined in#
info#
▸ info(...msg
): void
Parameters#
Name | Type |
---|---|
...msg |
any [] |
Returns#
void
Implementation of#
Defined in#
error#
▸ error(msg
): void
Parameters#
Name | Type |
---|---|
msg |
any |
Returns#
void
Implementation of#
Defined in#
appendData#
▸ appendData(inputData
, item
, dataPath?
, assignment?
): void
Parameters#
Name | Type |
---|---|
inputData |
any |
item |
Item |
dataPath? |
any |
assignment? |
any |
Returns#
void
Implementation of#
Defined in#
getData#
▸ getData(dataPath
): any
Parameters#
Name | Type |
---|---|
dataPath |
any |
Returns#
any