bpmn-server / EventBasedGateway
Class: EventBasedGateway#
trick here is once one event is met all others must be cancelled
How will I know? when one of my events is fired shoudl I subscribe to the event or get directly notified?
Hierarchy#
↳ EventBasedGateway
Table of contents#
Constructors#
Properties#
- id
- type
- subType
- behaviours
- isFlow
- lane
- working
- listener
- name
- process
- def
- outbounds
- inbounds
- attachments
- attachedTo
- messageId
- signalId
- initiator
- assignee
- candidateGroups
- candidateUsers
- scripts
Accessors#
Methods#
- hasBehaviour
- getBehaviour
- addBehaviour
- getOutbounds
- getPotentialPath
- canReach
- getRelatedTokens
- analyzeConvergingTokens
- start
- restored
- run
- cancelAllBranched
- validate
- doEvent
- setInput
- getInput
- getOutput
- enter
- execute
- continue
- cancelEBG
- cancelBoundaryEvents
- end
- resume
- init
- startBoundaryEvents
- describe
Constructors#
constructor#
• new EventBasedGateway(id
, process
, type
, def
): EventBasedGateway
Parameters#
Name | Type |
---|---|
id |
any |
process |
any |
type |
any |
def |
any |
Returns#
Inherited from#
Defined in#
Properties#
id#
• id: any
Inherited from#
Defined in#
type#
• type: any
Inherited from#
Defined in#
subType#
• subType: any
Inherited from#
Defined in#
behaviours#
• behaviours: Map
\<any
, any
>
Inherited from#
Defined in#
isFlow#
• isFlow: boolean
= false
Inherited from#
Defined in#
lane#
• lane: any
Inherited from#
Defined in#
working#
• working: boolean
= false
Defined in#
listener#
• listener: any
Defined in#
name#
• name: any
Inherited from#
Defined in#
process#
• process: any
Inherited from#
Defined in#
def#
• def: any
Inherited from#
Defined in#
outbounds#
• outbounds: Flow
[]
Inherited from#
Defined in#
inbounds#
• inbounds: Flow
[]
Inherited from#
Defined in#
attachments#
• attachments: Node
[]
Inherited from#
Defined in#
attachedTo#
• attachedTo: Node
Inherited from#
Defined in#
messageId#
• messageId: any
Inherited from#
Defined in#
signalId#
• signalId: any
Inherited from#
Defined in#
initiator#
• initiator: any
Inherited from#
Defined in#
assignee#
• assignee: any
Inherited from#
Defined in#
candidateGroups#
• candidateGroups: any
Inherited from#
Defined in#
candidateUsers#
• candidateUsers: any
Inherited from#
Defined in#
scripts#
• scripts: Map
\<any
, any
>
Inherited from#
Defined in#
Accessors#
processId#
• get
processId(): any
Returns#
any
Inherited from#
Gateway.processId
Defined in#
requiresWait#
• get
requiresWait(): boolean
Returns#
boolean
Inherited from#
Gateway.requiresWait
Defined in#
canBeInvoked#
• get
canBeInvoked(): boolean
Returns#
boolean
Inherited from#
Gateway.canBeInvoked
Defined in#
loopDefinition#
• get
loopDefinition(): any
Returns#
any
Inherited from#
Gateway.loopDefinition
Defined in#
isCatching#
• get
isCatching(): boolean
Returns#
boolean
Inherited from#
Gateway.isCatching
Defined in#
Methods#
hasBehaviour#
▸ hasBehaviour(name
): boolean
respond by providing behaviour attributes beyond item and node information ex: timer due , input/outupt , fields
Parameters#
Name | Type |
---|---|
name |
any |
Returns#
boolean
Inherited from#
Defined in#
getBehaviour#
▸ getBehaviour(name
): any
Parameters#
Name | Type |
---|---|
name |
any |
Returns#
any
Inherited from#
Defined in#
addBehaviour#
▸ addBehaviour(nane
, behavriour
): void
Parameters#
Name | Type |
---|---|
nane |
any |
behavriour |
any |
Returns#
void
Inherited from#
Defined in#
getOutbounds#
▸ getOutbounds(item
): Item
[]
Parameters#
Name | Type |
---|---|
item |
Item |
Returns#
Item
[]
Inherited from#
Defined in#
getPotentialPath#
▸ getPotentialPath(node
, path?
): any
Parameters#
Name | Type | Default value |
---|---|---|
node |
any |
undefined |
path |
any |
null |
Returns#
any
Inherited from#
Defined in#
canReach#
▸ canReach(node
, target
): any
Parameters#
Name | Type |
---|---|
node |
any |
target |
any |
Returns#
any
Inherited from#
Defined in#
getRelatedTokens#
▸ getRelatedTokens(item
): any
[]
Parameters#
Name | Type |
---|---|
item |
Item |
Returns#
any
[]
Inherited from#
Defined in#
analyzeConvergingTokens#
▸ analyzeConvergingTokens(item
): Object
Parameters#
Name | Type |
---|---|
item |
Item |
Returns#
Object
Name | Type |
---|---|
pendingTokens |
Token [] |
waitingTokens |
Token [] |
Inherited from#
Gateway.analyzeConvergingTokens
Defined in#
start#
▸ start(item
): Promise
\<NODE_ACTION
>
Parameters#
Name | Type |
---|---|
item |
Item |
Returns#
Promise
\<NODE_ACTION
>
Inherited from#
Defined in#
restored#
▸ restored(item
): void
Parameters#
Name | Type |
---|---|
item |
Item |
Returns#
void
Overrides#
Defined in#
run#
▸ run(item
): Promise
\<NODE_ACTION
>
Parameters#
Name | Type |
---|---|
item |
Item |
Returns#
Promise
\<NODE_ACTION
>
Overrides#
Defined in#
cancelAllBranched#
▸ cancelAllBranched(endingItem
): Promise
\<void
>
Parameters#
Name | Type |
---|---|
endingItem |
Item |
Returns#
Promise
\<void
>
Defined in#
validate#
▸ validate(item
): Promise
\<void
>
Parameters#
Name | Type |
---|---|
item |
Item |
Returns#
Promise
\<void
>
Inherited from#
Defined in#
doEvent#
▸ doEvent(item
, event
, newStatus?
, eventDetails?
): Promise
\<any
[]>
Parameters#
Name | Type | Default value |
---|---|---|
item |
Item |
undefined |
event |
EXECUTION_EVENT |
undefined |
newStatus |
ITEM_STATUS |
null |
eventDetails |
Object |
{} |
Returns#
Promise
\<any
[]>
Inherited from#
Defined in#
setInput#
▸ setInput(item
, input
): Promise
\<void
>
is Called after execution transform data using input rules todo
Parameters#
Name | Type |
---|---|
item |
Item |
input |
any |
Returns#
Promise
\<void
>
Inherited from#
Defined in#
getInput#
▸ getInput(item
, input
): Promise
\<{}>
Parameters#
Name | Type |
---|---|
item |
Item |
input |
any |
Returns#
Promise
\<{}>
Inherited from#
Defined in#
getOutput#
▸ getOutput(item
): Promise
\<{}>
transform data using output rules todo
Parameters#
Name | Type |
---|---|
item |
Item |
Returns#
Promise
\<{}>
Inherited from#
Defined in#
enter#
▸ enter(item
): void
Parameters#
Name | Type |
---|---|
item |
Item |
Returns#
void
Inherited from#
Defined in#
execute#
▸ execute(item
): Promise
\<void
| wait
| end
| error
| abort
>
this is the primary exectuion method for a node
considerations: the following are handled by Token 1. Loops we are inside a loop already (if any) 2. Gatways 3. Subprocess the parent node is fired as normal run method will fire the subprocess invoking a new token and will go into wait
Parameters#
Name | Type |
---|---|
item |
Item |
Returns#
Promise
\<void
| wait
| end
| error
| abort
>
Inherited from#
Defined in#
continue#
▸ continue(item
): Promise
\<void
>
Parameters#
Name | Type |
---|---|
item |
Item |
Returns#
Promise
\<void
>
Inherited from#
Defined in#
cancelEBG#
▸ cancelEBG(item
): Promise
\<void
>
Parameters#
Name | Type |
---|---|
item |
any |
Returns#
Promise
\<void
>
Inherited from#
Defined in#
cancelBoundaryEvents#
▸ cancelBoundaryEvents(item
): Promise
\<void
>
Parameters#
Name | Type |
---|---|
item |
any |
Returns#
Promise
\<void
>
Inherited from#
Defined in#
end#
▸ end(item
, cancel?
): Promise
\<void
>
Parameters#
Name | Type | Default value |
---|---|---|
item |
Item |
undefined |
cancel |
Boolean |
false |
Returns#
Promise
\<void
>
Inherited from#
Defined in#
resume#
▸ resume(item
): void
is called by the token after an execution resume for every active (in wait) item different than init, which is called for all items
Parameters#
Name | Type |
---|---|
item |
Item |
Returns#
void
Inherited from#
Defined in#
init#
▸ init(item
): void
Parameters#
Name | Type |
---|---|
item |
Item |
Returns#
void
Inherited from#
Defined in#
startBoundaryEvents#
▸ startBoundaryEvents(item
, token
): Promise
\<void
>
Parameters#
Name | Type |
---|---|
item |
any |
token |
any |
Returns#
Promise
\<void
>
Inherited from#
Defined in#
describe#
▸ describe(): any
[]
Returns#
any
[]