Activity, Process, and Definition elements share the same api interface. The element must not necessarely implement listeners for all the api calls.
The Api is composed from the element event message.
Api properties:
id
: element idtype
: element typename
: element nameexecutionId
: current execution idenvironment
: shared environmentfields
: message fieldsroutingKey
: message routing key
content
: message contentid
: element idtype
: element typeexecutionId
: element execution idparent
: element parentid
: element parent idtype
: element parent typeexecutionId
: element parent unique execution idpath
: list of parent parents
messageProperties
: message properties,messageId
: message id
owner
: api owner, i.e. the owning element instancebroker
: element broker
Cancel run. Publishes cancel message via element broker on element broker api
exchange.
Arguments:
message
: optional object sent as messageoptions
: optional object with broker message optionsdelegate
: optional boolean to delegate the cancel to all interested parties
Discard run. Publishes discard message on element broker api
exchange.
Signal activity. Publishes signal message on element broker api
exchange.
Arguments:
message
: signal messageoptions
: optional object with broker message optionsdelegate
: optional boolean to delegate the signal to all interested parties
Fail activity with error. The purpose is to fail user-/signal tasks waiting for user input. The behaviour differs between different type of activities.
Stop element run. Publishes stop message on element broker api
exchange.
Resolve expression.
Utility function to create new message content from the api message.
Utility function to publish message with element broker.
Arguments:
action
: message action, will be prefixed with the element type, e.g.signal
will be sent asactivity.signal
if used to signal activitycontent
: optional message contentoptions
: optional object with broker message options