Skip to content

Commit

Permalink
feat: add flags for rules engine actions
Browse files Browse the repository at this point in the history
  • Loading branch information
eirikhaugstulen committed Dec 6, 2023
1 parent 3bc87ae commit 0ab68f9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/rules-engine/src/RulesEngine.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export class RulesEngine {
`Original condition was: ${expression} - ` +
`Evaluation ended up as:${injectedExpression} - error message:${error}`),
onVerboseLog: injectedExpression => log.info(
`Expression with id: ${rule.id} was run. ` +
`Expression with id rule:${rule.id} was run. ` +
`Original condition was: ${expression} - ` +
`Evaluation ended up as:${injectedExpression}`),
});
Expand Down Expand Up @@ -158,14 +158,15 @@ export class RulesEngine {
expression: actionExpression,
dhisFunctions,
variablesHash,
flags: this.flags,
onError: (error, injectedExpression) => log.warn(
`Expression with id rule: action:${id} could not be run. ` +
`Original condition was: ${actionExpression} - ` +
`Evaluation ended up as:${injectedExpression} - error message:${error}`),
onVerboseLog: injectedExpression => log.info(
`Expression with id: ${id} was run. ` +
`Expression with id rule: action:${id} was run. ` +
`Original condition was: ${actionExpression} - ` +
`Evaluation ended up as:${injectedExpression}`),
`Evaluation ended up as: ${injectedExpression}`),
});
}

Expand Down

0 comments on commit 0ab68f9

Please sign in to comment.