Skip to content

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#

Accessors#

Methods#

Constructors#

constructor#

new EventBasedGateway(id, process, type, def): EventBasedGateway

Parameters#

Name Type
id any
process any
type any
def any

Returns#

EventBasedGateway

Inherited from#

Gateway.constructor

Defined in#

elements/Node.ts:32

Properties#

id#

id: any

Inherited from#

Gateway.id

Defined in#

elements/Element.ts:13


type#

type: any

Inherited from#

Gateway.type

Defined in#

elements/Element.ts:14


subType#

subType: any

Inherited from#

Gateway.subType

Defined in#

elements/Element.ts:15


behaviours#

behaviours: Map\<any, any>

Inherited from#

Gateway.behaviours

Defined in#

elements/Element.ts:17


isFlow#

isFlow: boolean = false

Inherited from#

Gateway.isFlow

Defined in#

elements/Element.ts:18


lane#

lane: any

Inherited from#

Gateway.lane

Defined in#

elements/Element.ts:19


working#

working: boolean = false

Defined in#

elements/Gateway.ts:270


listener#

listener: any

Defined in#

elements/Gateway.ts:271


name#

name: any

Inherited from#

Gateway.name

Defined in#

elements/Node.ts:13


process#

process: any

Inherited from#

Gateway.process

Defined in#

elements/Node.ts:14


def#

def: any

Inherited from#

Gateway.def

Defined in#

elements/Node.ts:15


outbounds#

outbounds: Flow[]

Inherited from#

Gateway.outbounds

Defined in#

elements/Node.ts:16


inbounds#

inbounds: Flow[]

Inherited from#

Gateway.inbounds

Defined in#

elements/Node.ts:17


attachments#

attachments: Node[]

Inherited from#

Gateway.attachments

Defined in#

elements/Node.ts:18


attachedTo#

attachedTo: Node

Inherited from#

Gateway.attachedTo

Defined in#

elements/Node.ts:19


messageId#

messageId: any

Inherited from#

Gateway.messageId

Defined in#

elements/Node.ts:20


signalId#

signalId: any

Inherited from#

Gateway.signalId

Defined in#

elements/Node.ts:21


initiator#

initiator: any

Inherited from#

Gateway.initiator

Defined in#

elements/Node.ts:22


assignee#

assignee: any

Inherited from#

Gateway.assignee

Defined in#

elements/Node.ts:23


candidateGroups#

candidateGroups: any

Inherited from#

Gateway.candidateGroups

Defined in#

elements/Node.ts:24


candidateUsers#

candidateUsers: any

Inherited from#

Gateway.candidateUsers

Defined in#

elements/Node.ts:25


scripts#

scripts: Map\<any, any>

Inherited from#

Gateway.scripts

Defined in#

elements/Node.ts:26

Accessors#

processId#

get processId(): any

Returns#

any

Inherited from#

Gateway.processId

Defined in#

elements/Node.ts:27


requiresWait#

get requiresWait(): boolean

Returns#

boolean

Inherited from#

Gateway.requiresWait

Defined in#

elements/Node.ts:131


canBeInvoked#

get canBeInvoked(): boolean

Returns#

boolean

Inherited from#

Gateway.canBeInvoked

Defined in#

elements/Node.ts:136


loopDefinition#

get loopDefinition(): any

Returns#

any

Inherited from#

Gateway.loopDefinition

Defined in#

elements/Node.ts:138


isCatching#

get isCatching(): boolean

Returns#

boolean

Inherited from#

Gateway.isCatching

Defined in#

elements/Node.ts:142

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#

Gateway.hasBehaviour

Defined in#

elements/Element.ts:34


getBehaviour#

getBehaviour(name): any

Parameters#

Name Type
name any

Returns#

any

Inherited from#

Gateway.getBehaviour

Defined in#

elements/Element.ts:38


addBehaviour#

addBehaviour(nane, behavriour): void

Parameters#

Name Type
nane any
behavriour any

Returns#

void

Inherited from#

Gateway.addBehaviour

Defined in#

elements/Element.ts:41


getOutbounds#

getOutbounds(item): Item[]

Parameters#

Name Type
item Item

Returns#

Item[]

Inherited from#

Gateway.getOutbounds

Defined in#

elements/Gateway.ts:34


getPotentialPath#

