Skip to content

bpmn-server / DMNEngine

Class: DMNEngine#

Table of contents#

Constructors#

Properties#

Methods#

Constructors#

constructor#

• new DMNEngine(options?): DMNEngine

Parameters#

Name Type
options DMNOptions

Returns#

DMNEngine

Defined in#

packages/bpmn-server/src/dmn/DMNEngine.ts:46

Properties#

definitions#

• definitions: DMNDefinitions

Defined in#

packages/bpmn-server/src/dmn/DMNEngine.ts:38


decision#

• decision: Decision

Defined in#

packages/bpmn-server/src/dmn/DMNEngine.ts:39


options#

• Private options: DMNOptions

Defined in#

packages/bpmn-server/src/dmn/DMNEngine.ts:40


matched#

• matched: number[] = []

the rules the last table evaluated matched, numbered from 1

Defined in#

packages/bpmn-server/src/dmn/DMNEngine.ts:42


called#

• Private called: Map\<string, any>

input expressions that call a function, their values worked out (an async one awaited) first: evaluateAsync

Defined in#

packages/bpmn-server/src/dmn/DMNEngine.ts:44

Methods#

log#

▸ log(message): void

Parameters#

Name Type
message string

Returns#

void

Defined in#

packages/bpmn-server/src/dmn/DMNEngine.ts:50


find#

▸ find(folder, ref): Promise\<FoundDecision>

The decision a model names (camunda:decisionRef) in a folder: a file <ref>.dmn.xml, or a decision with that id.

Parameters#

Name Type
folder string
ref string

Returns#

Promise\<FoundDecision>

Defined in#

packages/bpmn-server/src/dmn/DMNEngine.ts:56


topDecision#

▸ topDecision(definitions): Decision

The decision a file is for: the first one no other decision of the file requires.

Parameters#

Name Type
definitions DMNDefinitions

Returns#

Decision

Defined in#

packages/bpmn-server/src/dmn/DMNEngine.ts:84


load#

▸ load(filePath, decisionId?): Promise\<DMNEngine>

Load a DMN file: its decision decisionId, or the decision the file is for.

Parameters#

Name Type
filePath string
decisionId? string

Returns#

Promise\<DMNEngine>

Defined in#

packages/bpmn-server/src/dmn/DMNEngine.ts:90


evaluate#

▸ evaluate(input): any

Evaluate the loaded decision with these values (or, for a table, its inputs' values in order).

Parameters#

Name Type
input any[] | Record\<string, any>

Returns#

any

Defined in#

packages/bpmn-server/src/dmn/DMNEngine.ts:98


evaluateAsync#

▸ evaluateAsync(input): Promise\<any>

Evaluate it, an input expression that calls a function (appServices.crm.tierOf(customerId)) awaited first: once each, with these values. A call inside a larger expression (f(x) = 1) is not awaited.

Parameters#

Name Type
input Record\<string, any>

Returns#

Promise\<any>

Defined in#

packages/bpmn-server/src/dmn/DMNEngine.ts:113


evaluateDecision#

▸ evaluateDecision(decision, context, path): any

Parameters#

Name Type
decision Decision
context Record\<string, any>
path string[]

Returns#

any

Defined in#

packages/bpmn-server/src/dmn/DMNEngine.ts:136


evaluateTable#

▸ evaluateTable(decision, table, context): any

Parameters#

Name Type
decision Decision
table DecisionTable
context Record\<string, any>

Returns#

any

Defined in#

packages/bpmn-server/src/dmn/DMNEngine.ts:161


byPriority#

▸ byPriority(table, results, context): Record\<string, any>[]

Results ordered by their outputs' places in the outputs' value lists (the first listed is the highest).

Parameters#

Name Type
table DecisionTable
results Record\<string, any>[]
context Record\<string, any>

Returns#

Record\<string, any>[]

Defined in#

packages/bpmn-server/src/dmn/DMNEngine.ts:257


test#

▸ test(cell, value, context): boolean

An input cell's test of the input's value.

Parameters#

Name Type
cell string
value any
context Record\<string, any>

Returns#

boolean

Defined in#

packages/bpmn-server/src/dmn/DMNEngine.ts:271


testValue#

▸ testValue(source, value, context): boolean

Parameters#

Name Type
source string
value any
context Record\<string, any>

Returns#

boolean

Defined in#

packages/bpmn-server/src/dmn/DMNEngine.ts:282


value#

▸ value(source, context, bareWordIsText?): any

A FEEL expression's value.

Parameters#

Name Type Default value
source string undefined
context Record\<string, any> undefined
bareWordIsText boolean true

Returns#

any

Defined in#

packages/bpmn-server/src/dmn/DMNEngine.ts:291

Comments