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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
abortWorkItem
(org.kie.api.runtime.process.WorkItem workItem, org.kie.api.runtime.process.WorkItemManager manager) abortWorkItem.This method return approval not required WorkflowOutputModel.approvalRequired
(List<WorkflowCondition> approversList) This method return approval not required WorkflowOutputModel.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.inOperator
(WorkflowCondition rule) checking the IN operator.This method is used to add logical operator in query.processJson
(org.json.JSONArray rules, String relationalOpr, org.springframework.expression.EvaluationContext context) This method is used to create spring expression query.processOutputCondition
(org.json.JSONArray rules, String relationalOpr) This method is used to create workflow output condition query.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.workflowRuleList
(org.json.JSONArray workflowRules) This method create list of workflow conditions from given rules.workflowRulesCondition
(List<WorkflowCondition> workflowRuleList, String relationalOperator) This method is used to convert the condition into text.
-
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 interfaceorg.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
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
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
checking the IN operator.- Parameters:
rule
-- Returns:
- string
-
logicalOperator
This method is used to add logical operator in query.- Parameters:
rule
-- Returns:
- operator
-
approvalNotRequired
This method return approval not required WorkflowOutputModel.- Returns:
- workflowOutput
-
approvalRequired
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 interfaceorg.kie.api.runtime.process.WorkItemHandler
-