getPotentialPath(node, path?): any

Parameters#

Name Type Default value
node any undefined
path any null

Returns#

any

Inherited from#

Gateway.getPotentialPath

Defined in#

elements/Gateway.ts:64


canReach#

canReach(node, target): any

Parameters#

Name Type
node any
target any

Returns#

any

Inherited from#

Gateway.canReach

Defined in#

elements/Gateway.ts:78


getRelatedTokens#

getRelatedTokens(item): any[]

Parameters#

Name Type
item Item

Returns#

any[]

Inherited from#

Gateway.getRelatedTokens

Defined in#

elements/Gateway.ts:88


analyzeConvergingTokens#

analyzeConvergingTokens(item): Object

Parameters#

Name Type
item Item

Returns#

Object

Name Type
pendingTokens Token[]
waitingTokens Token[]

Inherited from#

Gateway.analyzeConvergingTokens

Defined in#

elements/Gateway.ts:120


start#

start(item): Promise\<NODE_ACTION>

Parameters#

Name Type
item Item

Returns#

Promise\<NODE_ACTION>

Inherited from#

Gateway.start

Defined in#

elements/Gateway.ts:149


restored#

restored(item): void

Parameters#

Name Type
item Item

Returns#

void

Overrides#

Gateway.restored

Defined in#

elements/Gateway.ts:273


run#

run(item): Promise\<NODE_ACTION>

Parameters#

Name Type
item Item

Returns#

Promise\<NODE_ACTION>

Overrides#

Gateway.run

Defined in#

elements/Gateway.ts:276


cancelAllBranched#

cancelAllBranched(endingItem): Promise\<void>

Parameters#

Name Type
endingItem Item

Returns#

Promise\<void>

Defined in#

elements/Gateway.ts:279


validate#

validate(item): Promise\<void>

Parameters#

Name Type
item Item

Returns#

Promise\<void>

Inherited from#

Gateway.validate

Defined in#

elements/Node.ts:45


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#

Gateway.doEvent

Defined in#

elements/Node.ts:58


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#

Gateway.setInput

Defined in#

elements/Node.ts:94


getInput#

getInput(item, input): Promise\<{}>

Parameters#

Name Type
item Item
input any

Returns#

Promise\<{}>

Inherited from#

Gateway.getInput

Defined in#

elements/Node.ts:104


getOutput#

getOutput(item): Promise\<{}>

transform data using output rules todo

Parameters#

Name Type
item Item

Returns#

Promise\<{}>

Inherited from#

Gateway.getOutput

Defined in#

elements/Node.ts:118


enter#

enter(item): void

Parameters#

Name Type
item Item

Returns#

void

Inherited from#

Gateway.enter

Defined in#

elements/Node.ts:122


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#

Gateway.execute

Defined in#

elements/Node.ts:152


continue#

continue(item): Promise\<void>

Parameters#

Name Type
item Item

Returns#

Promise\<void>

Inherited from#

Gateway.continue

Defined in#

elements/Node.ts:232


cancelEBG#

cancelEBG(item): Promise\<void>

Parameters#

Name Type
item any

Returns#

Promise\<void>

Inherited from#

Gateway.cancelEBG

Defined in#

elements/Node.ts:251


cancelBoundaryEvents#

cancelBoundaryEvents(item): Promise\<void>

Parameters#

Name Type
item any

Returns#

Promise\<void>

Inherited from#

Gateway.cancelBoundaryEvents

Defined in#

elements/Node.ts:259


end#

end(item, cancel?): Promise\<void>

Parameters#

Name Type Default value
item Item undefined
cancel Boolean false

Returns#

Promise\<void>

Inherited from#

Gateway.end

Defined in#

elements/Node.ts:294


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#

Gateway.resume

Defined in#

elements/Node.ts:336


init#

init(item): void

Parameters#

Name Type
item Item

Returns#

void

Inherited from#

Gateway.init

Defined in#

elements/Node.ts:339


startBoundaryEvents#

startBoundaryEvents(item, token): Promise\<void>

Parameters#

Name Type
item any
token any

Returns#

Promise\<void>

Inherited from#

Gateway.startBoundaryEvents

Defined in#

elements/Node.ts:363


describe#

describe(): any[]

Returns#

any[]

Inherited from#

Gateway.describe

Defined in#

elements/Node.ts:374