-
Notifications
You must be signed in to change notification settings - Fork 49
token
bpmn-server / Token
- currentNode
- dataPath
- execution
- id
- input
- loop
- messageMatchingKey
- originItem
- output
- parentToken
- path
- processId
- startNodeId
- status
- type
- appendData
- continue
- end
- error
- execute
- getChildrenTokens
- getFullPath
- getSubProcessToken
- goNext
- hasNode
- log
- preExecute
- preNext
- processError
- processEscalation
- restored
- resume
- save
- setCurrentNode
- signal
- stop
- terminate
- load
- startNewToken
• new Token(type
, execution
, startNode
, dataPath?
, parentToken?
, originItem?
): Token
Name | Type |
---|---|
type |
TOKEN_TYPE |
execution |
Execution |
startNode |
Node |
dataPath? |
any |
parentToken? |
Token |
originItem? |
Item |
• currentNode: Node
• dataPath: string
• execution: IExecution
• id: any
• input: Object
• loop: Loop
• messageMatchingKey: Object
• originItem: Item
• output: Object
• Optional
parentToken: Token
• path: Item
[]
• processId: any
• startNodeId: any
• status: TOKEN_STATUS
• type: TOKEN_TYPE
• get
childrenTokens(): Token
[]
Token
[]
• get
currentItem(): Item
• get
data(): any
any
• get
firstItem(): Item
• get
lastItem(): Item
▸ appendData(inputData
, item
): void
renamed from applyInput to appendData
Name | Type |
---|---|
inputData |
any |
item |
any |
void
▸ continue(): Promise
<void
>
is called by events to cancel current token
Promise
<void
>
▸ end(cancel?
): Promise
<void
>
Name | Type | Default value |
---|---|---|
cancel |
Boolean |
false |
Promise
<void
>
▸ error(msg
): void
Name | Type |
---|---|
msg |
any |
void
▸ execute(input
): Promise
<void
>
this is the primary exectuion method for a token Pre-Conditions: currentNode is set status!= end
Name | Type |
---|---|
input |
any |
Promise
<void
>
▸ getChildrenTokens(): any
[]
any
[]
▸ getFullPath(path?
): Item
[]
Name | Type | Default value |
---|---|---|
path |
any [] |
[] |
Item
[]
▸ getSubProcessToken(): Token
▸ goNext(): Promise
<void
>
Promise
<void
>
▸ hasNode(nodeId
): Boolean
Name | Type |
---|---|
nodeId |
any |
Boolean
▸ log(msg
): void
Name | Type |
---|---|
msg |
any |
void
▸ preExecute(): Promise
<boolean
>
Promise
<boolean
>
▸ preNext(): Promise
<boolean
>
Promise
<boolean
>
▸ processError(): Promise
<void
>
Promise
<void
>
▸ processEscalation(): Promise
<void
>
Promise
<void
>
▸ restored(): void
void
▸ resume(): void
void
▸ save(): Object
Object
Name | Type |
---|---|
currentNode |
any |
dataPath |
string |
id |
any |
loopId |
any |
originItem |
any |
parentToken |
any |
startNodeId |
any |
status |
TOKEN_STATUS |
type |
TOKEN_TYPE |
▸ setCurrentNode(newCurrentNode
): void
Name | Type |
---|---|
newCurrentNode |
Node |
void
▸ signal(data
, options?
): Promise
<void
>
Name | Type |
---|---|
data |
any |
options |
Object |
Promise
<void
>
▸ stop(): void
void
▸ terminate(): Promise
<void
>
is called by Gateways to cancel current token
Promise
<void
>
▸ load(execution
, da
): Token
Name | Type |
---|---|
execution |
Execution |
da |
any |
▸ startNewToken(type
, execution
, startNode
, dataPath
, parentToken
, originItem
, loop
, data?
, noExecute?
): Promise
<Token
>
Name | Type | Default value |
---|---|---|
type |
TOKEN_TYPE |
undefined |
execution |
any |
undefined |
startNode |
any |
undefined |
dataPath |
any |
undefined |
parentToken |
Token |
undefined |
originItem |
Item |
undefined |
loop |
Loop |
undefined |
data |
any |
null |
noExecute |
boolean |
false |
Promise
<Token
>