LogoLogo
timvero.comMaven Repository
  • timveroOS SDK guide
  • timveroOS how-to
  • timveroOS admin-side setup
  • How to use Maven credentials
  • timveroOS reference assembly & developer guide
  • timveroOS SDKs
    • v. 7.12
      • Ubuntu environment setup
      • Data model setup
      • New data source connection, with Bud Financial example
      • Flow customization
      • Decision process execution
      • Participant/ assets dynamic profile setup
      • Documents flow integration setup
      • Application form setup
      • Application API Integration Guide
      • UI/ UX components
        • Collapsing blocks
      • Fixed-fact Decision making and Launchpad
    • v. 7.11
      • Ubuntu environment setup
      • Data model setup
      • New data source connection, with Bud Financial example
      • Flow customization
      • Decision process execution
      • Participant/ assets dynamic profile setup
      • Documents flow integration setup
      • Application form setup
      • Application API Integration Guide
      • UI/ UX components
        • Collapsing blocks
    • v. 7.10
      • Ubuntu environment setup
      • Data model setup
      • New data source connection, with Bud Financial example
      • Flow customization
      • Participant/ assets dynamic profile setup
      • Documents flow integration setup
      • Application form setup
      • Application API Integration Guide
      • UI/ UX components
        • Collapsing blocks
Powered by GitBook
On this page
  • Fixed decision facts
  • Pending decision resolution
  • Launchpad
  • Implementation

Was this helpful?

  1. timveroOS SDKs
  2. v. 7.12

Fixed-fact Decision making and Launchpad

PreviousCollapsing blocksNextv. 7.11

Last updated 3 days ago

Was this helpful?

Fixed decision facts

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

Status
Terminal?
Description

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 decision resolution

Pending Decisions can be found on 'Scoring and Decision Tree' tab of the scoring subject.

Assignment

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.

Resolution

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

Launchpad is board where one can see all subjects which are pending decision in one place.

Implementation

To enable Fixed Decision fact mechanism, implement HasPendingDecisions on your scoring subject:

public class Participant implements ProcessEntity, HasPendingDecisions {

    public static final String DECISION_OWNER_TYPE = "PARTICIPANT";

    @OneToOne(cascade = CascadeType.ALL)
    @JoinColumn(nullable = false, updatable = false)
    @NotAudited
    private PendingDecisionHolder pendingDecisionHolder = new PendingDecisionHolder(DECISION_OWNER_TYPE);

    @Override
    public PendingDecisionHolder getPendingDecisionHolder() {
        return pendingDecisionHolder;
    }
}

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:

@Component
public class ParticipantDecisionEntityExtractor implements DecisionEntityExtractor {

    @Autowired
    private ParticipantRepository repository;

    // PendingDecisionHolder ownerType to match records of specific type
    @Override
    public String getDecisionOwnerType() {
        return Participant.DECISION_OWNER_TYPE;
    }

    // LaunchpadEntityDto provides data to display the entity record on launhpad
    @Override
    public LaunchpadEntityDto getByHolderId(Long holderId) {
        Participant participant = repository.findByPendingDecisionHolderId(holderId);
        Application application = participant.getApplication();

        return new LaunchpadEntityDto(participant.getId(),
            application, "#" + application.getId() + " for " + participant.getFullName(),
            participant, participant.getFullName(),
            participant.getRole(),
            "/participant/launchpad-body");
    }
}

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:

<div class="mt-20 border-top">
    <h4 class="mb-5 mt-5 fw-600" th:text="#{participant.tab.profile}"></h4>
    <article
        class="article"
        th:data-url="@{${@pathRegistry.getPath(entityDto.targetEntity) + '/tab/profile'}}"
    ></article>
</div>
Decision fact blocks in Workflow Modeler
Participant view with Scoring tab opened
Pending decision with actions