/** * 2️⃣ Core Features Feature Description DMN XML Parsing Load and parse DMN XML files into an internal model. Condition Evaluation Evaluate input data against conditions in the decision table. Hit Policy Handling Implement standard DMN hit policies (e.g., FIRST, COLLECT, PRIORITY, SUM). Multiple Input Columns Each rule row should match the corresponding input field automatically. Multiple Output Columns The decision table should return structured output based on defined columns. Data Type Handling Support numeric, boolean, string conditions. Performance Optimization Ensure fast decision evaluation for large tables. Logging & Debugging Track rule execution for debugging. Integration APIs Provide REST/CLI/SDK for calling the engine. 3️⃣ DMN Hit Policies to Support ✔ FIRST → Return the first matching rule. ✔ COLLECT → Return all matching rules. ✔ PRIORITY → Use the highest-priority match. ✔ RULE ORDER → Return matches in rule order. ✔ UNIQUE → Ensure exactly one match (error if multiple). ✔ SUM / MIN / MAX → Apply mathematical aggregation to numeric outputs. ✔ COUNT → Count how many rules match. 4️⃣ Inputs & Outputs Example DMN Table: Age Income Decision >=18 >50000 "Approved" <18 - "Rejected" ✔ Inputs: { age: 20, income: 60000 } ✔ Expected Output: { Decision: "Approved" } */ /** * * ✔ Parses DMN XML into structured JSON. ✔ Extracts input/output columns dynamically. ✔ Processes DMN hit policies correctly. ✔ Handles encoded XML characters (<, >, &). */ declare class DMNParser { static loadDMNFile(filePath: string): Promise; static convertDMNToJSON(parsedXML: any): DecisionTable; static extractOperator(conditionText: string): string; static convertToType(value: string, type: string): any; static getInputField(inpt: any): { id: any; label: any; type: any; name: any; }; static getOutputField(output: any): { id: any; name: any; type: any; }; /** ✅ Summary ✅ Format rules in a human-readable structure. ✅ Include hit policy, input conditions, and output values. ✅ Display conditions per rule in a structured way. ✔ Generates clear, structured documentation of DMN decision rules. ✔ Formats conditions & outcomes properly. ✔ Displays hit policy, input columns, and output columns. ✔ Handles missing conditions gracefully (e.g., - for unrestricted conditions). **/ static documentRules(decisionTable: any): string; } type DecisionTable = { hitPolicy: string; inputColumns: { name: string; type: string; }[]; outputColumns: { name: string; type: string; }[]; rules: { conditions: Condition[]; outcomes: any[]; }[]; defaultOutcome: Record; }; type Condition = { operator: string; value: any; }; export { DMNParser, DecisionTable, Condition };