Skip to content

bpmn-server / IAppDelegate

Interface: IAppDelegate#

Application Delegate Object to respond to various events and services:

  1. receive all events from workflow
  2. receive service calls
  3. receive message and signal calls
  4. execute scripts

Implemented by#

Table of contents#

Properties#

Methods#

Properties#

moddleOptions#

• moddleOptions: any

Defined in#

packages/bpmn-server/src/interfaces/common.ts:165

Methods#

getServicesProvider#

▸ getServicesProvider(execution, context?): IServiceProvider | Promise\<IServiceProvider>

context: the call's (docs/design/context-object.md), added in 3.7.5; the execution, as before, first.

Parameters#

Name Type
execution IExecution
context? any

Returns#

IServiceProvider | Promise\<IServiceProvider>

Defined in#

packages/bpmn-server/src/interfaces/common.ts:170


sendEmail#

▸ sendEmail(to, msg, body): any

Parameters#

Name Type
to any
msg any
body any

Returns#

any

Defined in#

packages/bpmn-server/src/interfaces/common.ts:171


executionStarted#

▸ executionStarted(execution, context?): any

context: the process's (docs/design/context-object.md), added in 3.7.5.

Parameters#

Name Type
execution IExecution
context? any

Returns#

any

Defined in#

packages/bpmn-server/src/interfaces/common.ts:173


startUp#

▸ startUp(options): any

Parameters#

Name Type
options any

Returns#

any

Defined in#

packages/bpmn-server/src/interfaces/common.ts:174


messageThrown#

▸ messageThrown(signalId, data, messageMatchingKey, item, context?): any

Parameters#

Name Type
signalId string
data any
messageMatchingKey any
item IItem
context? any

Returns#

any

Defined in#

packages/bpmn-server/src/interfaces/common.ts:175


signalThrown#

▸ signalThrown(signalId, data, messageMatchingKey, item, context?): any

Parameters#

Name Type
signalId string
data any
messageMatchingKey any
item IItem
context? any

Returns#

any

Defined in#

packages/bpmn-server/src/interfaces/common.ts:176


issueMessage#

▸ issueMessage(messageId, data): any

is called when an event throws a message that can not be answered by another process

Parameters#

Name Type
messageId string
data any

Returns#

any

Defined in#

packages/bpmn-server/src/interfaces/common.ts:184


issueSignal#

▸ issueSignal(messageId, data): any

Parameters#

Name Type
messageId string
data any

Returns#

any

Defined in#

packages/bpmn-server/src/interfaces/common.ts:185


serviceCalled#

▸ serviceCalled(input, execution, item, context?): unknown

is called only if the serviceTask has no implementation; otherwise the specified implementation will be called.

Parameters#

Name Type
input Record\<string, unknown>
execution IExecution
item IItem
context? any

Returns#

unknown

Defined in#

packages/bpmn-server/src/interfaces/common.ts:191


loadDataObject#

▸ loadDataObject(name, item, context?): unknown

Optional. Loads a data object of the model (a BPMN data object or data store, by its name) when an element connected to it runs (a data association, either way, e.g. a start event or a service task). The value is put in the instance data under the name (data.client) and saved with the instance like any data.

Parameters#

Name Type Description
name string the data object's name
item IItem the running item: its element, token and the instance data (item.data)
context? any -

Returns#

unknown

Defined in#

packages/bpmn-server/src/interfaces/common.ts:200


decisionContext#

▸ decisionContext(context, about): void | Record\<string, any> | Promise\<void | Record\<string, any>>

Optional. The application's facts for a decision table (a business rule task's decision, an assignment policy, a security policy: engine/DecisionContext.ts), before it is evaluated: what it returns is added to what the table reads ({ managerOf: true }; userGroups, the user's groups when only the application knows them). Called for each decision, a security policy's once per case and task it decides on; keep it quick. A failure is logged, and the table decides without the application's facts.

Parameters#

Name Type Description
context Record\<string, any> what the table reads so far (docs/design/expressions.md): the data's fields, the task's prepared inputs, data, user, actors, task, decision, item, instance, appServices
about Object what is deciding (kind: decision, assignment or security; name), for whom, on what case and task
about.kind "decision" | "assignment" | "security" -
about.name? string -
about.user Object -
about.user.userName? string -
about.user.userGroups? string[] -
about.instance? any -
about.task? string -

Returns#

void | Record\<string, any> | Promise\<void | Record\<string, any>>

Defined in#

packages/bpmn-server/src/interfaces/common.ts:213


notify#

▸ notify(notification): void | Promise\<void>

Optional. Delivers a notification a notification policy decided on (addons/notification/NotificationPolicy.ts, docs/design/notification-policies.md): whom (to: user names and groups), subject, message, channel. It is kept in wf_notifications either way; not called for a test run's instance, nor with NOTIFICATIONS=record. A failure is kept with the notification and said in the Rationale; the process goes on.

Parameters#

Name Type
notification Object
notification.id string
notification.instanceId string
notification.event string
notification.to string[]
notification.subject string
notification.message string
notification.channel? string

Returns#

void | Promise\<void>

Defined in#

packages/bpmn-server/src/interfaces/common.ts:221


verifyModel#

▸ verifyModel(model): IAppModelIssue[] | Promise\<IAppModelIssue[]>

Optional. The application's own checks on a model, run by verifyModel (the model editor's check, the import checks, bpmn-server verify with a server) after its own, on a model the engine could load. Returns issues in verifyModel's form; severity defaults to 'error'. Called without a running execution.

Parameters#

Name Type Description
model Object the model's name, its XML and the loaded Definition
model.name string -
model.source string -
model.definition any -

Returns#

IAppModelIssue[] | Promise\<IAppModelIssue[]>

Defined in#

packages/bpmn-server/src/interfaces/common.ts:230


instanceLabel#

▸ instanceLabel(instance): string | Promise\<string>

Optional. A case's label, for a model that has no camunda:label of its own (addons/labels/Labels.ts): computed in code when it is shown. Undefined: the default, <model> #<caseId>.

Parameters#

Name Type
instance any

Returns#

string | Promise\<string>

Defined in#

packages/bpmn-server/src/interfaces/common.ts:236

Comments