-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDecisionTable.d.ts
More file actions
51 lines (51 loc) · 1.23 KB
/
DecisionTable.d.ts
File metadata and controls
51 lines (51 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import { Rule } from "./Rule";
export declare enum HIT_POLICY {
Unique = "Unique",
Any = "Any",
First = "First",
RuleOrder = "Order",
Collect = "Collect+"
}
export declare class DTOutput {
input: {};
rules: any[];
successCount: number;
actions: {};
}
export declare class DTVariable {
name: any;
type: 'String' | 'Number' | 'Money' | 'Date';
}
export declare class DecisionTable {
name: any;
conditionVars: DTVariable[];
actionVars: DTVariable[];
rules: Rule[];
hitPolicy: HIT_POLICY;
private processAll;
constructor({ name, conditionVars, actionVars, rules, hitPolicy }: {
name: any;
conditionVars: any;
actionVars: any;
rules: any;
hitPolicy: any;
});
/**
* Execute a DT on the fly, passing multiple records
* used for WebAPI
* @param dtDefinition
* @param data
*/
static execute(dtDefinition: any, data: any): Promise<{
decisionTable: DecisionTable;
results: any[];
}>;
compile(): {
rules: any[];
};
evaluate(data: any): Promise<any>;
private processResults;
save(fileName: any): void;
static load(fileName: any): DecisionTable;
asJson(): string;
}