bpmn-server
bpmn-server#
Table of contents#
Enumerations#
- USER_ROLE
- TOKEN_TYPE
- BPMN_TYPE
- NODE_SUBTYPE
- EXECUTION_EVENT
- NODE_ACTION
- ITEM_STATUS
- EXECUTION_STATUS
- TOKEN_STATUS
- FLOW_ACTION
Classes#
- BPMNAPI
- BPMNAdminAPI
- APIEngine
- APIData
- APIModelReader
- APIModel
- SecureUser
- PolicyDenied
- CaseAccess
- SecurityPolicy
- Configuration
- Logger
- ConnectorError
- Connectors
- DataStore
- DocumentPager
- DocumentQuery
- InstanceLocker
- MemoryDocumentStore
- ModelHistory
- BpmnModelData
- ProcessData
- EventData
- ModelsDatastore
- ModelsDatastoreDB
- MongoDB
- QueryTranslator
- SqliteDocumentStore
- DMNEngine
- DMNParser
- Definition
- Element
- Event
- CatchEvent
- BoundaryEvent
- ThrowEvent
- EndEvent
- StartEvent
- Flow
- MessageFlow
- FormInvalidError
- Gateway
- XORGateway
- EventBasedGateway
- Node
- NodeLoader
- Process
- ScriptTask
- ServiceTask
- BusinessRuleTask
- SendTask
- UserTask
- ReceiveTask
- SubProcess
- AdHocSubProcess
- CallActivity
- Transaction
- Behaviour
- BehaviourLoader
- CamundaFormData
- IOBehaviour
- LoopBehaviour
- MessageEventBehaviour
- SignalEventBehaviour
- ScriptBehaviour
- TerminateBehaviour
- TimerBehaviour
- ModelVerifier
- Registrations
- DataHandler
- DefaultAppDelegate
- Execution
- Item
- ListColumnError
- Loop
- InstanceObject
- ItemObject
- TokenObject
- LoopObject
- Query
- SandboxScriptHandler
- ScriptHandler
- TestStubs
- Token
- DuplicateKeyError
- BPMNServer
- NoCacheManager
- CacheManager
- Cron
- ReentrantCallError
- ItemNotWaitingError
- Engine
- EngineNotRunningError
- LaunchedEngine
- LaunchedServer
- Listener
- ServerComponent
Interfaces#
- IEngineOptions
- IAPIEngine
- IAPIData
- IAPIModel
- IItemAssignment
- IFormLookup
- ILookupChoice
- ILookupCriteria
- ILabelValue
- ILabel
- ILabelPart
- IModelLabels
- ILabelField
- ILabelFilter
- INotification
- INotificationQuery
- ISecurityUser
- IPolicyRule
- IAccess
- IWho
- IWhoMay
- IModelSecurity
- ISecurityTask
- ISeeUser
- ConnectorAuth
- Connector
- ConnectorTesting
- ConnectorInput
- CallResult
- OperationParameter
- Operation
- IModelVersion
- SqliteOptions
- IFormProblem
- IBehaviour
- IModelIssue
- IVerifyOptions
- IModelVerification
- IAddOnModelCheck
- IAddOnDecisionFile
- IAddOnManifest
- IModelCheck
- IQueryFilter
- IExpressionPlace
- IExpressionName
- IFieldProblem
- IFieldRule
- IFieldChoices
- IAddOn
- IContractParam
- IContractExpression
- IAppContract
- IContextSource
- IContext
- IDecisionUser
- IDecisionAbout
- ExecutionDecision
- IListField
- IListColumn
- StubSet
- IItemData
- IInstanceData
- IInstanceFlags
- IDefinitionData
- IElementData
- IFlowData
- IEventData
- IBpmnModelData
- IProcessData
- IUserInfo
- ISecureUser
- IConfiguration
- IConnectorsConfiguration
- ILogger
- IServiceProvider
- IAppDelegate
- IAppModelIssue
- FindParams
- FindResult
- IDataStore
- IModelsDatastore
- IDefinition
- IElement
- IFlow
- INode
- IScriptHandler
- IToken
- IExecutionResult
- IExecution
- IItem
- ILifecycleListener
- IBPMNServer
- IServerComponent
- IEngine
- IUpgradeInstanceReport
- IUpgradeReport
- ICron
- ICacheManager
- IDocumentStore
- ILockManager
Type Aliases#
- Actor
- PolicyKind
- LookupKind
- NotificationEvent
- SeeConditions
- InstanceLockerOptions
- DMNOptions
- FoundDecision
- InputClause
- OutputClause
- Rule
- DecisionTable
- Decision
- DMNDefinitions
- DMNIssue
- ModelIssueSeverity
- DecisionLookup
- ApiEvent
- ContextKind
- DecisionKind
- ScriptContext
- LifecycleNotification
- IUpgradeOutcome
- StorageQuery
- StorageProjection
- StorageSort
Variables#
- SystemUser
- aiManifest
- aiAddOn
- POLICY_FIELDS
- POLICIES_FOLDER
- assignmentManifest
- assignmentAddOn
- ACTOR_ELEMENTS
- BUILT_IN_ACTORS
- actorsName
- OLD_POLICIES_FOLDER
- LOOKUP_LIMIT
- formsManifest
- formsAddOn
- POLICY_ADD_ONS
- policiesManifest
- policiesAddOn
- APP_CONFIG_FILE
- FILTER_OPS
- labelsManifest
- labelsAddOn
- modelingManifest
- modelingAddOn
- NOTIFICATION_FOLDER
- NOTIFICATION_TEMPLATES
- NOTIFICATION_COLLECTION
- NOTIFICATION_EVENTS
- NOTIFICATION_OUTPUTS
- notificationManifest
- notificationAddOn
- DECIDE_AT_ONCE
- SECURITY_FOLDER
- DEFAULT_SECURITY_POLICY
- SECURITY_ACTIONS
- FULL_ACCESS
- securityManifest
- securityAddOn
- defaultConfiguration
- HTTP_METHODS
- SECRETS_KEY
- OLD_SECRETS_KEY
- HIT_POLICIES
- Behaviour_names
- OWF_NAMESPACE
- LEGACY_CAMUNDA
- ASSIGNMENT_FIELDS
- API_EVENTS
- APP_CONTRACT_FILE
- DECISION_KEYS
- MAX_COLUMNS
Functions#
- policyFile
- policyNames
- evaluatePolicy
- applyPolicy
- reassigned
- roleUses
- actorElements
- initiatorOf
- actorsOf
- actorNamesOf
- movePolicyFolder
- registerPolicyBasics
- parseLookupSource
- lookupElement
- lookupElements
- formFieldLookup
- filterPath
- filterValue
- choicesOf
- lookupChoices
- readAppConfig
- addOnManifests
- enabledAddOns
- addOnNames
- policyAddOns
- labelParts
- namedValues
- templateProblems
- fillTemplate
- modelLabels
- labelsOn
- caseLabel
- activityLabel
- labelInstances
- labelItems
- labelFields
- labelQuery
- notificationPolicyFile
- notificationPolicyNames
- notificationTemplateFile
- deliversNotifications
- notifyEvent
- findNotifications
- notificationsOf
- securityUser
- seeConditionsOfTable
- builtInSeeConditions
- combineSeeConditions
- settingProblem
- settingsProblems
- parseEnv
- renderEnv
- dateDiff
- connectorsTesting
- parseDocument
- refResolver
- resolveRefs
- listOperations
- exampleOf
- secretsKey
- canEncrypt
- databaseName
- orderedId
- feelParses
- legacyTest
- label
- valuesRead
- constraintsOf
- fieldProblems
- formProblems
- checkForm
- taskAttribute
- owfAttribute
- legacyAttributes
- verifyModel
- listensTo
- fireApiEvent
- registrationsOf
- addOnsOf
- contractProblems
- readAppContract
- contractNames
- methodNames
- compareWithCode
- appVarsRead
- appVarsFor
- makeContext
- itemContext
- elementContext
- decisionContextOf
- queryContext
- formContext
- actionContext
- narrowed
- pathProblem
- pathValue
- valueText
- dataPathOf
- inScope
- elementType
- elementIdOf
- feelView
- itemView
- instanceView
- decisionContext
- namesAt
- runningDecisionContext
- formatDecision
- isExpression
- columnKeys
- listColumns
- columnPath
- columnSortPath
- columnRaw
- columnValues
- isLabelPath
- compareValues
- sortRecords
- modelFormFields
- sortOrder
- roleNames
- roleNameProblem
- saveRoleNames
- runSandboxed
- invokeDecision
- delegateFacts
- executionResult
- engineCalls
- startEngineService
Type Aliases#
Actor#
Ƭ Actor: string | string[] | null
An actor: a user's name, several (latest first), or none.
Defined in#
packages/bpmn-server/src/addons/basics/actors.ts:18
PolicyKind#
Ƭ PolicyKind: "assignment" | "notification" | "security"
Defined in#
packages/bpmn-server/src/addons/basics/folders.ts:11
LookupKind#
Ƭ LookupKind: "list" | "lookup"
Defined in#
packages/bpmn-server/src/addons/forms/FormLookup.ts:27
NotificationEvent#
Ƭ NotificationEvent: typeof NOTIFICATION_EVENTS[number]
Defined in#
packages/bpmn-server/src/addons/notification/NotificationPolicy.ts:25
SeeConditions#
Ƭ SeeConditions: null | object[]
A policy's narrowing: null, any case may be seen; [] none; else the case conditions, any of which.
Defined in#
packages/bpmn-server/src/addons/security/SecurityQuery.ts:18
InstanceLockerOptions#
Ƭ InstanceLockerOptions: Object
Type declaration#
| Name | Type | Description |
|---|---|---|
database |
string |
The logical database (MongoDB's db name). |
collection? |
string |
- |
owner? |
string |
This process's identity as an owner; default SERVER_ID, else host, process id and a random suffix. |
retryDelay? |
number |
Milliseconds between tries. |
maxTries? |
number |
Tries before lock gives up. |
staleAfter? |
number |
Milliseconds after which a lock or claim is stale: its owner is presumed gone and another may take it. |
logger? |
{ log: (...m: any[]) => any ; warn?: (...m: any[]) => any } |
- |
logger.log |
[object Object] | - |
logger.warn? |
[object Object] | - |
Defined in#
packages/bpmn-server/src/datastore/InstanceLocker.ts:8
DMNOptions#
Ƭ DMNOptions: Object
Type declaration#
| Name | Type | Description |
|---|---|---|
debug? |
boolean |
- |
log? |
(message: string) => void |
- |
keepOutput? |
(cell: string) => boolean |
- |
listInputs? |
boolean |
an input whose value is a list matches a rule's test when the list or one of its values does (every decision: engine/DecisionContext.ts) |
Defined in#
packages/bpmn-server/src/dmn/DMNEngine.ts:19
FoundDecision#
Ƭ FoundDecision: Object
Where a decision was found.
Type declaration#
| Name | Type |
|---|---|
filePath |
string |
definitions |
DMNDefinitions |
decision |
Decision |
Defined in#
packages/bpmn-server/src/dmn/DMNEngine.ts:29
InputClause#
Ƭ InputClause: Object
Type declaration#
| Name | Type |
|---|---|
id |
string |
label |
string |
expression |
string |
typeRef |
string |
values? |
string |
Defined in#
packages/bpmn-server/src/dmn/DMNParser.ts:12
OutputClause#
Ƭ OutputClause: Object
Type declaration#
| Name | Type |
|---|---|
id |
string |
name |
string |
label |
string |
typeRef |
string |
values? |
string |
Defined in#
packages/bpmn-server/src/dmn/DMNParser.ts:13
Rule#
Ƭ Rule: Object
Type declaration#
| Name | Type |
|---|---|
id |
string |
description |
string |
inputEntries |
string[] |
outputEntries |
string[] |
Defined in#
packages/bpmn-server/src/dmn/DMNParser.ts:14
DecisionTable#
Ƭ DecisionTable: Object
Type declaration#
| Name | Type |
|---|---|
hitPolicy |
string |
aggregation? |
string |
inputs |
InputClause[] |
outputs |
OutputClause[] |
rules |
Rule[] |
Defined in#
packages/bpmn-server/src/dmn/DMNParser.ts:16
Decision#
Ƭ Decision: Object
Type declaration#
| Name | Type |
|---|---|
id |
string |
name |
string |
requires |
string[] |
table? |
DecisionTable |
literal? |
{ text: string ; variable: string ; typeRef: string } |
literal.text |
string |
literal.variable |
string |
literal.typeRef |
string |
Defined in#
packages/bpmn-server/src/dmn/DMNParser.ts:24
DMNDefinitions#
Ƭ DMNDefinitions: Object
Type declaration#
| Name | Type |
|---|---|
id |
string |
name |
string |
decisions |
Decision[] |
Defined in#
packages/bpmn-server/src/dmn/DMNParser.ts:32
DMNIssue#
Ƭ DMNIssue: Object
A problem found in a DMN file: where it is and what is wrong.
Type declaration#
| Name | Type |
|---|---|
decisionId? |
string |
ruleId? |
string |
ruleIndex? |
number |
message |
string |
Defined in#
packages/bpmn-server/src/dmn/DMNParser.ts:35
ModelIssueSeverity#
Ƭ ModelIssueSeverity: "error" | "warning" | "info"
Static verification of a BPMN model: reports what would stop the engine from loading or running it (errors) and what is likely a modelling mistake (warnings), without starting it.
const result = await verifyModel(xml, server);
if (!result.valid) result.issues.filter(i => i.severity == 'error').forEach(i => console.log(i.message));
Defined in#
packages/bpmn-server/src/elements/verifyModel.ts:31
DecisionLookup#
Ƭ DecisionLookup: (ref: string, folder: string) => { folder: string ; name: string } | null
A decision found by its tests' name (LeaveApproval.policy): its folder and name, or null when it isn't this one's.
Type declaration#
▸ (ref, folder): { folder: string ; name: string } | null
Parameters#
| Name | Type |
|---|---|
ref |
string |
folder |
string |
Returns#
{ folder: string ; name: string } | null
Defined in#
packages/bpmn-server/src/engine/AddOns.ts:138
ApiEvent#
Ƭ ApiEvent: typeof API_EVENTS[number]
Defined in#
packages/bpmn-server/src/engine/AddOns.ts:173
ContextKind#
Ƭ ContextKind: "item" | "element" | "dmn" | "query" | "form"
Defined in#
packages/bpmn-server/src/engine/Context.ts:18
DecisionKind#
Ƭ DecisionKind: "decision" | "assignment" | "security" | "notification"
What is deciding: a business rule task's decision, an assignment, security or notification policy.
Defined in#
packages/bpmn-server/src/engine/DecisionContext.ts:25
ScriptContext#
Ƭ ScriptContext: Record\<string, (scope: { data: any }) => any>
A variable scripts see besides their own: its value, from a copy of the data (so it can not change the process's).
Defined in#
packages/bpmn-server/src/engine/ScriptHandler.ts:18
LifecycleNotification#
Ƭ LifecycleNotification: Object
Internal engine lifecycle notifications: what happened to an execution (process.start,
wait, end, …: the EXECUTION_EVENT names), distinct from BPMN events (messages,
signals, timers, which the engine correlates itself) and from an application's business events.
Delivery: in order, awaited, after the engine's own listeners and the application delegate.
A subscriber's failure is reported to the server's logger and does not abort the execution or
reach the other subscribers: a subscriber that must not miss a notification records it durably
itself (an outbox) and treats a repeat as a duplicate (item.id with the event identifies it).
Type declaration#
| Name | Type | Description |
|---|---|---|
type |
string |
The event's name (an EXECUTION_EVENT value). |
context |
any |
The execution it happened to. |
details? |
unknown |
- |
Defined in#
packages/bpmn-server/src/interfaces/lifecycle.ts:11
IUpgradeOutcome#
Ƭ IUpgradeOutcome: "upgraded" | "would-upgrade" | "current" | "ended" | "stranded" | "busy" | "failed"
What upgradeRunning did with an instance.
Defined in#
packages/bpmn-server/src/interfaces/server.ts:150
StorageQuery#
Ƭ StorageQuery: Record\<string, any>
The storage ports: what the engine's persistence components (the instance DataStore, the models datastore and the instance locker) need from a database, so that MongoDB is one adapter among others (an in-memory store; an application's PostgreSQL) and no engine code changes with it.
Documents are plain JSON objects. Queries, updates, projections and sorts use the subset of
MongoDB's query language the engine issues (equality, dotted paths into arrays, $elemMatch,
$or, $nor, $and, $exists, $eq, $ne, $in, $nin, $lt, $lte, $gt, $gte, $not, $regex;
$set and whole-document updates, with upsert); an adapter that cannot evaluate a query
refuses it, never ignores part of it.
Defined in#
packages/bpmn-server/src/interfaces/storage.ts:12
StorageProjection#
Ƭ StorageProjection: Record\<string, 0 | 1 | any> | null
Defined in#
packages/bpmn-server/src/interfaces/storage.ts:13
StorageSort#
Ƭ StorageSort: Record\<string, 1 | -1> | null
Defined in#
packages/bpmn-server/src/interfaces/storage.ts:14
Variables#
SystemUser#
• Const SystemUser: SecureUser
Defined in#
packages/bpmn-server/src/API/SecureUser.ts:248
aiManifest#
• Const aiManifest: IAddOnManifest
Defined in#
packages/bpmn-server/src/addons/ai/index.ts:9
aiAddOn#
• Const aiAddOn: IAddOn
Defined in#
packages/bpmn-server/src/addons/ai/index.ts:11
POLICY_FIELDS#
• Const POLICY_FIELDS: readonly ["assignee", "candidateUsers", "candidateGroups"] = ASSIGNMENT_FIELDS
What a policy's rule sets: the engine's assignment fields.
Defined in#
packages/bpmn-server/src/addons/assignment/AssignmentPolicy.ts:21
POLICIES_FOLDER#
• Const POLICIES_FOLDER: "assignment"
The models folder's assignment policies: the Assignment add-on's own folder (before 3.7.5, policies/assignment).
Defined in#
packages/bpmn-server/src/addons/assignment/AssignmentPolicy.ts:23
assignmentManifest#
• Const assignmentManifest: IAddOnManifest
The Assignment add-on's manifest (addon.json): what it reads of a model, its settings, its doc page.
Defined in#
packages/bpmn-server/src/addons/assignment/index.ts:107
assignmentAddOn#
• Const assignmentAddOn: IAddOn
Defined in#
packages/bpmn-server/src/addons/assignment/index.ts:109
ACTOR_ELEMENTS#
• Const ACTOR_ELEMENTS: string[]
The elements that may name an actor: the user who completes a user task, or starts the process at a start event.
Defined in#
packages/bpmn-server/src/addons/basics/actors.ts:12
BUILT_IN_ACTORS#
• Const BUILT_IN_ACTORS: readonly ["initiator", "assignee", "candidate"]
The actors every instance has; a model names its own with owf:actor.
Defined in#
packages/bpmn-server/src/addons/basics/actors.ts:15
actorsName#
• Const actorsName: IExpressionName
actors, the name every expression sees: for a place in an instance, worked out when read (a script's), or at once
(materialized: a decision's, the sandbox's).
Defined in#
packages/bpmn-server/src/addons/basics/actors.ts:106
OLD_POLICIES_FOLDER#
• Const OLD_POLICIES_FOLDER: "policies"
The folder before 3.7.5 that held the policies' folders.
Defined in#
packages/bpmn-server/src/addons/basics/folders.ts:14
LOOKUP_LIMIT#
• Const LOOKUP_LIMIT: 50
At most this many choices are answered.
Defined in#
packages/bpmn-server/src/addons/forms/FormLookup.ts:25
formsManifest#
• Const formsManifest: IAddOnManifest = manifest
Defined in#
packages/bpmn-server/src/addons/forms/index.ts:14
formsAddOn#
• Const formsAddOn: IAddOn
Defined in#
packages/bpmn-server/src/addons/forms/index.ts:102
POLICY_ADD_ONS#
• Const POLICY_ADD_ONS: string[]
The policies' three add-ons, in the order they are registered: who works on a task is decided before anyone is told.
Defined in#
packages/bpmn-server/src/addons/index.ts:31
policiesManifest#
• Const policiesManifest: IAddOnManifest
Deprecated
the three add-ons' manifests together: what policies was before 3.7.5
Defined in#
packages/bpmn-server/src/addons/index.ts:34
policiesAddOn#
• Const policiesAddOn: IAddOn
Deprecated
the three add-ons, registered together: what policies was before 3.7.5
Defined in#
packages/bpmn-server/src/addons/index.ts:42
APP_CONFIG_FILE#
• Const APP_CONFIG_FILE: "app-config.json"
Defined in#
packages/bpmn-server/src/addons/index.ts:60
FILTER_OPS#
• Const FILTER_OPS: readonly ["contains", "is", "gt", "lt"]
The filter's ops: contains (any case), is, more than, less than.
Defined in#
packages/bpmn-server/src/addons/labels/Labels.ts:301
labelsManifest#
• Const labelsManifest: IAddOnManifest = manifest
Defined in#
packages/bpmn-server/src/addons/labels/index.ts:13
labelsAddOn#
• Const labelsAddOn: IAddOn
Defined in#
packages/bpmn-server/src/addons/labels/index.ts:34
modelingManifest#
• Const modelingManifest: IAddOnManifest
Defined in#
packages/bpmn-server/src/addons/modeling/index.ts:9
modelingAddOn#
• Const modelingAddOn: IAddOn
Defined in#
packages/bpmn-server/src/addons/modeling/index.ts:11
NOTIFICATION_FOLDER#
• Const NOTIFICATION_FOLDER: "notification"
Defined in#
packages/bpmn-server/src/addons/notification/NotificationPolicy.ts:20
NOTIFICATION_TEMPLATES#
• Const NOTIFICATION_TEMPLATES: "notification/templates"
Defined in#
packages/bpmn-server/src/addons/notification/NotificationPolicy.ts:21
NOTIFICATION_COLLECTION#
• Const NOTIFICATION_COLLECTION: "wf_notifications"
Defined in#
packages/bpmn-server/src/addons/notification/NotificationPolicy.ts:22
NOTIFICATION_EVENTS#
• Const NOTIFICATION_EVENTS: readonly ["assigned", "completed", "ended"]
Defined in#
packages/bpmn-server/src/addons/notification/NotificationPolicy.ts:23
NOTIFICATION_OUTPUTS#
• Const NOTIFICATION_OUTPUTS: readonly ["notify", "template", "channel"]
Defined in#
packages/bpmn-server/src/addons/notification/NotificationPolicy.ts:24
notificationManifest#
• Const notificationManifest: IAddOnManifest
The Notifications add-on's manifest (addon.json): what it reads of a model, its settings, its doc page.
Defined in#
packages/bpmn-server/src/addons/notification/index.ts:84
notificationAddOn#
• Const notificationAddOn: IAddOn
Defined in#
packages/bpmn-server/src/addons/notification/index.ts:86
DECIDE_AT_ONCE#
• Const DECIDE_AT_ONCE: 16
How many cases a list's page decides at once (CaseAccess.decideAll).
Defined in#
packages/bpmn-server/src/addons/security/CaseAccess.ts:14
SECURITY_FOLDER#
• Const SECURITY_FOLDER: "security"
Defined in#
packages/bpmn-server/src/addons/security/SecurityPolicy.ts:25
DEFAULT_SECURITY_POLICY#
• Const DEFAULT_SECURITY_POLICY: "default"
The application's default policy, for a process that names none.
Defined in#
packages/bpmn-server/src/addons/security/SecurityPolicy.ts:27
SECURITY_ACTIONS#
• Const SECURITY_ACTIONS: readonly ["see", "data", "claim", "complete", "assign", "restart", "events"]
Defined in#
packages/bpmn-server/src/addons/security/SecurityPolicy.ts:28
FULL_ACCESS#
• Const FULL_ACCESS: IAccess
Defined in#
packages/bpmn-server/src/addons/security/SecurityPolicy.ts:80
securityManifest#
• Const securityManifest: IAddOnManifest
The Access Control add-on's manifest (addon.json): what it reads of a model, its settings, its doc page.
Defined in#
packages/bpmn-server/src/addons/security/index.ts:63
securityAddOn#
• Const securityAddOn: IAddOn
Defined in#
packages/bpmn-server/src/addons/security/index.ts:65
defaultConfiguration#
• Const defaultConfiguration: Configuration
Defined in#
packages/bpmn-server/src/common/DefaultConfiguration.ts:119
HTTP_METHODS#
• Const HTTP_METHODS: string[]
Defined in#
packages/bpmn-server/src/connectors/OpenAPI.ts:7
SECRETS_KEY#
• Const SECRETS_KEY: "SECRETS_KEY"
The variable that holds the key, and its name before 3.7.5.
Defined in#
packages/bpmn-server/src/connectors/Secrets.ts:11
OLD_SECRETS_KEY#
• Const OLD_SECRETS_KEY: "CONNECTORS_KEY"
Defined in#
packages/bpmn-server/src/connectors/Secrets.ts:12
HIT_POLICIES#
• Const HIT_POLICIES: string[]
Defined in#
packages/bpmn-server/src/dmn/DMNParser.ts:37
Behaviour_names#
• Const Behaviour_names: Object
Type declaration#
| Name | Type |
|---|---|
TimerEventDefinition |
string |
LoopCharacteristics |
string |
IOSpecification |
string |
TerminateEventDefinition |
string |
MessageEventDefinition |
string |
SignalEventDefinition |
string |
ErrorEventDefinition |
string |
EscalationEventDefinition |
string |
CancelEventDefinition |
string |
CompensateEventDefinition |
string |
CamundaFormData |
string |
CamundaScript |
string |
CamundaScript2 |
string |
CamundaScript3 |
string |
CamundaIO |
string |
CamundaConnector |
string |
Defined in#
packages/bpmn-server/src/elements/behaviours/BehaviourLoader.ts:22
OWF_NAMESPACE#
• Const OWF_NAMESPACE: "http://omniworkflow.com/schema/owf/1.0"
The owf: namespace's URI, as a model declares it: xmlns:owf="http://omniworkflow.com/schema/owf/1.0".
Defined in#
packages/bpmn-server/src/elements/owfAttributes.ts:8
LEGACY_CAMUNDA#
• Const LEGACY_CAMUNDA: readonly ["assignmentPolicy", "label", "endLabel", "exceptionsAsErrors"]
OWF's attributes once written as camunda: (Camunda does not define them).
Defined in#
packages/bpmn-server/src/elements/owfAttributes.ts:11
ASSIGNMENT_FIELDS#
• Const ASSIGNMENT_FIELDS: readonly ["assignee", "candidateUsers", "candidateGroups"]
The fields that say who works on a user task: its assignee and its candidates. The engine's, an add-on may set them.
Defined in#
packages/bpmn-server/src/engine/AddOns.ts:18
API_EVENTS#
• Const API_EVENTS: readonly ["pre-query", "pre-action"]
The API's own events (docs/design/context-object.md): fired before a read (pre-query, a context of kind query: a
listener adds conditions to context.conditions, never widens) and before an action (pre-action: a listener may
refuse, by throwing). An add-on listens as to any event, server.listener.on('pre-query', (context) => ...).
Defined in#
packages/bpmn-server/src/engine/AddOns.ts:172
APP_CONTRACT_FILE#
• Const APP_CONTRACT_FILE: "app-contract.json"
Defined in#
packages/bpmn-server/src/engine/AppContract.ts:13
DECISION_KEYS#
• Const DECISION_KEYS: readonly ["data", "user", "actors", "task", "decision", "item", "this", "instance", "appServices"]
The names the protocol sets: the data and the prepared inputs can't.
Defined in#
packages/bpmn-server/src/engine/DecisionContext.ts:45
MAX_COLUMNS#
• Const MAX_COLUMNS: 12
At most this many columns in a list.
Defined in#
packages/bpmn-server/src/engine/ListColumns.ts:14
Functions#
policyFile#
▸ policyFile(definitionsPath, name): string | null
A policy's file in a models folder, or null when it isn't there.
Parameters#
| Name | Type |
|---|---|
definitionsPath |
string |
name |
string |
Returns#
string | null
Defined in#
packages/bpmn-server/src/addons/assignment/AssignmentPolicy.ts:34
policyNames#
▸ policyNames(definitionsPath): string[]
The policies of a models folder, by name.
Parameters#
| Name | Type |
|---|---|
definitionsPath |
string |
Returns#
string[]
Defined in#
packages/bpmn-server/src/addons/assignment/AssignmentPolicy.ts:41
evaluatePolicy#
▸ evaluatePolicy(file, context, log?): Promise\<{ rule?: number ; outputs: Record\<string, any> | null }>
A policy evaluated with this data: the first matching rule's number and its outputs (a $(...) cell as its text,
for the caller to evaluate), or no rule. Throws when the file can't be read or a cell isn't FEEL.
Parameters#
| Name | Type |
|---|---|
file |
string |
context |
Record\<string, any> |
log? |
(message: string) => void |
Returns#
Promise\<{ rule?: number ; outputs: Record\<string, any> | null }>
Defined in#
packages/bpmn-server/src/addons/assignment/AssignmentPolicy.ts:55
applyPolicy#
▸ applyPolicy(node, item, policy): Promise\<{ set: Record\<string, any> ; why: IItemAssignment } | null>
Evaluates the task's policy: what the matching rule's outputs give (each field it sets to replace the model's), and what decided it; null when it assigns nothing. Writes a Rationale entry either way; never throws. The caller sets them (Execution.assignItem).
Parameters#
| Name | Type |
|---|---|
node |
any |
item |
any |
policy |
string |
Returns#
Promise\<{ set: Record\<string, any> ; why: IItemAssignment } | null>
Defined in#
packages/bpmn-server/src/addons/assignment/AssignmentPolicy.ts:67
reassigned#
▸ reassigned(execution, item, before, changed, userName, previous?): void
A person changed a waiting task's assignee or candidates (Execution.assign, its assign event), and the Rationale
says what it was and what it is now. before: its fields beforehand; changed: the assignment's fields given;
previous: what had decided it. A claim (taking an unassigned task oneself) keeps what offered it to them; any other
change is that person's (the engine records it).
Parameters#
| Name | Type |
|---|---|
execution |
any |
item |
any |
before |
Record\<string, any> |
changed |
Record\<string, any> |
userName |
string |
previous? |
IItemAssignment |
Returns#
void
Defined in#
packages/bpmn-server/src/addons/assignment/AssignmentPolicy.ts:122
roleUses#
▸ roleUses(definitionsPath): Promise\<Map\<string, string[]>>
Where each name is used as a role in a models folder: the lanes of its models (<model>: lane), and the groups its
policies assign as literals (policy <name>, rule <n>). By name.
Parameters#
| Name | Type |
|---|---|
definitionsPath |
string |
Returns#
Promise\<Map\<string, string[]>>
Defined in#
packages/bpmn-server/src/addons/assignment/AssignmentPolicy.ts:140
actorElements#
▸ actorElements(model): Map\<string, string>
The elements a model names as actors (owf:actor="approver"), by element id: an actor is the name for the user who
completes a user task, or starts the process at a start event; on any other element it means nothing (verifyModel
warns). model: its XML, or a loaded definition (its nodes).
Parameters#
| Name | Type |
|---|---|
model |
any |
Returns#
Map\<string, string>
Defined in#
packages/bpmn-server/src/addons/basics/actors.ts:31
initiatorOf#
▸ initiatorOf(instance, items?): string | null
Who started an instance: its start event's item's user, else its first item's, else the instance's.
Parameters#
| Name | Type |
|---|---|
instance |
any |
items |
any[] |
Returns#
string | null
Defined in#
packages/bpmn-server/src/addons/basics/actors.ts:56
actorsOf#
▸ actorsOf(«destructured»): Record\<string, Actor>
An instance's actors, worked out from its items: who started it, who completed each element the model names
(elements, from actorElements), the waiting user tasks' assignees and candidates (users and groups). With
scope (an item's data path), only the items of its branch count, as its data does; without, all of them.
Parameters#
| Name | Type | Default value |
|---|---|---|
«destructured» |
Object |
undefined |
› instance? |
any |
undefined |
› items? |
any[] |
undefined |
› tokens? |
any[] |
instance.tokens |
› elements? |
Map\<string, string> |
undefined |
› scope? |
string |
undefined |
Returns#
Record\<string, Actor>
Defined in#
packages/bpmn-server/src/addons/basics/actors.ts:72
actorNamesOf#
▸ actorNamesOf(user, actors): string[]
The actors a user is: the names whose value is them (or, for a candidate, one of their groups).
Parameters#
| Name | Type |
|---|---|
user |
IDecisionUser |
actors |
Record\<string, Actor> |
Returns#
string[]
Defined in#
packages/bpmn-server/src/addons/basics/actors.ts:93
movePolicyFolder#
▸ movePolicyFolder(definitionsPath, kind, warn?): string
The add-on's folder in this models folder (<definitionsPath>/<kind>), its policies moved there first from where
they were before 3.7.5. warn: where the move is reported (once per folder).
Parameters#
| Name | Type | Default value |
|---|---|---|
definitionsPath |
string |
undefined |
kind |
PolicyKind |
undefined |
warn |
(message: string) => void |
console.warn |
Returns#
string
Defined in#
packages/bpmn-server/src/addons/basics/folders.ts:52
registerPolicyBasics#
▸ registerPolicyBasics(server): void
The actors, registered once on a server (each of the three add-ons asks).
Parameters#
| Name | Type |
|---|---|
server |
any |
Returns#
void
Defined in#
packages/bpmn-server/src/addons/basics/index.ts:45
parseLookupSource#
▸ parseLookupSource(text): IFormLookup["source"] | undefined
A source as written: service:<name> or connector:<connector>/<operationId>; undefined when it is neither.
Parameters#
| Name | Type |
|---|---|
text |
string |
Returns#
IFormLookup["source"] | undefined
Defined in#
packages/bpmn-server/src/addons/forms/FormLookup.ts:59
lookupElement#
▸ lookupElement(field): any
A form field's <owf:list> or <owf:lookup> element (the first, when it has more).
Parameters#
| Name | Type |
|---|---|
field |
any |
Returns#
any
Defined in#
packages/bpmn-server/src/addons/forms/FormLookup.ts:72
lookupElements#
▸ lookupElements(field): any[]
The lookup elements of a field: more than one is a model's mistake (verifyModel).
Parameters#
| Name | Type |
|---|---|
field |
any |
Returns#
any[]
Defined in#
packages/bpmn-server/src/addons/forms/FormLookup.ts:77
formFieldLookup#
▸ formFieldLookup(field): IFormLookup | undefined
A form field's list or lookup, read from its <owf:list> or <owf:lookup>; undefined when it has none or no valid source.
Parameters#
| Name | Type |
|---|---|
field |
any |
Returns#
IFormLookup | undefined
Defined in#
packages/bpmn-server/src/addons/forms/FormLookup.ts:82
filterPath#
▸ filterPath(filter): string | undefined
A filter's data path: ${data.department} reads department; anything else is not one.
Parameters#
| Name | Type |
|---|---|
filter |
string |
Returns#
string | undefined
Defined in#
packages/bpmn-server/src/addons/forms/FormLookup.ts:103
filterValue#
▸ filterValue(lookup, data?): any
A filter's value, from the form's values first, then the case's data.
Parameters#
| Name | Type |
|---|---|
lookup |
IFormLookup |
data |
Record\<string, any> |
Returns#
any
Defined in#
packages/bpmn-server/src/addons/forms/FormLookup.ts:108
choicesOf#
▸ choicesOf(output, lookup, text?): ILookupChoice[]
The choices in a source's answer: its rows' key and display, those with a key; searched when the source did not.
Parameters#
| Name | Type | Default value |
|---|---|---|
output |
any |
undefined |
lookup |
IFormLookup |
undefined |
text |
string |
'' |
Returns#
Defined in#
packages/bpmn-server/src/addons/forms/FormLookup.ts:114
lookupChoices#
▸ lookupChoices(server, lookup, criteria?, context?): Promise\<ILookupChoice[]>
A field's choices, asked for now: its source called with the criteria (the text typed, the filter's value), and
its answer's rows as choices. server: its appDelegate for a service (getServicesProvider), its connectors
for a connector (their keys stay with the server). context: who is asking and from where, given to a service as
its second argument. A source that is missing or fails throws.
Parameters#
| Name | Type |
|---|---|
server |
any |
lookup |
IFormLookup |
criteria |
ILookupCriteria |
context |
Record\<string, any> |
Returns#
Promise\<ILookupChoice[]>
Defined in#
packages/bpmn-server/src/addons/forms/FormLookup.ts:155
readAppConfig#
▸ readAppConfig(file?): { [more: string]: any; addOns?: string[] } | null
The application's app-config.json (the working folder's, or the one given), or null when there is none.
Parameters#
| Name | Type |
|---|---|
file |
string |
Returns#
{ [more: string]: any; addOns?: string[] } | null
Defined in#
packages/bpmn-server/src/addons/index.ts:63
addOnManifests#
▸ addOnManifests(): IAddOnManifest[]
The manifests of every add-on bpmn-server comes with, on or off.
Returns#
Defined in#
packages/bpmn-server/src/addons/index.ts:72
enabledAddOns#
▸ enabledAddOns(file?, warn?): IAddOn[]
The add-ons that are on: those app-config.json names, in bpmn-server's order; every one with no file or no
addOns. A name that isn't an add-on is reported (warn) and left out.
Parameters#
| Name | Type | Default value |
|---|---|---|
file? |
string |
undefined |
warn |
(message: string) => void |
console.warn |
Returns#
IAddOn[]
Defined in#
packages/bpmn-server/src/addons/index.ts:80
addOnNames#
▸ addOnNames(names): string[]
The names an app-config.json's addOns means: policies (before 3.7.5) is the three it became.
Parameters#
| Name | Type |
|---|---|
names |
string[] |
Returns#
string[]
Defined in#
packages/bpmn-server/src/addons/index.ts:95
policyAddOns#
▸ policyAddOns(): IAddOn[]
The policies' add-ons, alone (Assignment, Notifications, Access Control): what a server had before app-config.json.
Returns#
IAddOn[]
Defined in#
packages/bpmn-server/src/addons/index.ts:100
labelParts#
▸ labelParts(template): ILabelPart[]
A template's parts, in order. In parts (;): each part, with at most one value (a second is reported by
templateProblems, and read as part of its text). Else, as before 3.7.5: each value with the text before it, and the
text after the last one a part of its own.
Parameters#
| Name | Type |
|---|---|
template |
string |
Returns#
Defined in#
packages/bpmn-server/src/addons/labels/LabelTemplate.ts:69
namedValues#
▸ namedValues(template): { name: string ; path: string }[]
A template's values: their names and the paths they read, in order.
Parameters#
| Name | Type |
|---|---|
template |
string |
Returns#
{ name: string ; path: string }[]
Defined in#
packages/bpmn-server/src/addons/labels/LabelTemplate.ts:94
templateProblems#
▸ templateProblems(template): string[]
A template's problems: each value a path, at most one in a part, a name given a name, no name twice.
Parameters#
| Name | Type |
|---|---|
template |
unknown |
Returns#
string[]
Defined in#
packages/bpmn-server/src/addons/labels/LabelTemplate.ts:99
fillTemplate#
▸ fillTemplate(template, scope): ILabel
A template filled in from scope. A part whose value is missing (none, null, '', only spaces) is left out, its text
too, so a label never shows a name with nothing after it. In parts, the parts are joined with ·; separators left
at either end are trimmed.
Parameters#
| Name | Type |
|---|---|
template |
string |
scope |
Record\<string, unknown> |
Returns#
Defined in#
packages/bpmn-server/src/addons/labels/LabelTemplate.ts:125
modelLabels#
▸ modelLabels(source, moddleOptions?): Promise\<IModelLabels>
The label templates of a model's source: its process's, and every element's, sub-processes included.
Parameters#
| Name | Type | Default value |
|---|---|---|
source |
string |
undefined |
moddleOptions |
Object |
defaultModdleOptions |
moddleOptions.name |
string |
"Node bpmn-engine" |
moddleOptions.uri |
string |
"http://paed01.github.io/bpmn-engine/schema/2017/08/bpmn" |
moddleOptions.prefix |
string |
"js" |
moddleOptions.xml |
Object |
undefined |
moddleOptions.xml.tagAlias |
string |
"lowerCase" |
moddleOptions.types |
({ name: string = "Output"; superClass: string[] ; isAbstract?: undefined = true; extends?: undefined ; properties?: undefined } | { superClass?: undefined ; name: string = "processExtensions"; isAbstract: boolean = true; extends: string[] ; properties: ({ name: string = "camunda:candidateStarterGroups"; isAttr: boolean = true; type: string = "String"; default?: undefined = true } | { name: string = "camunda:isStartableInTasklist"; isAttr: boolean = true; type: string = "Boolean"; default: boolean = true })[] })[] |
undefined |
Returns#
Promise\<IModelLabels>
Defined in#
packages/bpmn-server/src/addons/labels/Labels.ts:38
labelsOn#
▸ labelsOn(server): boolean
Whether the Labels add-on is on for this server (app-config.json): off, a case is shown by its default (`
`) and a task by its name. A server that says nothing of add-ons (an object of the application's): on.#
Parameters#
| Name | Type |
|---|---|
server |
any |
Returns#
boolean
Defined in#
packages/bpmn-server/src/addons/labels/Labels.ts:76
caseLabel#
▸ caseLabel(server, instance, labels?): Promise\<ILabel>
A case's label: its model's template, else the application's instanceLabel hook, else <model> #<caseId>.
Parameters#
| Name | Type |
|---|---|
server |
any |
instance |
any |
labels? |
IModelLabels |
Returns#
Promise\<ILabel>
Defined in#
packages/bpmn-server/src/addons/labels/Labels.ts:123
activityLabel#
▸ activityLabel(item, labels, caseValues, instance?): ILabel | undefined
An activity's own label: once it has ended, its endLabel; else (or when that says nothing) its label. The
template sees the item's data (a loop round's or a sub-process's own), its fields, and its case's named values
as instance.<Name>. Undefined when the element has none.
Parameters#
| Name | Type |
|---|---|
item |
any |
labels |
IModelLabels |
caseValues |
ILabelValue[] |
instance? |
any |
Returns#
ILabel | undefined
Defined in#
packages/bpmn-server/src/addons/labels/Labels.ts:132
labelInstances#
▸ labelInstances(server, instances): Promise\<any[]>
Cases labeled for display, from their own model's templates: instance.label (text), instance.labelValues
(its named values), and each item's label and labelValues when its element has a label. Nothing is saved.
Parameters#
| Name | Type |
|---|---|
server |
any |
instances |
any[] |
Returns#
Promise\<any[]>
Defined in#
packages/bpmn-server/src/addons/labels/Labels.ts:162
labelItems#
▸ labelItems(server, items): Promise\<any[]>
Tasks labeled for display (findItems' items: each with its data and its case's): item.caseLabel, its case's
label; item.label, its own, else its name and its case's. The cases' own sources are read in one query.
Parameters#
| Name | Type |
|---|---|
server |
any |
items |
any[] |
Returns#
Promise\<any[]>
Defined in#
packages/bpmn-server/src/addons/labels/Labels.ts:203
labelFields#
▸ labelFields(server, models?): Promise\<ILabelField[]>
The values the models' case labels (their current versions) show, for the lists' filters.
Parameters#
| Name | Type |
|---|---|
server |
any |
models? |
string[] |
Returns#
Promise\<ILabelField[]>
Defined in#
packages/bpmn-server/src/addons/labels/Labels.ts:259
labelQuery#
▸ labelQuery(fields, filter?): Record\<string, any> | undefined
A filter as a query on the cases (findInstances, and findItems for their tasks): the model, then the named value on each model's own path, then the search on every named value. Undefined when there is nothing to filter.
Parameters#
| Name | Type |
|---|---|
fields |
ILabelField[] |
filter |
ILabelFilter |
Returns#
Record\<string, any> | undefined
Defined in#
packages/bpmn-server/src/addons/labels/Labels.ts:307
notificationPolicyFile#
▸ notificationPolicyFile(definitionsPath, name): string | null
A notification policy's file, or null.
Parameters#
| Name | Type |
|---|---|
definitionsPath |
string |
name |
string |
Returns#
string | null
Defined in#
packages/bpmn-server/src/addons/notification/NotificationPolicy.ts:56
notificationPolicyNames#
▸ notificationPolicyNames(definitionsPath): string[]
The models folder's notification policies, by name.
Parameters#
| Name | Type |
|---|---|
definitionsPath |
string |
Returns#
string[]
Defined in#
packages/bpmn-server/src/addons/notification/NotificationPolicy.ts:63
notificationTemplateFile#
▸ notificationTemplateFile(definitionsPath, name): string | null
A template's file (templates/<name>.md or .txt), or null: a value that isn't one is the message itself.
Parameters#
| Name | Type |
|---|---|
definitionsPath |
string |
name |
string |
Returns#
string | null
Defined in#
packages/bpmn-server/src/addons/notification/NotificationPolicy.ts:70
deliversNotifications#
▸ deliversNotifications(instance): boolean
Whether notifications are delivered: not for a test run's instance, nor with NOTIFICATIONS=record.
Parameters#
| Name | Type |
|---|---|
instance |
any |
Returns#
boolean
Defined in#
packages/bpmn-server/src/addons/notification/NotificationPolicy.ts:81
notifyEvent#
▸ notifyEvent(execution, event, item?): Promise\<INotification[]>
An event of an instance (item: its user task, for assigned and completed): the process's policy and the task's
own asked, each matching rule's notification worked out, delivered (or not) and kept. Never throws.
Parameters#
| Name | Type |
|---|---|
execution |
any |
event |
"ended" | "assigned" | "completed" |
item? |
any |
Returns#
Promise\<INotification[]>
Defined in#
packages/bpmn-server/src/addons/notification/NotificationPolicy.ts:93
findNotifications#
▸ findNotifications(server, query?): Promise\<INotification[]>
Notifications across the instances, newest first: to whom, of which instance or process, in which status.
Parameters#
| Name | Type |
|---|---|
server |
any |
query |
INotificationQuery |
Returns#
Promise\<INotification[]>
Defined in#
packages/bpmn-server/src/addons/notification/NotificationPolicy.ts:225
notificationsOf#
▸ notificationsOf(server, instanceId): Promise\<INotification[]>
An instance's notifications, oldest first.
Parameters#
| Name | Type |
|---|---|
server |
any |
instanceId |
string |
Returns#
Promise\<INotification[]>
Defined in#
packages/bpmn-server/src/addons/notification/NotificationPolicy.ts:242
securityUser#
▸ securityUser(user): ISecurityUser
A user as a policy sees them: administrators, the system, and security turned off are not asked.
Parameters#
| Name | Type |
|---|---|
user |
SecureUser |
Returns#
Defined in#
packages/bpmn-server/src/addons/security/CaseAccess.ts:27
seeConditionsOfTable#
▸ seeConditionsOfTable(file, user): Promise\<any[]>
One policy table's narrowing for this user.
Parameters#
| Name | Type |
|---|---|
file |
string |
user |
ISeeUser |
Returns#
Promise\<any[]>
Defined in#
packages/bpmn-server/src/addons/security/SecurityQuery.ts:50
builtInSeeConditions#
▸ builtInSeeConditions(user): any[]
The built-in default's narrowing (SecurityPolicy.builtInDefault): designers any case; the others, theirs.
Parameters#
| Name | Type |
|---|---|
user |
ISeeUser |
Returns#
any[]
Defined in#
packages/bpmn-server/src/addons/security/SecurityQuery.ts:96
combineSeeConditions#
▸ combineSeeConditions(byPolicy, fallback): object | null
The store's condition for the cases this user may see, across the models: each policy's narrowing for the models that name it, the default's for every case (a superset for the others). null: no narrowing (any case may be seen).
Parameters#
| Name | Type |
|---|---|
byPolicy |
{ models: string[] ; conditions: object[] }[] |
fallback |
object[] |
Returns#
object | null
Defined in#
packages/bpmn-server/src/addons/security/SecurityQuery.ts:109
settingProblem#
▸ settingProblem(value, entry): string | null
Why a value does not fit its schema entry, or null. An empty value is unset, and fits.
Parameters#
| Name | Type |
|---|---|
value |
string |
entry |
any |
Returns#
string | null
Defined in#
packages/bpmn-server/src/common/settingValue.ts:8
settingsProblems#
▸ settingsProblems(env, schema, names?): string[]
The settings' problems, one line each: a value of the wrong kind (PORT=abc: PORT is a number), and among names
(those the .env file sets) one that is not a setting but close to one (SESSON_SECRET: not a setting; SESSION_SECRET?).
A name far from every setting is the application's own, and not reported.
Parameters#
| Name | Type | Default value |
|---|---|---|
env |
Record\<string, string> |
undefined |
schema |
any |
undefined |
names |
string[] |
[] |
Returns#
string[]
Defined in#
packages/bpmn-server/src/common/settingValue.ts:40
parseEnv#
▸ parseEnv(text): Record\<string, string>
A .env file's values, by name (quotes removed).
Parameters#
| Name | Type |
|---|---|
text |
string |
Returns#
Record\<string, string>
Defined in#
packages/bpmn-server/src/common/settingValue.ts:59
renderEnv#
▸ renderEnv(text, changes, by?): string
The .env with the changes (lines it adds go under a comment saying who set them, by): a setting's line replaced (or its commented #NAME= line), else added; null removes it.
Parameters#
| Name | Type | Default value |
|---|---|---|
text |
string |
undefined |
changes |
Record\<string, string> |
undefined |
by |
string |
'bpmn-server setup' |
Returns#
string
Defined in#
packages/bpmn-server/src/common/settingValue.ts:74
dateDiff#
▸ dateDiff(dateStr): string
Parameters#
| Name | Type |
|---|---|
dateStr |
any |
Returns#
string
Defined in#
packages/bpmn-server/src/common/timer.ts:4
connectorsTesting#
▸ connectorsTesting(env?): string
The environment connectors may answer outside production in: APP_ENV, when it says development or test; else none.
Parameters#
| Name | Type | Default value |
|---|---|---|
env |
ProcessEnv |
process.env |
Returns#
string
Defined in#
packages/bpmn-server/src/connectors/Connectors.ts:93
parseDocument#
▸ parseDocument(text): any
A document from text: JSON, else YAML. Refuses what is not OpenAPI 3.x, and a $ref to another file. The
document is returned as it is written: its $refs are resolved when it is read (listOperations), never
stored resolved (that copies each shared schema wherever it is used: GitHub's 11 MB document becomes 50).
Parameters#
| Name | Type |
|---|---|
text |
string | object |
Returns#
any
Defined in#
packages/bpmn-server/src/connectors/OpenAPI.ts:37
refResolver#
▸ refResolver(document): (value: any) => any
A resolver of the document's local $refs (#/components/...): what a value is with each reference replaced by
what it points to. Each target is resolved once and shared by every place that refers to it (a recursive schema
refers back to itself), so resolving costs what the document is, however often its schemas are used.
Parameters#
| Name | Type |
|---|---|
document |
any |
Returns#
fn
▸ (value): any
Parameters#
| Name | Type |
|---|---|
value |
any |
Returns#
any
Defined in#
packages/bpmn-server/src/connectors/OpenAPI.ts:79
resolveRefs#
▸ resolveRefs(document): any
The document with its references resolved (shared: see refResolver).
Parameters#
| Name | Type |
|---|---|
document |
any |
Returns#
any
Defined in#
packages/bpmn-server/src/connectors/OpenAPI.ts:126
listOperations#
▸ listOperations(document): Object
Every operation of the document that has an operationId, by it; skipped lists those that have none.
Parameters#
| Name | Type |
|---|---|
document |
any |
Returns#
Object
| Name | Type |
|---|---|
operations |
Map\<string, Operation> |
skipped |
string[] |
Defined in#
packages/bpmn-server/src/connectors/OpenAPI.ts:142
exampleOf#
▸ exampleOf(schema, depth?): any
A value as a schema describes it (a connector's answer outside production, from its document): its example, else its default, else one made from its type: an object's properties, an array of one item, the first of an enum, a date for a date, 0, false, a string.
Parameters#
| Name | Type | Default value |
|---|---|---|
schema |
any |
undefined |
depth |
number |
0 |
Returns#
any
Defined in#
packages/bpmn-server/src/connectors/OpenAPI.ts:189
secretsKey#
▸ secretsKey(env?, warn?): string | undefined
The server's key for the secrets it stores: SECRETS_KEY, else CONNECTORS_KEY (its name before 3.7.5, said once).
Parameters#
| Name | Type | Default value |
|---|---|---|
env |
ProcessEnv |
process.env |
warn |
(message: string) => void |
console.warn |
Returns#
string | undefined
Defined in#
packages/bpmn-server/src/connectors/Secrets.ts:17
canEncrypt#
▸ canEncrypt(): boolean
Whether keys can be stored: SECRETS_KEY (or CONNECTORS_KEY, before 3.7.5) is set.
Returns#
boolean
Defined in#
packages/bpmn-server/src/connectors/Secrets.ts:35
databaseName#
▸ databaseName(dbConfig): string
The database a MongoDB configuration means: its db, else the database named in db_url's path, else
test — the one the MongoDB driver itself uses when client.db() is given no name. Naming it lets every
component use the same database: without it the instance, archive and model collections followed the
driver while the lock manager used the literal 'bpmn', so locks were kept in a database of their own.
Parameters#
| Name | Type |
|---|---|
dbConfig |
Object |
dbConfig.db? |
string |
dbConfig.db_url? |
string |
Returns#
string
Defined in#
packages/bpmn-server/src/datastore/MongoDB.ts:20
orderedId#
▸ orderedId(): string
An id for a document stored without one, ordered by when it was made, as MongoDB's ObjectIds are: newest-first
paging by _id (the instance lists, find with after) means the same on every store. 24 hex characters: the
milliseconds (12), a counter within the millisecond (4), random (8). In one process each is greater than the last.
Returns#
string
Defined in#
packages/bpmn-server/src/datastore/orderedId.ts:10
feelParses#
▸ feelParses(source, unary): boolean
The FEEL text parses: as unary tests (an input cell) or as an expression.
Parameters#
| Name | Type |
|---|---|
source |
string |
unary |
boolean |
Returns#
boolean
Defined in#
packages/bpmn-server/src/dmn/DMNParser.ts:173
legacyTest#
▸ legacyTest(source): string
Input cells written for bpmn-server's earlier evaluator: == 5 and != 5 are FEEL 5 and not(5).
Parameters#
| Name | Type |
|---|---|
source |
string |
Returns#
string
Defined in#
packages/bpmn-server/src/dmn/DMNParser.ts:189
label#
▸ label(element): string
An element in a decision's words: 'Name' (Id), or Id.
Parameters#
| Name | Type |
|---|---|
element |
any |
Returns#
string
Defined in#
packages/bpmn-server/src/elements/Flow.ts:15
valuesRead#
▸ valuesRead(expression, data): string
The values of the data an expression reads (data.x, $data.x.y, item.data.z): "x=1, y=\"a\"".
Parameters#
| Name | Type |
|---|---|
expression |
any |
data |
any |
Returns#
string
Defined in#
packages/bpmn-server/src/elements/Flow.ts:18
constraintsOf#
▸ constraintsOf(field): Record\<string, string | true>
A field's constraints, as { name: config }: from the parsed model, or the editor's moddle object.
Parameters#
| Name | Type |
|---|---|
field |
any |
Returns#
Record\<string, string | true>
Defined in#
packages/bpmn-server/src/elements/FormRules.ts:37
fieldProblems#
▸ fieldProblems(field, value, «destructured»?): IFormProblem[]
The problems of one field's value (value) by its type and constraints, but its list's.
Parameters#
| Name | Type |
|---|---|
field |
any |
value |
any |
«destructured» |
Object |
› sent |
boolean |
› current? |
any |
Returns#
Defined in#
packages/bpmn-server/src/elements/FormRules.ts:59
formProblems#
▸ formProblems(server, fields, sent?, current?, context?): Promise\<IFormProblem[]>
The problems of a form's values: sent, the data of the call; current, the case's. A list's value is checked
against its source's choices (as context asks); a source that fails refuses the value, which cannot be checked.
Parameters#
| Name | Type |
|---|---|
server |
any |
fields |
any[] |
sent |
Record\<string, any> |
current |
Record\<string, any> |
context |
Record\<string, any> |
Returns#
Promise\<IFormProblem[]>
Defined in#
packages/bpmn-server/src/elements/FormRules.ts:103
checkForm#
▸ checkForm(server, elementId, fields, sent, current, context?): Promise\<void>
Throws FormInvalidError when the values break the form's rules.
Parameters#
| Name | Type |
|---|---|
server |
any |
elementId |
string |
fields |
any[] |
sent |
Record\<string, any> |
current |
Record\<string, any> |
context |
Record\<string, any> |
Returns#
Promise\<void>
Defined in#
packages/bpmn-server/src/elements/FormRules.ts:131
taskAttribute#
▸ taskAttribute(item, def, attr, isDate?): Promise\<{ value: any } | null>
A user task's attribute (camunda:<attr>), evaluated: an expression, a # script, else its text with its ${...}
parts filled in (a text with commas a list). Null when the task has none. For the task's own attributes, and for the
add-ons that read others (who works on it).
Parameters#
| Name | Type | Default value |
|---|---|---|
item |
any |
undefined |
def |
any |
undefined |
attr |
string |
undefined |
isDate |
boolean |
false |
Returns#
Promise\<{ value: any } | null>
Defined in#
packages/bpmn-server/src/elements/Tasks.ts:282
owfAttribute#
▸ owfAttribute(def, name): any
An element's (or a process's) OWF attribute: owf:<name>, else the old camunda:<name>.
Parameters#
| Name | Type |
|---|---|
def |
any |
name |
string |
Returns#
any
Defined in#
packages/bpmn-server/src/elements/owfAttributes.ts:14
legacyAttributes#
▸ legacyAttributes(def): string[]
The OWF attributes an element still has under the old camunda: name.
Parameters#
| Name | Type |
|---|---|
def |
any |
Returns#
string[]
Defined in#
packages/bpmn-server/src/elements/owfAttributes.ts:20
verifyModel#
▸ verifyModel(source, server?, name?, options?): Promise\<IModelVerification>
Verifies a BPMN model's XML. Pass the server to also check services and called models against the application; without it only the model itself is checked.
Parameters#
| Name | Type | Default value |
|---|---|---|
source |
string |
undefined |
server? |
IBPMNServer |
undefined |
name |
string |
'model' |
options? |
IVerifyOptions |
undefined |
Returns#
Promise\<IModelVerification>
Defined in#
packages/bpmn-server/src/elements/verifyModel.ts:852
listensTo#
▸ listensTo(server, event): boolean
Whether anything listens to an API event: with none, the API's built-in rules apply.
Parameters#
| Name | Type |
|---|---|
server |
any |
event |
"pre-query" | "pre-action" |
Returns#
boolean
Defined in#
packages/bpmn-server/src/engine/AddOns.ts:184
fireApiEvent#
▸ fireApiEvent(server, event, context): Promise\<void>
An API event, to each listener in turn, awaited. A listener that throws refuses: the error goes to the caller.
Parameters#
| Name | Type |
|---|---|
server |
any |
event |
"pre-query" | "pre-action" |
context |
any |
Returns#
Promise\<void>
Defined in#
packages/bpmn-server/src/engine/AddOns.ts:189
registrationsOf#
▸ registrationsOf(server, addOns?): Registrations
What a server's add-ons registered. A server built with them has its own; else (a launched server, an object of the
application's, a model checked alone) they are registered apart, their events going nowhere: addOns, else the
server's configuration's.
Parameters#
| Name | Type |
|---|---|
server |
any |
addOns? |
IAddOn[] |
Returns#
Defined in#
packages/bpmn-server/src/engine/AddOns.ts:212
addOnsOf#
▸ addOnsOf(server): IAddOn[]
A server's add-ons: what it was built with; a server that wasn't (a launched one, an object of the application's), its configuration's; none when there is neither.
Parameters#
| Name | Type |
|---|---|
server |
any |
Returns#
IAddOn[]
Defined in#
packages/bpmn-server/src/engine/AddOns.ts:228
contractProblems#
▸ contractProblems(contract): string[]
What is wrong with a contract, as sentences; none when it is fine.
Parameters#
| Name | Type |
|---|---|
contract |
any |
Returns#
string[]
Defined in#
packages/bpmn-server/src/engine/AppContract.ts:42
readAppContract#
▸ readAppContract(file?): Object
The contract in a file (default: the working folder's app-contract.json): { contract, problems }; contract null when there is no file, or it can't be read. Read again only when the file changed.
Parameters#
| Name | Type |
|---|---|
file |
string |
Returns#
Object
| Name | Type |
|---|---|
contract |
IAppContract | null |
problems |
string[] |
file |
string |
Defined in#
packages/bpmn-server/src/engine/AppContract.ts:76
contractNames#
▸ contractNames(contract): Object
A contract's names, by kind: its variables and functions (by name), its roles, its pages.
Parameters#
| Name | Type |
|---|---|
contract |
IAppContract |
Returns#
Object
| Name | Type |
|---|---|
vars |
Map\<string, IContractExpression> |
functions |
Map\<string, IContractExpression> |
roles |
string[] |
pages |
string[] |
Defined in#
packages/bpmn-server/src/engine/AppContract.ts:94
methodNames#
▸ methodNames(aClass): string[]
The names of a class's methods (its prototype's, and its parents' up to Object's): a variables or functions class.
Parameters#
| Name | Type |
|---|---|
aClass |
any |
Returns#
string[]
Defined in#
packages/bpmn-server/src/engine/AppContract.ts:105
compareWithCode#
▸ compareWithCode(contract, «destructured»): { severity: "error" | "warning" ; message: string }[]
The contract compared with the delegate's code: a declared function the services provider lacks is an error, one it has that is not declared a warning; the same for the variables and the variables class. As { severity, message }.
Parameters#
| Name | Type |
|---|---|
contract |
IAppContract |
«destructured» |
Object |
› services? |
string[] |
› vars? |
string[] |
Returns#
{ severity: "error" | "warning" ; message: string }[]
Defined in#
packages/bpmn-server/src/engine/AppContract.ts:117
appVarsRead#
▸ appVarsRead(text): string[]
The appVars.<name>s a text reads (an expression, a script, a decision table's cells).
Parameters#
| Name | Type |
|---|---|
text |
string |
Returns#
string[]
Defined in#
packages/bpmn-server/src/engine/AppContract.ts:131
appVarsFor#
▸ appVarsFor(delegate, context, names?): Promise\<Record\<string, any>>
The application's variables an evaluation reads, worked out before it runs (docs/design/app-contract.md §2.1):
the delegate's getAppVars(context) object, each name read once (a method called, an async one awaited). A name it
doesn't have reads as undefined. names: those read; all of the class's, when not known.
Parameters#
| Name | Type |
|---|---|
delegate |
any |
context |
Record\<string, any> |
names? |
string[] |
Returns#
Promise\<Record\<string, any>>
Defined in#
packages/bpmn-server/src/engine/AppContract.ts:140
makeContext#
▸ makeContext(fields, execution?): IContext
A context of these fields. With execution, what it doesn't have is read from the execution, and written there
(deprecated: the context was the execution before 3.7.5); execution itself is there too, not enumerable.
Parameters#
| Name | Type |
|---|---|
fields |
IContext |
execution? |
any |
Returns#
Defined in#
packages/bpmn-server/src/engine/Context.ts:72
itemContext#
▸ itemContext(item, extra?): IContext
Kind item: an item that exists.
Parameters#
| Name | Type |
|---|---|
item |
any |
extra |
Partial\<IContext> & { what?: string } |
Returns#
Defined in#
packages/bpmn-server/src/engine/Context.ts:109
elementContext#
▸ elementContext(execution, element?, extra?): IContext
Kind element: an element with no item yet (or the process itself, with none given).
Parameters#
| Name | Type |
|---|---|
execution |
any |
element? |
any |
extra |
Partial\<IContext> & { what?: string } |
Returns#
Defined in#
packages/bpmn-server/src/engine/Context.ts:126
decisionContextOf#
▸ decisionContextOf(decision, input, from?, policy?): IContext
Kind dmn: a decision, from the context it was called from (an item's, an instance's), with its input.
Parameters#
| Name | Type |
|---|---|
decision |
string |
input |
any |
from? |
Partial\<IContext> |
policy? |
string |
Returns#
Defined in#
packages/bpmn-server/src/engine/Context.ts:139
queryContext#
▸ queryContext(query, user, filter): IContext
Kind query: a read, its query and the conditions the pre-query listeners add.
Parameters#
| Name | Type |
|---|---|
query |
string |
user |
any |
filter |
Record\<string, any> |
Returns#
Defined in#
packages/bpmn-server/src/engine/Context.ts:153
formContext#
▸ formContext(field, input, from?): IContext
Kind form: a form field, with the form's values (input). What else from has is kept: the names a form's rules
and choices were handed before 3.7.5 (processName, elementId, instanceId, taskId).
Parameters#
| Name | Type |
|---|---|
field |
string |
input |
any |
from |
Partial\<IContext> |
Returns#
Defined in#
packages/bpmn-server/src/engine/Context.ts:161
actionContext#
▸ actionContext(action, user, on?): IContext
Kind item or element, for a pre-action: the action, who asks, and what it is on (an item and its instance, or a
model's element; a model's name for a model's change).
Parameters#
| Name | Type |
|---|---|
action |
string |
user |
any |
on |
Object |
on.item? |
any |
on.instance? |
any |
on.element? |
any |
on.model? |
string |
on.input? |
any |
on.assignment? |
any |
Returns#
Defined in#
packages/bpmn-server/src/engine/Context.ts:175
narrowed#
▸ narrowed(query, conditions?): Record\<string, any>
Adds the listeners' conditions to a query, all of them holding (narrowing, never widening): each one's keys merged
where they are new, the query and the condition both kept ($and) where they say the same key.
Parameters#
| Name | Type | Default value |
|---|---|---|
query |
Record\<string, any> |
undefined |
conditions |
Record\<string, any>[] |
[] |
Returns#
Record\<string, any>
Defined in#
packages/bpmn-server/src/engine/Context.ts:186
pathProblem#
▸ pathProblem(path): string | null
Why a path can't be used, or null: names separated by dots, none of them proto, prototype, constructor.
Parameters#
| Name | Type |
|---|---|
path |
unknown |
Returns#
string | null
Defined in#
packages/bpmn-server/src/engine/DataPaths.ts:9
pathValue#
▸ pathValue(scope, path): any
The value at a path, own fields only; undefined when it is not there.
Parameters#
| Name | Type |
|---|---|
scope |
unknown |
path |
string |
Returns#
any
Defined in#
packages/bpmn-server/src/engine/DataPaths.ts:18
valueText#
▸ valueText(value): string
A value as text: '' for none, ISO for a date, lists joined, objects as JSON.
Parameters#
| Name | Type |
|---|---|
value |
unknown |
Returns#
string
Defined in#
packages/bpmn-server/src/engine/DataPaths.ts:28
dataPathOf#
▸ dataPathOf(item, tokens?): string
An item's data path (its scope): a running item's token's, else its saved token's ('' at the top).
Parameters#
| Name | Type |
|---|---|
item |
any |
tokens? |
any[] |
Returns#
string
Defined in#
packages/bpmn-server/src/engine/DecisionContext.ts:48
inScope#
▸ inScope(path, scope): boolean
Whether an item at path is in the scope scope: the same branch, one inside it, or one it is inside.
Parameters#
| Name | Type |
|---|---|
path |
string |
scope |
string |
Returns#
boolean
Defined in#
packages/bpmn-server/src/engine/DecisionContext.ts:58
elementType#
▸ elementType(item): any
Parameters#
| Name | Type |
|---|---|
item |
any |
Returns#
any
Defined in#
packages/bpmn-server/src/engine/DecisionContext.ts:63
elementIdOf#
▸ elementIdOf(item): any
Parameters#
| Name | Type |
|---|---|
item |
any |
Returns#
any
Defined in#
packages/bpmn-server/src/engine/DecisionContext.ts:64
feelView#
▸ feelView(target, depth?): any
Parameters#
| Name | Type | Default value |
|---|---|---|
target |
any |
undefined |
depth |
number |
2 |
Returns#
any
Defined in#
packages/bpmn-server/src/engine/DecisionContext.ts:70
itemView#
▸ itemView(item, data?): Object
An item as an expression reads it: its own fields and its element, not the engine's objects.
Parameters#
| Name | Type |
|---|---|
item |
any |
data? |
any |
Returns#
Object
| Name | Type |
|---|---|
id |
any |
elementId |
any |
name |
any |
type |
any |
status |
any |
userName |
any |
assignee |
any |
seq |
any |
element |
{ id: any ; name: any ; type: any } |
element.id |
any |
element.name |
any |
element.type |
any |
data |
any |
input |
any |
output |
any |
Defined in#
packages/bpmn-server/src/engine/DecisionContext.ts:97
instanceView#
▸ instanceView(instance): Object
An instance as an expression reads it.
Parameters#
| Name | Type |
|---|---|
instance |
any |
Returns#
Object
| Name | Type |
|---|---|
id |
any |
name |
any |
status |
any |
data |
any |
startedAt |
any |
endedAt |
any |
Defined in#
packages/bpmn-server/src/engine/DecisionContext.ts:109
decisionContext#
▸ decisionContext(«destructured»): Promise\<Record\<string, any>>
The context a decision table reads (see above). data: the item's data (in its scope); input: its prepared
inputs; names: the names the add-ons give (namesAt: the policies' add-ons' actors); appServices: the
application's functions.
Parameters#
| Name | Type |
|---|---|
«destructured» |
Object |
› data? |
Record\<string, any> |
› input? |
Record\<string, any> |
› user? |
IDecisionUser |
› instance? |
any |
› task? |
string |
› kind |
DecisionKind |
› name? |
string |
› appDelegate? |
any |
› appServices? |
any |
› item? |
any |
› names? |
Record\<string, any> |
› log? |
(message: string) => void |
Returns#
Promise\<Record\<string, any>>
Defined in#
packages/bpmn-server/src/engine/DecisionContext.ts:120
namesAt#
▸ namesAt(server, at): Record\<string, any>
The names the add-ons give expressions and decisions (engine/AddOns.ts, addExpressionName) for a place in a running
instance: its items, its model, the data path of the branch (scope).
Parameters#
| Name | Type |
|---|---|
server |
any |
at |
IExpressionPlace |
Returns#
Record\<string, any>
Defined in#
packages/bpmn-server/src/engine/DecisionContext.ts:178
runningDecisionContext#
▸ runningDecisionContext(item, «destructured»): Promise\<Record\<string, any>>
The context for a decision about a running item (a business rule task's, a user task's assignment policy): its data in its scope, its prepared inputs, the operation's user, and the add-ons' names for its place (actors).
Parameters#
| Name | Type |
|---|---|
item |
any |
«destructured» |
Object |
› kind |
DecisionKind |
› name? |
string |
› task? |
string |
Returns#
Promise\<Record\<string, any>>
Defined in#
packages/bpmn-server/src/engine/DecisionContext.ts:191
formatDecision#
▸ formatDecision(d): string
A decision as a block:
seq: 3 flow 'repair' (flow_gw1_repair)
action: taken
why:
condition
(item.data.needsRepairs=="Yes") || item.data.needsRepairs
result: true (needsRepairs="Yes")
Parameters#
| Name | Type |
|---|---|
d |
ExecutionDecision |
Returns#
string
Defined in#
packages/bpmn-server/src/engine/Execution.ts:940
isExpression#
▸ isExpression(cell): boolean
A decision table's cell that is a model expression, $(...) or ${...}, evaluated as the model's others are.
Parameters#
| Name | Type |
|---|---|
cell |
string |
Returns#
boolean
Defined in#
packages/bpmn-server/src/engine/Expressions.ts:69
columnKeys#
▸ columnKeys(asked): string[]
The keys asked, as a list: Client,data.amount or an array; each once, empty ones left out.
Parameters#
| Name | Type |
|---|---|
asked |
unknown |
Returns#
string[]
Defined in#
packages/bpmn-server/src/engine/ListColumns.ts:33
listColumns#
▸ listColumns(fields, keys, model?): IListColumn[]
The columns for these keys: a data path (data.…), or a name the case labels give (Client), within model when
one is chosen. A key that is neither is a 400 BAD_COLUMN.
Parameters#
| Name | Type |
|---|---|
fields |
IListField[] |
keys |
string[] |
model? |
string |
Returns#
Defined in#
packages/bpmn-server/src/engine/ListColumns.ts:42
columnPath#
▸ columnPath(column, model): string | undefined
The path a column reads in a model's case; undefined when that model doesn't name it.
Parameters#
| Name | Type |
|---|---|
column |
IListColumn |
model |
string |
Returns#
string | undefined
Defined in#
packages/bpmn-server/src/engine/ListColumns.ts:59
columnSortPath#
▸ columnSortPath(column): string | undefined
The one path a column reads in every case, so a database can sort by it; undefined when models differ.
Parameters#
| Name | Type |
|---|---|
column |
IListColumn |
Returns#
string | undefined
Defined in#
packages/bpmn-server/src/engine/ListColumns.ts:64
columnRaw#
▸ columnRaw(column, model, data): unknown
A case's value of a column (its model, its data), as it is.
Parameters#
| Name | Type |
|---|---|
column |
IListColumn |
model |
string |
data |
unknown |
Returns#
unknown
Defined in#
packages/bpmn-server/src/engine/ListColumns.ts:71
columnValues#
▸ columnValues(columns, model, data): Record\<string, string>
A case's columns as text, by key: { Client: 'acme', 'data.amount': '1200' }.
Parameters#
| Name | Type |
|---|---|
columns |
IListColumn[] |
model |
string |
data |
unknown |
Returns#
Record\<string, string>
Defined in#
packages/bpmn-server/src/engine/ListColumns.ts:77
isLabelPath#
▸ isLabelPath(fields, path): boolean
Whether a data path is one the models' case labels read: shown in every list already (a label is public by design).
Parameters#
| Name | Type |
|---|---|
fields |
IListField[] |
path |
string |
Returns#
boolean
Defined in#
packages/bpmn-server/src/engine/ListColumns.ts:82
compareValues#
▸ compareValues(a, b): number
Two values in a sort's order: none last, numbers as numbers, dates by time, text by its letters.
Parameters#
| Name | Type |
|---|---|
a |
unknown |
b |
unknown |
Returns#
number
Defined in#
packages/bpmn-server/src/engine/ListColumns.ts:87
sortRecords#
▸ sortRecords\<T>(records, valueOf, direction, tie?): T[]
Records sorted by a value, in direction; those without one last either way; tie orders equal ones.
Type parameters#
| Name |
|---|
T |
Parameters#
| Name | Type |
|---|---|
records |
T[] |
valueOf |
(r: T) => unknown |
direction |
-1 | 1 |
tie |
(a: T, b: T) => number |
Returns#
T[]
Defined in#
packages/bpmn-server/src/engine/ListColumns.ts:97
modelFormFields#
▸ modelFormFields(source): { id: string ; label: string }[]
A model's form fields, each once, in the order the model has them: their ids (each a field of the case's data,
data.<id>) and labels. What a person knows a case's data by, to choose a list's columns.
Parameters#
| Name | Type |
|---|---|
source |
string |
Returns#
{ id: string ; label: string }[]
Defined in#
packages/bpmn-server/src/engine/ListColumns.ts:114
sortOrder#
▸ sortOrder(order, fallback): 1 | -1
The order asked: asc or desc (a 400 BAD_SORT otherwise); fallback when none.
Parameters#
| Name | Type |
|---|---|
order |
unknown |
fallback |
-1 | 1 |
Returns#
1 | -1
Defined in#
packages/bpmn-server/src/engine/ListColumns.ts:131
roleNames#
▸ roleNames(definitionsPath): string[] | null
The roles of a models folder (roles.json, a list of names), or null when it has none.
Parameters#
| Name | Type |
|---|---|
definitionsPath |
string |
Returns#
string[] | null
Defined in#
packages/bpmn-server/src/engine/Roles.ts:9
roleNameProblem#
▸ roleNameProblem(name): string | null
Why a role name can't be used, or null: a name of letters, digits, spaces, _, - or ., at most 64.
Parameters#
| Name | Type |
|---|---|
name |
unknown |
Returns#
string | null
Defined in#
packages/bpmn-server/src/engine/Roles.ts:19
saveRoleNames#
▸ saveRoleNames(definitionsPath, roles): string[]
Writes roles.json: the names, each once, in the order given.
Parameters#
| Name | Type |
|---|---|
definitionsPath |
string |
roles |
string[] |
Returns#
string[]
Defined in#
packages/bpmn-server/src/engine/Roles.ts:27
runSandboxed#
▸ runSandboxed(values, body, options?): Promise\<{ result: any ; back: any ; calls: string[] }>
Runs a function body in QuickJS with values as its variables (JSON copies). appServices and appUtils are
there too: calling one of their methods returns undefined and is listed in calls, or, given services, runs it.
Returns the body's value and returned (an expression over the variables, default all of them) as JSON. Throws the
script's error, or a time-limit error. The time limit is the script's own: not what it waits for a service.
Parameters#
| Name | Type | Description |
|---|---|---|
values |
Record\<string, any> |
- |
body |
string |
- |
options |
Object |
- |
options.name? |
string |
- |
options.timeLimit? |
number |
- |
options.memoryLimit? |
number |
- |
options.log? |
(text: string) => void |
- |
options.self? |
string |
an expression: this in the body |
options.prelude? |
string |
statements run before the body |
options.returned? |
string |
an expression: what comes back of the variables |
options.services? |
Object |
what calling appServices.x and appUtils.x runs |
options.services.appServices? |
any |
- |
options.services.appUtils? |
any |
- |
Returns#
Promise\<{ result: any ; back: any ; calls: string[] }>
Defined in#
packages/bpmn-server/src/engine/SandboxScriptHandler.ts:81
invokeDecision#
▸ invokeDecision(server, ref, data?): Promise\<{ decision: string = found.decision.id; file: string ; result: any }>
A decision of the models folder evaluated, as a business rule task does: ref is a file's name or a decision's id;
an add-on's by its tests' name (a policy: LeaveApproval.policy, Cases.security-policy), as the add-on says
(decisionByName). The engine's own (EngineService's invokeDecision, and a scenario's @evaluate, which runs in the engine).
Parameters#
| Name | Type |
|---|---|
server |
any |
ref |
string |
data |
Object |
Returns#
Promise\<{ decision: string = found.decision.id; file: string ; result: any }>
Defined in#
packages/bpmn-server/src/server/EngineService.ts:22
delegateFacts#
▸ delegateFacts(delegate): Object
The application's delegate: its class, and the methods it defines itself (not those of bpmn-server's or bpmn-web's base).
Parameters#
| Name | Type |
|---|---|
delegate |
any |
Returns#
Object
| Name | Type |
|---|---|
name |
string | null |
methods |
string[] |
Defined in#
packages/bpmn-server/src/server/EngineService.ts:31
executionResult#
▸ executionResult(execution): IExecutionResult
Parameters#
| Name | Type |
|---|---|
execution |
any |
Returns#
Defined in#
packages/bpmn-server/src/server/EngineService.ts:42
engineCalls#
▸ engineCalls(server): Record\<string, (...args: any[]) => Promise\<any>>
Everything outside the engine can ask of it, each answering data. It is the whole door, in this process or over the network: what is not here can't be asked.
Parameters#
| Name | Type |
|---|---|
server |
BPMNServer |
Returns#
Record\<string, (...args: any[]) => Promise\<any>>
Defined in#
packages/bpmn-server/src/server/EngineService.ts:82
startEngineService#
▸ startEngineService(server, «destructured»): Promise\<http.Server>
Serves engineCalls to the one who launched the server: POST /engine/call { method, args }, with the key in x-engine-key.
Private: it listens on this machine alone unless told otherwise, and no one but the host is to reach it.
calls adds to what can be asked (bpmn-web's tests): they run in here, and answer data as the rest do.
Parameters#
| Name | Type | Default value |
|---|---|---|
server |
BPMNServer |
undefined |
«destructured» |
Object |
undefined |
› port? |
number |
3001 |
› host? |
string |
'127.0.0.1' |
› key |
string |
undefined |
› calls? |
(server: BPMNServer) => Record\<string, (...args: any[]) => Promise\<any>> |
undefined |
Returns#
Promise\<http.Server>
Defined in#
packages/bpmn-server/src/server/EngineService.ts:211