cancel
Showing results for 
Search instead for 
Did you mean: 

How to 'reactivate' an intermediate catching message event?

stephsmith
Champ in-the-making
Champ in-the-making
I have included two tests cases.

I have defined an intermediate message catching event, that once entered, it will flow into an intermediate timer catching event.
The timer job can be long running.
While this timer job is still running, I need to be able to "reactivate" this intermediate message catching event so that messages can continue to be received.

If I try to model the a sequence flow from the message catching event back to itself, I end up with two subscribers. This appears to be a bug??

If I change the workflow so that it uses a manual task, I can workaround the problem. I don't really want to define a manual task.

Can you tell me if the first scenario is a bug (should I enter a JIRA issue)?

Or can you tell me a better way to handle this scenario?

Again I have included a test case that illustrates both scenarios.
Thanks for any help!
4 REPLIES 4

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi,

I would say that you can use MessageStartEvent instead message intermediate event.
In that case there there will be always one subscription to start the process based on the message (followed by timer).

Regards
Martin

stephsmith
Champ in-the-making
Champ in-the-making
Hi Martin
We cannot use a message start event because this will start a new process instance.
This has to be done within a single process instance.

Any other suggestions/ideas?

trademak
Star Contributor
Star Contributor
Maybe an event sub process is worth considering for your use case. Because then you can trigger the same process instance multiple times at any moment.

Best regards,

stephsmith
Champ in-the-making
Champ in-the-making
Perhaps it might help to provide more details so you can get a better understanding of what I’m trying to do.
I tried to provide just a simple example but think the background is necessary

Specific issue:
What is the recommended way to model scheduling (and rescheduling) a task based on a data object being updated?

Specific Details:
For backwards compatibility reasons, we need to support the “scheduling of a task or subprocess” to run.
Some event message occurs and this needs to trigger the scheduling of a task or subprocess.
We need to create the timer so that when it fires, it will start this scheduled task.

Some requirements
1) You cannot schedule muliple tasks at one time. Only one scheduled at a time. If the task is already scheduled (ie Job already exists), then we only support rescheduling (ie changing the scheduled time). WE support this by deleting the current Job before the new timer Job is created
2) Support rescheduling
- The timer job may be long running. While the timer job is still running, we still need to be able to receive additional message events that will start a new timer with a new value.  (as mentioned earlier, we already take care of deleting the existing one to ensure only one scheduled task).
- The task that is scheduled should to be non-interrupting, the rest of the workflow should continue as is…..


As mentioned in the original post, this all works fine if I model in the Manual Task but am hoping to avoid that.
Hoping this might provide a little more detail on requirements. THanks again for any help on this