Let’s Set a Deadline

When creating a workflow App, you can set the date and time a Task will occur and the deadline date. For example, consider a business trip request, it may be a little inconvenient if the Task “Report the content of the business trip” arrives immediately after the business trip request is approved.

“There are still a few days until my business trip, will the notification of the Content Report Task stay in My Tasks until then?”

You may also want a deadline for submitting business trip reports. You can tell employees by group chat, email, or verbally that they should submit the report by a certain date, but that’s not very efficient. If you set a deadline for the task itself Questetra BPM Suite will automatically manage the deadline. In this tutorial, we will create an App that handles a series of workflows related to business trips by using Timer Intermediate Events and deadlines for Service Tasks (Data Assignment) and Human Tasks. By designing an App using these functions effectively, you can control the creation of tasks and their deadlines according to a schedule.

However, this time we will focus on how to control the progress of tokens according to the date and time, so we will just create a simple Travel Request/Report App. When actually using it for business it will be necessary to devise conditional branching on the workflow diagram, and to configure the User settings in the Swimlanes.

Advance Preparation

To create the App, please refer to the Travel Request App described in the Get Started guide. Create a new App in accordance with the contents of chapter 2 and chapter 3 up to the section “Settings related to input values”. Chapters 1 and 2 are almost independent in contents, but the User / Organization registration information prepared in chapter 1 is also used in chapter 2 and thereafter. For Users and Organizations, read as appropriate according to your environment, or prepare new ones by reading chapter 1.

Workflow Diagram

Edit the App you created so that it looks like the diagram below. The round icon labelled “Business Trip Start” is the Timer Intermediate Event. You can find this in the advanced palette, like the Service Task (Data Assignment).

In order to make the App we require it is necessary to set the Human Tasks, so please set the App up like this for the time being. We will touch on the branch of the “Confirm” Task later.

Data Items

Set up 7 Data Items as below. Let’s re-use the Data Items already set.

Name Data-type Field name Remarks
Title String-type / single line
Business trip start date Date-type / Y/M/D q_trip_start “Date from” in “Your first step…”
Business trip end date Date-type / Y/M/D q_trip_end “Date until” in “Your first step…”
Applicant User-type / Search select box q_trip_user
Request details String-type / multiple lines q_purpose “Contents” in “Your first step…”
Amount Numeric-type q_budget
Report deadline Date-type / Y/M/D q_report_deadline
Report content String-type / multiple lines q_report

Data Editing Permission

Set as follows.

Request Travel Approve Report Confirm
Title Editable Display only Display only Display only
Business trip start date Editable Display only Display only Display only
Business trip end date Editable Display only Display only Display only
Applicant Editable Display only Display only Display only
Request details Editable Display only Display only Display only
Amount Editable Display only Display only Display only
Report deadline No display No display No display No display
Report content No display No display Editable Display only

“Business Trip Start” Settings

The Timer Intermediate Event is an object that pauses the token mid-flow until a specified date and time. By inserting this event in the middle of the workflow diagram you can pause the Process.

This time, we will use the Timer Intermediate Event to prevent the “Report” Task from occurring until the business trip begins. You set the timer to “Datetime specified by a data item” in the properties and select the Data Item “Business trip start date”. With this, the token will stay on “Business Trip Start” until the date which has been entered at the “Request Travel” Task.

After the “Business trip start date”, the token proceeds to the “Report” Task. This prevents the “Report” Task from entering the applicant’s My Tasks list before the trip begins.

To specify the timer with a Data Item, either of the Date-type or Datetime-type is used. When the Date-type is used like in this example, the timer starts operating at 00:00.

“Deadline Calculation” Settings

We will use the Service Task (Data Assignment) to calculate the deadline date to be set in the “Report” Task. With Service Task (Data Assignment) you can calculate numbers, characters, and date/time. For example, if you want the “Report” Task to be completed within 7 days after the “Business trip end date”, it is necessary to calculate that date + 7 days for the deadline of the Human Task described later. The formula looks like this:

#q_trip_end.addDays(7)

Let’s save the calculated date in the Date-type Data Item “Report deadline”.

For functions that can be used to calculate Date and Datetime-type Data Items, see the following page.

Set Deadline on “Report”

If you set the deadline in the Human Task properties, you can force the Task to be terminated or send a notification to the person in charge of operating when the specified time has passed. This time, let’s set the deadline to 7 days after the “Business trip end date” like we calculated earlier so that notification will be sent when the deadline is passed.

When specifying the deadline date of a Human Task with a Data Item, you can use the Date-type and Datetime-type. If the Date-type is used like in this example, the deadline will be 23:59.

If you set the action when the deadline is reached to “No action”, you will receive a system notification that “The deadline has passed” when the deadline passes, but you can still Operate the Task after the deadline.

With the settings up to this point, we have been able to implement a series of tasks from the business trip request to the report about the trip, into the workflow App.

How do I turn off the “Confirm” Task notification after 3 days?

By the way, depending on the type of business, the Task to confirm the contents of the report may be unnecessary. If such a task is left unattended My Tasks will accumulate more and more unless the App handles it.

To deal with such a case let’s make the Task abort 3 days after the “Task creation date” using the deadline settings in the Human Task. Set the deadline setting for the “Confirm” Task as follows.

If “Action at Deadline” is set to “Abort task”, a timer boundary event is added to the Human Task icon. Upon the deadline, the token will go there.

With this configuration the token goes to the Join Gateway then moves to the End Event regardless of whether the supervisor finishes the Task or leaves it for 3 days. When the Task is aborted the Task notification disappears, so the “Confirm” Task disappears from the My Tasks list of the supervisor three days after creation.


In this article, the sample App itself has been concise to provide an easy-to-understand idea of how to use the Timer Intermediate Event and deadline settings. If you want to control the date and time of the token’s flow, try applying this article.

%d bloggers like this: