how to send notification using boundary timer (time interval), i don't want to complete my user task (For Action)? here i have attached my workflow image.

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
nprajapati
Active Member

how to send notification using boundary timer (time interval), i don't want to complete my user task (For Action)? here i have attached my workflow image.

Jump to solution

BPM Workflow

1 Solution

Accepted Solutions
thuynh
Established Member II

Re: how to send notification using boundary timer (time interval), i don't want to complete my user task (For Action)? here i have attached my workflow image.

Jump to solution

Hi Nimesh,

You should be able to fire timer event without ending the current activity. Have a look at the user guide to understand the timer event definition Activiti User Guide 

Here is an example of the process with timer event to trigger escalation task when the current activity exceeds expected time to complete.

I successfully ran this process and observed that the timer was triggered as expected. The 'sending notification email' task was executed three times, after each 10-second interval. The current activity 'usertask1' remains active when the timer was triggered.

Here is a snippet of my unit test log.

Hope this answers your question.

Thanks,

Thong Huynh

-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running org.activiti.designer.test.TimerProcessTest

INFO: Process instance started: id: 5 timerProcess:1:4
Jan 05, 2017 3:52:26 PM java.util.logging.LogManager$RootLogger log
INFO: Current task: Complete Application
Jan 05, 2017 3:52:45 PM java.util.logging.LogManager$RootLogger log
INFO: Sending notification email for execution id 14
Jan 05, 2017 3:52:54 PM java.util.logging.LogManager$RootLogger log
INFO: Sending notification email for execution id 20
Jan 05, 2017 3:53:04 PM java.util.logging.LogManager$RootLogger log
INFO: Sending notification email for execution id 26
Jan 05, 2017 3:53:26 PM java.util.logging.LogManager$RootLogger log
INFO: Process execution: id: 5 and current activity id= null
Jan 05, 2017 3:53:26 PM java.util.logging.LogManager$RootLogger log
INFO: Process execution: id: 8 and current activity id= usertask1
Jan 05, 2017 3:53:26 PM java.util.logging.LogManager$RootLogger log
INFO: Running processes: 1
id 5, ended=false
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 65.302 sec

Results :

Tests run: 1, Failures: 0, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:07.895s
[INFO] Finished at: Thu Jan 05 15:53:26 ICT 2017
[INFO] Final Memory: 10M/167M
[INFO] ------------------------------------------------------------------------

View solution in original post

2 Replies
thuynh
Established Member II

Re: how to send notification using boundary timer (time interval), i don't want to complete my user task (For Action)? here i have attached my workflow image.

Jump to solution

Hi Nimesh,

You should be able to fire timer event without ending the current activity. Have a look at the user guide to understand the timer event definition Activiti User Guide 

Here is an example of the process with timer event to trigger escalation task when the current activity exceeds expected time to complete.

I successfully ran this process and observed that the timer was triggered as expected. The 'sending notification email' task was executed three times, after each 10-second interval. The current activity 'usertask1' remains active when the timer was triggered.

Here is a snippet of my unit test log.

Hope this answers your question.

Thanks,

Thong Huynh

-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running org.activiti.designer.test.TimerProcessTest

INFO: Process instance started: id: 5 timerProcess:1:4
Jan 05, 2017 3:52:26 PM java.util.logging.LogManager$RootLogger log
INFO: Current task: Complete Application
Jan 05, 2017 3:52:45 PM java.util.logging.LogManager$RootLogger log
INFO: Sending notification email for execution id 14
Jan 05, 2017 3:52:54 PM java.util.logging.LogManager$RootLogger log
INFO: Sending notification email for execution id 20
Jan 05, 2017 3:53:04 PM java.util.logging.LogManager$RootLogger log
INFO: Sending notification email for execution id 26
Jan 05, 2017 3:53:26 PM java.util.logging.LogManager$RootLogger log
INFO: Process execution: id: 5 and current activity id= null
Jan 05, 2017 3:53:26 PM java.util.logging.LogManager$RootLogger log
INFO: Process execution: id: 8 and current activity id= usertask1
Jan 05, 2017 3:53:26 PM java.util.logging.LogManager$RootLogger log
INFO: Running processes: 1
id 5, ended=false
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 65.302 sec

Results :

Tests run: 1, Failures: 0, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:07.895s
[INFO] Finished at: Thu Jan 05 15:53:26 ICT 2017
[INFO] Final Memory: 10M/167M
[INFO] ------------------------------------------------------------------------

View solution in original post

nprajapati
Active Member

Re: how to send notification using boundary timer (time interval), i don't want to complete my user task (For Action)? here i have attached my workflow image.

Jump to solution

HI Thong Huynh,

Thank you so much for your reply this is really help to me.

Regards,

Nimesh