Hi, there.

This post is a revised edition of the previous post.

This is the continuation of the following article, regarding the usage of “Receive Task (Form)” that appeared in version 11.7.

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

The Workflow App we created throughout the above post is as the following.

  • #1, Have an applicant input an email address at Message Star 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 at a Receive Task (Form)
  • #4, The Human Task is something additional


There hasn’t been an expiration on the third Step. Even though it is difficult to guess the URL of the third Step, the risk of being attacked is also increased if it does not have an expiration. It is better to set the deadline even for the sake of subsequent work. So, we are going to use the feature of”expiration” of a Form, which appeared in version 11.8.

First, the Data Items. Add a Data Item that represents the deadline. Set the deadline as “7 days later” into its initial value.

Data Item Number Type Required Start Event
(Form)
Receive Task
(Form)
Human Task
Title Only display
Email address 0 String type
single line
Yes Editable Only display Only display
Name 1 String type
single line
Yes Editable Only display
Form key 2 String type
single line
Only display
Initial value

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

processInstanceStartDatetime.addDays(7)

Next, modify the configuration of Receive Task (Form). Regarding “Data editing permission”, it is as the above tabel of Data Items. I explain settings other than that. Set 7 days from the start of the process instance as the expiration time.

String type Data Item with the API key Data Item “Form key”
Page URL on Submit Leave blank
Deadline
data['3']

After changing the settings of the Receive Task (Form), modify the Workflow Diagram as follows.

When you set the deadline, a Timer Boundary Event appears on the Receive Task (Form) icon. In the actual processing of the process instance, the Receive Task (Form) is forcibly terminated when the deadline time is reached and the token moves to the Timer Boundary Event. Since the token moves from the Timer Boundary Event to the End Event, the process instance ends at that point. When the Receive Task (Form) is completed by the deadline time, the token moves to the “Confirm” Task of “Receptionist”.

Modify the body of the Email that is sent at “Throw” Event as well. It is necessary to tell the deadline to the person who first input his or her email address. That person has no way to know the deadline other than the email.

To
${[Email address:0]}
Subject Thank you for applying
Body
Please access the following URL and input the rest of your information.

${var[applicationRoot]}/System/ReceiveTask/Form/84/2/(Process ID)/(Form key)/view

The deadline time is as follows.

${[Deadline:3]}

That’s all for the revisions of this time.

Comparing with the one in the previous post, the settings have become quite simpler.