bpmn-server / DMNEngine
Class: DMNEngine#
Table of contents#
Constructors#
Properties#
Methods#
Constructors#
constructor#
• new DMNEngine(options?): DMNEngine
Parameters#
| Name | Type |
|---|---|
options |
DMNOptions |
Returns#
Defined in#
packages/bpmn-server/src/dmn/DMNEngine.ts:32
Properties#
definitions#
• definitions: DMNDefinitions
Defined in#
packages/bpmn-server/src/dmn/DMNEngine.ts:28
decision#
• decision: Decision
Defined in#
packages/bpmn-server/src/dmn/DMNEngine.ts:29
options#
• Private options: DMNOptions
Defined in#
packages/bpmn-server/src/dmn/DMNEngine.ts:30
Methods#
log#
▸ log(message): void
Parameters#
| Name | Type |
|---|---|
message |
string |
Returns#
void
Defined in#
packages/bpmn-server/src/dmn/DMNEngine.ts:36
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:42
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#
Defined in#
packages/bpmn-server/src/dmn/DMNEngine.ts:70
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:76
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:84
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:95
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:120
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:200
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:214
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:226