public class AverageOrderAction extends ActionImpl
| Modifier and Type | Field and Description | 
|---|---|
| static java.lang.String | AVG_ORDER_AMT | 
| static java.lang.String | CLASS_VERSION | 
| static java.lang.String | MY_RESOURCE_NAME | 
| static java.lang.String | NUM_OF_ORDERS | 
| static java.lang.String | PARAM_ORDER_PRICE | 
| static java.lang.String | USER_PROPERTY_NOT_FOUND | 
| Constructor and Description | 
|---|
| AverageOrderAction() | 
| Modifier and Type | Method and Description | 
|---|---|
| protected double | calculateAverage(java.lang.Double pOrgAvgTotal,
                java.lang.Double pOrderTotal,
                java.lang.Integer pNumOfOrders)Calculates the Average value of all order amounts of user. | 
| protected void | executeAction(ProcessExecutionContext pContext)Executes this action in the given single process execution
 context. | 
| void | initialize(java.util.Map pParameters)Initializes the action with the given parameters. | 
configure, execute, execute, getActionName, getParameterExpression, getParameterValue, storeOptionalParameter, storeRequiredMutableParameter, storeRequiredParameter, toString, toStringpublic static java.lang.String CLASS_VERSION
public static final java.lang.String PARAM_ORDER_PRICE
public static final java.lang.String NUM_OF_ORDERS
public static final java.lang.String AVG_ORDER_AMT
public static final java.lang.String MY_RESOURCE_NAME
public static final java.lang.String USER_PROPERTY_NOT_FOUND
public void initialize(java.util.Map pParameters)
                throws ProcessException
ActionImplThis default implementation does nothing.
initialize in interface Actioninitialize in class ActionImplProcessException - if the action could not be properly
 initialized - for example, if not all of the required parameters
 are present in the MapExpressionprotected void executeAction(ProcessExecutionContext pContext) throws ProcessException
ActionImplexecute methods.executeAction in class ActionImplProcessException - if the action can not be executedprotected double calculateAverage(java.lang.Double pOrgAvgTotal,
                      java.lang.Double pOrderTotal,
                      java.lang.Integer pNumOfOrders)
pOrgAvgTotal - is the current average order totalpOrderTotal - is the order amt of the current ordernumOfOrders - is the total no of orders placed by the user