Solved! Go 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] ------------------------------------------------------------------------
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] ------------------------------------------------------------------------
HI Thong Huynh,
Thank you so much for your reply this is really help to me.
Regards,
Nimesh
Ask for and offer help to other Alfresco Process Services and Activiti Users and members of the Alfresco team.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.