Class ApprovalActionProcess

java.lang.Object
com.skava.accounts.workflow.workitem.ApprovalActionProcess
All Implemented Interfaces:
org.drools.core.process.instance.WorkItemHandler, org.kie.api.runtime.process.WorkItemHandler

public class ApprovalActionProcess extends Object implements org.drools.core.process.instance.WorkItemHandler
This workitem will process the loaded cart based on the respective action for the given condition.
Author:
Infosys Equinox
  • Constructor Details

    • ApprovalActionProcess

      public ApprovalActionProcess()
  • Method Details

    • executeWorkItem

      public void executeWorkItem(org.kie.api.runtime.process.WorkItem workItem, org.kie.api.runtime.process.WorkItemManager manager)
      This method is used to execute the given workitem to process the Cart.
      Specified by:
      executeWorkItem in interface org.kie.api.runtime.process.WorkItemHandler
      Parameters:
      workItem - Holds workitem object which contains the respective details to process the price.
      manager - Holds WorkItemManager objects.
    • processJson

      public StringBuilder processJson(org.json.JSONArray rules, String relationalOpr, org.springframework.expression.EvaluationContext context)
      This method is used to create spring expression query.
      Parameters:
      rules -
      relationalOpr -
      context -
      Returns:
      stringBuilder
    • processOutputCondition

      public StringBuilder processOutputCondition(org.json.JSONArray rules, String relationalOpr)
      This method is used to create workflow output condition query.
      Parameters:
      rules -
      relationalOpr -
      Returns:
      outputBuilder
    • workflowRulesCondition

      public String workflowRulesCondition(List<WorkflowCondition> workflowRuleList, String relationalOperator)
      This method is used to convert the condition into text.
      Parameters:
      workflowRuleList -
      relationalOperator -
      Returns:
      textConditions
    • workflowRuleList

      public List<WorkflowCondition> workflowRuleList(org.json.JSONArray workflowRules)
      This method create list of workflow conditions from given rules.
      Parameters:
      workflowRules -
      Returns:
      workflowConditons
    • springExpressionQuery

      public String springExpressionQuery(List<WorkflowCondition> workflowRuleList, String relationalOperator, org.springframework.expression.EvaluationContext context)
      This method is used to form spring Expression query from the given list of condition.
      Parameters:
      workflowRuleList -
      relationalOperator -
      context -
      Returns:
      spExpression
    • inOperator

      public String inOperator(WorkflowCondition rule)
      checking the IN operator.
      Parameters:
      rule -
      Returns:
      string
    • logicalOperator

      public String logicalOperator(WorkflowCondition rule)
      This method is used to add logical operator in query.
      Parameters:
      rule -
      Returns:
      operator
    • approvalNotRequired

      public WorkflowOutputModel approvalNotRequired()
      This method return approval not required WorkflowOutputModel.
      Returns:
      workflowOutput
    • approvalRequired

      public WorkflowOutputModel approvalRequired(List<WorkflowCondition> approversList)
      This method return approval not required WorkflowOutputModel.
      Parameters:
      approversList -
      Returns:
      workflowOutput
    • abortWorkItem

      public void abortWorkItem(org.kie.api.runtime.process.WorkItem workItem, org.kie.api.runtime.process.WorkItemManager manager)
      abortWorkItem.
      Specified by:
      abortWorkItem in interface org.kie.api.runtime.process.WorkItemHandler