Fixed-fact Decision making and Launchpad
Last updated
Was this helpful?
Last updated
Was this helpful?
Fixed decision facts - is an alternative decision making approach within the system. The idea of this approach is to use only 3 severity levels of decision facts during decision tree execution: Alert, Warning and Info. The Workflow modeler provides special blocks to register these fixed facts:
When a tree execution is finished, the saved decision facts are converted to Pending decision records, and the final decision is made depending on the statuses of them. Here's the list of
Approved
yes
Positive decision
Declined
yes
Negative decision
Info
yes
Implies information that does not directly affect the decision, but may somehow help the decision maker
Pending
no
Manual decision is required to resolve negatively or positively
Not actual
yes
Terminal, may be used to mark decision as not required anymore
Depending on the originating Decision fact, Pending decision are created with status:
Declined - for Alert facts
Pending - for Warning fact
Info - for Info facts
After all Pending decisions are saved, FinishedScoringEvent is triggered, so a custom listener can be registered to check whether final decision is ready to be made (e.g. when all Pending decisions already have terminal status, or when has any Pending decision having status Declined). If some decisions have status Pending, the final decision can be made only when they are resolved. So, another event listener can be registered to track whether Pending decisions are resolved, so the final decision can eventually be made.
Pending Decisions can be found on 'Scoring and Decision Tree' tab of the scoring subject.
Each Pending decision can to be resolved by user who belongs to a specific Decision department defined by originating Decision fact. Before resolving a Pending decision a user have to be assigned to it. If Pending decisions on the subject belong to different departments, multiple users can be assigned, one for each involved department. There are actions Assign to/Assign to me and Drop assignment to manipulate assignments.
Assigned user can resolve Pending decision either positively (action Approve) or negatively (action Decline). Approve action may require user to fill a form if the tree decided that some data on scoring subject is missing (see Form schema feature). Decline action requires user to choose a Decline reason and to provide a comment to justify the rejection.
Launchpad is board where one can see all subjects which are pending decision in one place.
To enable Fixed Decision fact mechanism, implement HasPendingDecisions on your scoring subject:
PendingDecisionHolder is a container to subject's Pending decisions and Assignments. It take 1 constructor parameter - String ownerType
- to distinguish these containers when more than 1 type of scoring subjects exist in the project (e.g. participants and pledges are scored).
To display entities on Launchpad register a Spring component which implements DecisionEntityExtractor interface:
Fields of the returned LaunchpadEntityDto determine values for columns of the Launchpad.
Here's the default view of the expanded Launchpad item:
Parameter String viewPage
is optional and may be used to pass the path of the fragment with additional information about the scoring subject. Here's how Profile tab of the participant can be added to the view in /participant/launchpad-body.html
: