-
Notifications
You must be signed in to change notification settings - Fork 48
engine
bpmn-server / Engine
super class for various objects that are part of the server
-
↳
Engine
• new Engine(server
): Engine
Name | Type |
---|---|
server |
any |
• server: any
• get
appDelegate(): any
any
ServerComponent.appDelegate
• get
cache(): CacheManager
ServerComponent.cache
• get
configuration(): any
any
ServerComponent.configuration
• get
cron(): Cron
ServerComponent.cron
• get
dataStore(): any
any
ServerComponent.dataStore
• get
definitions(): any
any
ServerComponent.definitions
• get
engine(): IEngine
ServerComponent.engine
• get
listener(): any
any
ServerComponent.listener
• get
logger(): any
any
ServerComponent.logger
▸ 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
Name | Type | Description |
---|---|---|
itemQuery |
any |
criteria to retrieve the item |
data |
Object |
|
assignment |
Object |
- |
userName |
string |
- |
options |
Object |
- |
Promise
<Execution
>
▸ get(instanceQuery
): Promise
<Execution
>
restores an instance into memeory or provides you access to a running instance
this will also resume execution
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'} |
Promise
<Execution
>
▸ 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 }
Name | Type | Default value | Description |
---|---|---|---|
itemQuery |
any |
undefined |
criteria to retrieve the item |
data |
Object |
{} |
|
userName |
string |
null |
- |
options |
Object |
{} |
- |
Promise
<Execution
>
▸ invokeItem(itemQuery
, data?
): Promise
<Execution
>
Name | Type |
---|---|
itemQuery |
any |
data |
Object |
Promise
<Execution
>
▸ start(name
, data?
, startNodeId?
, userName?
, options?
): Promise
<Execution
>
loads a definitions and start execution
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 |
{} |
- |
Promise
<Execution
>
▸ 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 }
Name | Type |
---|---|
instanceId |
any |
elementId |
any |
data |
Object |
Promise
<Execution
>
▸ startRepeatTimerEvent(instanceId
, prevItem
, data?
, options?
): Promise
<Execution
>
Repeat Timers need to create new Item
Name | Type |
---|---|
instanceId |
any |
prevItem |
any |
data |
Object |
options |
Object |
Promise
<Execution
>
▸ 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
Name | Type | Description |
---|---|---|
messageId |
any |
the id of the message or signal as per bpmn definition |
data |
Object |
message data |
matchingQuery |
Object |
- |
Promise
<Execution
>
▸ 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
Name | Type | Description |
---|---|---|
signalId |
any |
- |
data |
Object |
message data |
matchingQuery |
Object |
should match the itemKey (if specified) |
Promise
<any
[]>