-
Type: User story
-
Status: Open
-
Priority: Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: Retention
-
Team:PLATFORM
-
Sprint:nxplatform #105
-
Story Points:5
As a records manager, I can create event-based rules that can incorporate conditions to work at scale.
e.g.:
- When closing an account, I can provide the account number
- When an employee leaves the company, I can provide the employee number or employee id
AC:
- I can define an expression in an event-based rule
- The input of the event can be used in the expression
- e.g., document.properties.employeeID == myinput where myinput is the input of the event
- When an expression is defined, it is evaluated against the input sent while firing the event
- e.g. when firing an event Retention.employeeOffboarding with input "toto123", we start retention on any document where employeeID is "toto123"
NOTES
__________________________________
The current way to create an event-based retention rule requires providing a hardcoded value. By using this option, a rule must be created for every potential value (e.g., create a rule for every account that can be closed or employee that is in the company). This is not scalable.
Our backend already has a property that could be leveraged to provide an EL expression:
retention_def:expression
However the event listener we use when we fire a retention event does not leverage it:
https://github.com/nuxeo/nuxeo-retention/blob/15479203e27f22bc6efb98dfb285d855e03e9e1c/nuxeo-retention/src/main/java/org/nuxeo/retention/listeners/RetentionBusinessEventListener.java#L68