Deadlines and Escalations

Introduction

Deadlines in Joget act as timers that trigger an exception transition to another activity when a specified duration has elapsed. You can set deadlines for each activity to manage time-sensitive tasks effectively. This article will guide you through setting up deadlines and their types and explain how to use them in your processes.

Caution

  • Remember to turn on the Deadline Checker Interval in General Settings so that Deadlines will be triggered.
  • Take into account the processing times for deadline tasks. All deadline tasks must be completed before the deadline checker interval starts calculating again.
    This effect is more prevalent if there are many deadline tasks in queue and/or those task(s) require heavy processing.
    Example:
    Assuming the deadline checker interval is set to 10 minutes, and all current deadline tasks in queue take 5 minutes to finish processing, it would take 5 minutes to complete processing, and then only the deadline checking of 10 minutes will begin again. From the perspective of the Joget app designer, it would seem that the deadline checker interval is irregular, but this is actually the expected behavior.
  • When an activity assignment is created, any associated deadline(s) is also created at that instance and ready to be executed upon its set deadline duration. Because of this, deadlines will also store the values of workflow variables at the time of creation of such activity.
    Hence, any modifications to the workflow variables after the deadline(s) have been set will not take effect (e.g., changing workflow variable values in the Process Monitor), while the old values will.
  • You can set multiple deadlines in an activity.
    For example, you can include a first-level reminder (asynchronous), which is followed by an escalation (synchronous) if the activity has not been completed within the time limit.
  • Remember to match the exception names. If they do not match, nothing will happen.

How does it work?

To ensure timely task completion in Joget, you can set up deadlines within your process flow. This involves configuring the following:

Activating deadline checker

The activity deadline checker is disabled by default. To allow Joget to check the activity deadline, you must set the Process Deadline Checker Interval to a non-zero value. Set it to a suitable value, depending on your needs.

Setting deadlines in activities

  • Edit the activity properties for which you wish to set a deadline, then click the Deadlines tab.
  • Add a new row and enter appropriate values for Execution, Duration Unit, and Deadline Limit.
  • Type the exception name in the Exception name field (e.g., TIMEOUT). Exception names are case-sensitive. Ensure this matches the exception name given to the transition.
  • Click OK to save your deadline configuration. You can as many deadlines as you require.

Setting transition as exception flow

When a deadline is triggered, and where the exception name matches the one set for a transition, the flow will execute along that transition to the next element along the workflow.

  • Add an Exception-type transition from the activity to the next (i.e., Send Reminder).
  • Set the type of condition to Exception.
  • Enter an Exception name (e.g., TIMEOUT) in the Expression text area.
  • Confirm and close the properties window for the transition.

Deadline types

When configuring deadlines in Joget, you can choose between synchronous and asynchronous deadlines, depending on the desired behavior when a deadline is reached.

  • Synchronous Deadlines: For synchronous execution, the current activity will no longer be active when the deadline is triggered.  This is used in cases such as an approval escalation.

  • Asynchronous Deadlines: For asynchronous execution, the next activity will be executed while the current activity is still waiting.  This is used in cases such as sending reminders.

You can set multiple deadlines for each activity. Ensure that the exception names match exactly to trigger the correct transitions.

Deadline in a Joget cluster

The deadline checker is controlled by the database. When the deadline checker interval time is reached. Joget will pick up a batch of 10 from the running activity instances having deadlines, and run it until it goes through all the running activity instances. Then it will start the next interval. Joget will skip the activity if the deadline is already triggered. In a clustered environment, every cluster node will have its deadline checker and will perform the same deadline checking process. The first checker that reaches the activity deadline first will flag (update) the deadline in the database, then proceed with the deadline workflow. The second checkers will skip that activity and continue the checking process.

Related documentation

Download related plugin

Download the tutorial app on Process Deadline from Joget Marketplace to learn more.

Created by Julieth Last modified by Aadrian on Dec 13, 2024