Orders Setup Requirements
Prior to generating orders from the Pricing Sheet, you need to configure the AMOrder workflow for single orders and routed orders, and the OrderBundle workflow for order bundles.
Domain Values
Ensure that the following workflow types are present in the workflowType domain.
• | AMOrder |
• | OrderBundle |
Workflow Rules
The following are the workflow rules:
• | TriggerChildrenWorkflow: Allows applying the action defined in the Rule Param to the child orders. It should be added to the WorkflowRuleOrderBundle (Domain Value). |
• | TriggerParentWorkflow: Allows applying the action defined in the Rule Param to the bundle. It should be added to the WorkflowRuleAMOrder (Domain Value). We can add it to the child order, partial execution action to apply the same status to the parent order. |
• | AllChildrenHaveSameStatus: Verify if the childs have the same status (executed), if it the case, the order bundle will move to executed status. |
Sample AMOrder Workflow Configuration
Sample AMOrder Workflow Import File
The rule TriggerParentWorkflow allows applying the action defined in the Rule Param to the parent order.
Sample AMOrder Configuration with Order Routing
Sample AMOrder Workflow with Order Routing Import File
Sample AMOrder Workflow with Order Routing
Sample OrderBundle Configuration
Sample OrderBundle Import File
For any action applied on the OrderBundle workflow, the same action name must be configured for child orders in order to correctly propagate the actions to the child orders. This is accomplished by setting the TriggerChildrenWorkflow rule with the Rule Param as "action=<name of action on which rule is added>" on each action. For example, on the OrderBundle workflow transition CREATED - SEND_TO_MARKET - LIMIT_VIOLATION, add the rule TriggerChildrenWorkflow with Rule Param "action=SEND_TO_MARKET".
The rule AllChildrenHaveSameStatus allows verifying if the child orders have the same status (EXECUTED), and if so, the order bundle will move to EXECUTED status.
Access Permissions
Make sure that you add the following values to the domain customEntityObject so that you can configure workflow access permissions:
• | AMOrder |
• | AMPrivateOrder |
Audit Filters
You can define audit filters for the AMOrder workflows.
Add the following values to the auditFilterType domain:
• | "AMOrder" with the comment "tk.decisionsupport.AMOrder" |
To check orders for limits and compliance, you need to define compliance rules with Workflow Group = ORDER, and add one of the following rules to the AMOrder workflow on the relevant transitions, for example SIMULATED - SEND_TO_MARKET - SENT:
• | CheckLimits – Runs a compliance pre-deal check and sets the corresponding order attributes, which are described in the table below. It fails if there is an error or a compliance violation. |
• | CheckLimit – Same as CheckLimits except this rule always returns true. Other workflow rules can then block a future transition by verifying the order attributes. |
Order Attribute |
Description |
---|---|
LIMIT_CHECKED_PERFORMED |
"Y" if compliance check has been performed. It is not added if LIMIT_CHECK_ERROR=Y. |
LIMIT_CHECK_ERROR |
"Y" if compliance check could not be performed. See error in Data Server or Compliance Server log. |
LIMIT_IN_WARNING |
"Y" if there is a compliance WARN violation type. |
LIMIT_IN_VIOLATION |
"Y" if there is a compliance EXCESS or BREACH violation type. |
LIMIT_USAGE_HARD_VIOLATION |
"Y" if a hard compliance violation has occurred, or "N" if a soft compliance violation has occurred. It is not added if there are no violations for that order. |
LIMIT_VIOLATION_IDS |
Identifiers of the compliance rules which have violations. |
To check order bundles for compliance, add the CheckLimit rule to the OrderBundle workflow on the relevant transitions.
• | CheckLimit – Runs a compliance pre-deal check for all the orders in the bundle and sets the corresponding order attributes, which are described in the table above. It always returns true. Other workflow rules can then block a future transition by verifying the order attributes. |
Ⓘ [NOTE: If the static data filter (e.g. isPartOfBlock) is supposed to block a transition having the CheckLimit rule, the static data filter should be set on a different transition which comes before the transition with CheckLimit]