cancel
Showing results for 
Search instead for 
Did you mean: 

Due Date Notification: Where to put?

chrisx_212
Champ in-the-making
Champ in-the-making
Hello all… I'd like to know one thing. I want it that when a task reaches one day before the Due Date, if the Activiti Engine/Server is running, they will automatically detect it and then send an email message to whoever is assigned to it.

Where do you think I should put the sending code? As in, where is the place to put in time-based event like that?

Thank you.
7 REPLIES 7

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi Chris,

task due date is just an attribute. (http://activiti.org/userguide/index.html#bpmnUserTaskDueDate)
If you want to make an escalation based on the time, use timer boundary event instead.

Regards
Martin

Well, thanks for the suggestion. What I wanted is more or less for the system to read the current time, then compare with the existing Due Dates. If there's something near the Due Date, they will send out e-mail notification.

I have the codes to do the e-mail notification, I just need how to implement the time detection. So… Timer Boundary Event?

Can you tell me an example of how it works? This is the BPM20.XML programming I came up with, I wonder where it goes wrong, do I put it as a start timer or what…

<code><startEvent id="sid-5623B350-5CF1-4496-A28B-B02EBCF3E9BD">
    <timerEventDefinition>
        <timeDate>
             2016-03-03T14:35:14
         </timeDate>
     </timerEventDefinition>
</startEvent></code>

It's just going to the model workspace and then starting with a Start Timer in which the Time Date is set as such, and then it goes to a normal user-based task. It worked immediately than waiting for the Time Date. Where did I go wrong?

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi Chris,

the example: org.activiti.engine.test.bpmn.event.timer.BoundaryTimerEventTestin activiti source.

Regards
Martin

chrisx_212
Champ in-the-making
Champ in-the-making
Found it on GitHub. OK, I will download it to a file. My question is… how do we initiate that? Build an object about it somewhere?

martin_grofcik
Confirmed Champ
Confirmed Champ
how do we initiate that?

Initiate what?

chrisx_212
Champ in-the-making
Champ in-the-making
I mean, I want to make use of that. Like, create a Process that utilizes it, or call in one of the methods in that class that makes me able to see if the task is near the Due Date or something…

martin_grofcik
Confirmed Champ
Confirmed Champ
Chris,

As I understood you want to have a service which predicts whether timer boundary event will occur or not and evaluate probability of such an event.
https://github.com/gro-mar/activiti-crystalball/wiki/Getting-started#use-simulation-for-monitoring

Regards
Martin