Hi there!

Today, I will continue from the previous article about how to use the new function, Receive Task (Form), introduced in version 11.7.

How to Utilize Receive Task (Form) – Email Address Verification through Webform Application

The Workflow App we created in the last post works as follows.

  • #1 Have an applicant input an email address at the Message Start Event (Form)
  • #2 Send an email to the email address entered at #1 to inform the URL of #3
  • #3 Let the applicant input the rest of information in a Receive Task (Form)
  • #4 The Human Task is something additional

There was no deadline for the 3rd Step in this App.
Even though the URL for Step 3 is difficult to infer, the risk of the site being attacked increases if the Receive Task (Form) is open for an unlimited period.

It is better to set a deadline, particularly in terms of the work of the business accepting applications.

So I will refine the above Workflow App. First, I will add a Data Item specifying the deadline.
I have set the deadline’s initial value to “after 7 days”.

Data Item Name Data-type Required Start Event
(Form)
Receive Task
(Form)
Human Task
Title Only display
Email address String-type
single line
〇 Editable Only display Only display
Name String-type
single line
〇 Editable Only display
Form key String-type
single line
Only display
Initial value

#{#randomString(20)}
Deadline Datetime-type Only display
Initial value

processInstanceStartDatetime.addDays(7)

I also changed the email body because nobody will know the deadline unless I tell it.

Destination
${[Email address:0]}
Subject Thank you for applying
Body
Please access the following URL, and enter the rest of required information.

${var[applicationRoot]}System/ReceiveTask/Form/1760/2/${[ProcessID]}/${[Form key:2]}/view

The expiration date is as follows.

${[Deadline:3]}

Next, I will change the Workflow diagram to include an AND gateway between Steps 1 and 2. This is what makes a token flow to all outgoing branches, and the subsequent processing will operate in parallel.

Manual for Gateway

In the other Process that operates in parallel, a Timer Intermediate Event is used. Of course, the time to be specified for the Timer Intermediate Event is the Data Item “Deadline” which I added earlier.

Manual for Timer Intermediate Event

After that, I will use a Terminate End Event so that the Process is terminated forcibly when the deadline comes. In other words, it forcibly terminates the other token which flows in parallel.

Manual for Terminate End Event

However, in this method the whole Process ends when the deadline arrives, even if the Receive Task (Form) has been completed. This simple Workflow App is only for confirming the received details, but if the subsequent procedure takes a while forced termination must be avoided, so I will refine the Workflow App, again.

Put an XOR gateway after the Timer Intermediate Event so that the token will flow to the Terminate End Event (where the Process will be terminated forcibly) only when the Receive Task is not completed. If the Receive Task has been completed, the token flows to the normal End Event and the Process continues as it is.

To judge whether the Receive Task is completed or not, I utilized the required Data Item “Name” which is to be input for the first time in the Receive Task. If nothing has been entered in Name, it is judged that the Receive Task (Form) is not completed, so the token flows to the Terminate End Event. If the Item is not empty, it is judged that the Receive Task (Form) has been completed, and the token flows to the End Event. When the token flows to the End Event, the other token flowing in parallel is not terminated. It will continue flowing along the Workflow diagram as it is.

Name Conditional Expression Destination
Uncompleted Name (has not entered) Terminate End
Default Flow Always move to Destination End

That’s it for today! We are about to release version 11.7 (2018-06-11)

v11.7 2018-06-11 Equipped the Open Form that Receives Entry in the Middle of Workflow

2 thoughts on “How to Utilize a Receive Task (Form) – Set a Deadline for an Application Form”

  1. Pingback: How to Utilize Receive Task (Form) – Set a Deadline for Application Form (Revised edition) – Questetra Support

  2. Pingback: Phone Number Verification through Web Form Application – Questetra Support

Comments are closed.

%d bloggers like this: