To support operation level policy management, UNICOM® Digital Transformation Toolkit (UDTT™) provides com.ibm.btt.channel.AbstractPolicyOperationStep as the base class for technical developers to extend.
The execute method in the AbstractPolicyOperationStep base class provides a default implementation which uses the rule service to check operation level policy. Technical developers can extend it based on the application needed. Meanwhile, technical developers should implement the following two abstract methods:
Is used to construct the input parameters for the execute method using the data from the operation context.
Protected abstract int processResult(Map<String, Object> result)
Is used to parse the result that is returned from the rule provider service. The return value of the processResult method is used to control the state transition between opSteps
Below is a sample OpStep implementation class to demonstrate how to implement an operation level policy.