Setting Up Stop Process Actions

This topic describes how to stop workflow processes from advancing to the next task based on your business rule.

Using the Business Rules Framework, you can prevent a workflow process from advancing to the next task until your business criteria is met. For example, you could prevent:

  • A final permit or business license inspection from being created, scheduled, or assigned if fees are due for a transaction.

  • The issuance of a permit or subapplication until the primary application has been issued.

  • The issuance of a business license until all fees are paid.

The Stop Process action is supported for Permits and Business Licenses for these Business Rules Framework events:

Event

Resource

Before Inspection Saved

Inspection

Before Permit Issuance

Permits Workflow Communications

Before Business License Inspection Saved

Business License Inspection

Before Business License Issuance

Business License Activity

Note: For inspections, the Stop Process action gets triggered only during a request for a final inspection, or when a final inspection is being scheduled or assigned. It is not triggered during import, migration, or when an inspection is canceled or updated. Also, keep in mind that the Stop Process action isn’t triggered by requests sent from the Oracle Inspector mobile app, however requests sent from a browser running on a mobile device will trigger the Stop Process action.
Note: It is recommended to limit the number of rules performing Stop process actions within an event. When the application calls Business Rules Framework to check for a Stop process action, all the rules in the event get processed. If there are multiple Stop process actions across multiple rules the results will all get sent back to the calling application, and this may cause some confusion if there are multiple messages received.

Configuring Stop Process Actions

To configure a Stop Process action:

  1. Expand the Criteria section of the Business Rules Details page.

    For more information on setting up criteria, see Setting Up Business Rule Criteria.

  2. Make sure your statements reference the applicable attributes in the business object.

    For example, this example illustrates how you can set up your criteria sequence to confirm the inspection being scheduled is the final inspection and that there is no outstanding fee balance:

    ${Fee Balance Due} != "0"

    AND ${Final Inspection} = "Y"

  3. Expand the Actions section of the Business Rules Details page.

  4. Click Add.

  5. From the Action Name drop-down list, select Stop Process.

  6. Click Configure.

  7. Enter the text to include in the message that displays to the user if the action is triggered.

    This example illustrates including custom message text.

    Configure Stop Process Action

    In this example, the Stop Process action prevents the final inspection from being created, scheduled, or assigned, and it displays a message to alert the user in the following format:

    The process has stopped due to this reason: {CUSTOM_MESSAGE_TEXT}.

    Where {CUSTOM_MESSAGE_TEXT} is the text you enter in the Message Body field.

    This example illustrates the error message displayed when you attempt to schedule a final inspection for a permit. The configured business rule stipulates that the entire fee balance must be paid, and in this case there is a remaining balance.

    Stop Process Error Message
  8. (For issuance events only) If applicable, enable agency users to override the stop process action, when notified.

    Turn on the Allow override switch to display an Override button on the message displayed to the agency user on the workflow tab of the transaction details.

    Note: The option to allow agency users to override the stop process action applies only to the issuance events.
    • Before Permit Issuance (LNP-BEFORE-ISSUANCE)

    • Before Business License Issuance (BL-BEFORE-ISSUANCE)

    Tip: To find event codes, you can navigate to the communication event of the same name and view the Code field on the Communication Event Details page.
  9. (For issuance events only) Modify the custom properties of the appropriate human task as needed.

    Modify the associated workflow process definition so the appropriate task references the event. Use the workflow custom property, PSC_BRF_EVENT_CODE, in the appropriate workflow task, such as Issue Permit or Issue Business License, to specify the business rule event code. The workflow process will call the specified event to evaluate the business rule prior to advancing the workflow to the next task. The event codes for the issuance events are:

    Also review the PSC_BRF_ALL_WF_ACTIONS custom property and set as needed.

    For more information on workflow process definition custom properties, see Using Custom Properties.

Example: Prevent Permit Issuance

Note: The default rule for the Before Permit Issuance event contains the criteria used below, which you can use as is, or clone and modify as needed.

For a permit, assume you want to prevent a subapplication from being issued if the primary application hasn't been issued or the primary application status is no longer active.

Specify the following criteria:

( 
	${{Permits Workflow Communications} Primary Application System Status} NOTIN ["Void", "Withdrawn", "Denied"] 
	AND
	${{Permits Workflow Communications} Primary Application Issue Date} = "${Blank}" 
	AND
	${{Permits Workflow Communications} Subapplication Relationship Type} = "Yes" 
)

For the action, select Stop Process.

In the Issue Permit task in the workflow process, enter the event code for Before Permit Issuance in the PSC_BRF_EVENT_CODE custom property.