Common Events using a Custom Action Rule
Custom Action Rules are architected within the Application Studio environment, which is integral to the AppBase framework. To ensure discoverability and accessibility within the rule selector, it is imperative that all custom rule instances are assigned either the 'cust' or 'Common Event' tag. Post-creation, deployment of the rule is mandatory for it to materialize within the rule selector interface.
SQL Non-Query Function: Currently, the DCM engine is written in SQL, which means only SQL functions will execute synchronously. The input/output parameters for SQL functions are hard-coded and can be seen from the example below. When the event is executed in runtime, the values for these parameters get sent in automatically. You can not add/delete parameters for SQL function rule events.
SQL Non-Query and C# Rules: These rules will execute asynchronously through the AppBase Queue.
Action Rule Examples
The examples below show how to attach a rule/function to an event. One example executes a synchronous function, and the other an asynchronous rule.
SQL Non-Query Function
- On the top right, navigate to → <<your solution>>
- On the left, navigate to → Setup (1)
- Navigate to Case Setup → Case Types (2)
- Open the Case Type by clicking the hyperlink.
- Go to the Common Events tab (3)
- Click the Add Common Events green button (4)
- In the popup window, add the Purpose for the event.
- Then select the Moment and the When for the event. In our example, the Moment is After and the When is Add Note.
- For the Action or Validation dropdown select Action.
- The Event Type is Execute Rule.
- Now, you can select the rule/function from the Rule dropdown list. In our example, we select the QA_actionNqFn function. Remember that this dropdown only shows the rules with the tag Custom Events or Cust.
- Save the Event and check the configuration.
- Deploy the changes.
SQL Non-Query and C# Rules
- On the top right, navigate to → <<your solution>>
- On the left, navigate to → Setup (1)
- Navigate to Case Setup → Case Types (2)
- Open the Case Type by clicking the hyperlink.
- Go to the Common Events tab (3)
- Click the Add Common Events green button (4)
- In the popup window, add the Purpose for the event.
- Then select the Moment and the When for the event. In our example, the Moment is After and the When is Add Note.
- For the Action or Validation dropdown select Action.
- The Event Type is Execute Rule.
- Now, you can select the rule/function from the Rule dropdown list. In our example, we select the QA_actionNQ rule. Remember that this dropdown only shows the rules with the tag Custom Events or Cust.
- Save the Event and check the configuration.
- Deploy the changes.