转 Sending recursive mails upon reaching the deadline until the task is completed

本文介绍如何设置一个工作流,在截止日期到达后每三分钟自动发送提醒邮件直至任务完成。通过定义用户决策步骤与循环机制,结合后台处理活动实现邮件定时重复发送。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Sending recursive mails upon reaching the deadline until the task is completed

Recently, we encountered a scenario where-in we need to send recursive mails for every xx hours, when the deadline is reached, until the task is completed. I am presenting the same here, with a simple example, hoping that this would be useful to you all. 

Start a new workflow and define a "User Decision" step. For steps on how to define a User Decision step, click here.

In the step "User Decision", switch to tab "Latest End" and provide the details as shown below:

In the action, select "Modeled" from the list. Enter the name of the outcome.

 

Click on "Transfer and to Graphic" (Green tick button).

You can notice that there are 3 branches now. Two belong to the User Decision Step (YES/NO) and the other one is of Modeled deadline. So whenever a deadline is reached, this branch executes. When the user completes his task, it would either take YES or NO branch accordingly.

Now assume that we need to send repetitive mails to the agent for every 3 minutes, until he completes the task (in this case, acting on User Decision step).

Double-click on "Undefined step" in the "Modeled" branch and select LOOP(Until)

Using "Loop (Until)",  we would be sending emails repetitively for every 3 minutes. To keep the loop open continuously, lets define a condition which would never be met.

Enter a step name and then click on "Click here to create a new condition".

Since we intend to make this Loop indefinite, create a condition similar to the following one.

Now go back to the main screen.

The above screenshot is of the step "Loop (Until)". Now double-click on the "Undefined" step above and create an email step.

Enter the recipient name and other details as shown above.

Now we need to send mails once every three minutes until the task is finished. To achieve this, we would need to create a business object (or use an existing one) and create a dummy method (with no code in it). Ensure that the check box "dialog" is unchecked in the properties of this method.

Now create a step "Activity" by double-clicking on undefined step after the email step in the Modeled branch.

Click on "Create new task"

Provide the details as shown below:

Don't forget to check the checkbox "Background processing".

SAVE and click on Back button.

In the activity step, switch to "Requested start" tab and provide details as shown below:

Using the above step, we are restricting the LOOP to send mails for every 3 minutes only.

Save and activate your workflow.

Test run the workflow. Do NOT execute the work item and wait for the alert mails.

Work item in inbox:

Work item along with the alert mails (after the deadline is reached):

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值