Skip to main content
Version: 1.21.3

Execution Order

In SimpleOne, the execution of business rules, workflows, notifications, and engines is bound to database operations.

The execution order is shown and described below:

caution
  • The rules and engines marked red on the scheme and respectively listed below are affected when using the Silent Load functionality.
  • Business rules are executed separately from each other. If an error is made in one of them (for example, a variable is incorrectly defined), it will not affect the execution of other business rules. The execution of a business rule that contains an error is terminated, and the error output is logged.

You can also define the same variables in two or more business rules. It is not recommended, but it will not generate any errors because the variables are placed in a separate context.

Before insert/update/delete


The processing of the following elements is bound to the transaction BEGIN SQL statement:

  1. ACL.
  2. Domain events: filling in the Order and Number fields in relevant records, adding column prefixes where appropriate.
  3. Business rules:
    • Rules with When = before and Order ≤ 1000.
    • Rules with When = before and Order > 1000.
  4. Validation (is skipped for delete).
  5. Database transaction (insert/update/delete).
  6. Save REM.

After insert/update/delete


The execution of the following elements is bound to the transaction COMMIT SQL statement:

  1. Infrastructure events (include processing of History, Activity Feed, Create VCS Records, Execute REM After Scripts).
  2. Engines:
    1. Business rules with When = after and Order ≤ 1000.
    2. Approvals.
    3. Workflow.
    4. Notifications.
    5. Business rules with When = after and Order > 1000.