Decision Tool Plugin

Usages

The Decision Tool Plugin is used in a process flow to determine the next transition after a route. When mapped to a route, it overrides the default transition rules, allowing for custom decision-making logic. A functional Decision Tool Plugin must extend the org.joget.workflow.model.DecisionPluginDefault abstract class, ensuring it integrates seamlessly with the process flow's routing decisions.

Abstract Class

org.joget.workflow.model.DecisionPluginDefault

Abstract Methods

getDecision

public DecisionResult getDecision(String processDefId, String processId, String routeId, Map<String, String> variables);
Return the DecisionResult based on the current process state.

Parameters

    • processDefId - the process definition id
    • processId - the process instance id
    • routeId - the route id of this tool mapped 
    • variables - the workflow variables values

Return org.joget.workflow.model.DecisionResult

POJO Class

org.joget.workflow.model.DecisionResult

Getter/Setter Methods

getIsAndSplit

public Boolean getIsAndSplit();
The split type of next transitions is AND.

setIsAndSplit

public void setIsAndSplit(Boolean isAndSplit);
Set the split type of next transitions to AND.

getAuditData

public String getAuditData();
The data to be store to audit trail table.

setAuditData

public void setAuditData(String auditData);
Set the data to be store to audit trail table.

getVariables

public Map<String, String> getVariables();
The workflow variable and its value to be update.

setVariable

public void setVariable(String name, String value);
Set the workflow variable & value to update.

getTransition

public Collection<String> getTransitions();
The transitions name/id to flow to after the route.

addTransition

public void addTransition(String idOrName);
Add transition id/name to the list of transitions to flow to after the route.

Related Community Plugins

  • Bean Shell Decision Tool
    org.joget.apps.app.lib.BeanShellDecisionPlugin (wflow-core)
  • Simple Rules Decision Tool
    org.joget.apps.app.lib.RulesDecisionPlugin (wflow-core)
Created by Damian Last modified by Aadrian on Dec 13, 2024