Hi,
I'm trying to use the Timer start event with an unlimited number of repeats at 1 week intervals (R/P1W). The behaviour I observe in my test case is that the process instance terminates as soon of the first run through the process is complete but the timer continues to exist. Fair enough, each time the timer fires it is creating a new instance in accordance with the BPMN spec.
So how do I remove the timer? I can find the job using the ManagementService but there does not seem to be any way to cancel a job.
How should I be thinking about this?
Tim
I'm trying to use the Timer start event with an unlimited number of repeats at 1 week intervals (R/P1W). The behaviour I observe in my test case is that the process instance terminates as soon of the first run through the process is complete but the timer continues to exist. Fair enough, each time the timer fires it is creating a new instance in accordance with the BPMN spec.
So how do I remove the timer? I can find the job using the ManagementService but there does not seem to be any way to cancel a job.
How should I be thinking about this?
Tim
Currently, nothing is exposed to delete jobs. But doesn't it make more sense, to undeploy the deployment where the timer is defined? This way, you do it the right way I guess…
I also have a problem in my test case since I am deploying using the @Deployment annotation but before this is cleaned up I get a failure because the DB is not 'clean' (having an outstanding Job).
So back to the other part of my question: The usefulness of the timer start would seem to be limited if I can only use it for one data set (in my case one user) because of the need to undeploy the process definition to stop the timer. In the simple example attached I use a service task to periodically 'say hello' to each user where user is process data injected at process start. If one user leaves I appear to have to
- undeploy the template,
- deploy it again (unchanged) and
- start instances for every user except the one who left
Is this really 'the right way'?
I suppose an alternative is to write the process differently and have a task to retrieve the list of users then use a multi-instance service task to 'say hello' to each of them. The reason I originally did not do this is that I would like to vary the interval on the timer for each user.
What do you think, is there a different way to look at this that I am missing?
Tim
Attachments
I think that's a valid and easy request. Could you create a Jira for this and assign it to me?
some of possibilities:
-> change timer's due date,
-> change process engine time.
Regards
Martin