Can catching a signal expire other tokens in the process instance?

I have two different processes, let’s call them A and B. They both have running instances.
When an instance of Process A sends a signal. I need the instances of Process B to have their tokens jump to a particular task.
I’d like to use swimlanes because they communicate the business roles really well.
I can’t use a Signal Start, because the instances are already running.
I’m thinking if I have a parallel gateway and an intermediate event for catching the signal, then there will be two tokens in the Process B instances. But I can’t figure out how to expire the token that went down the “normal happy path” when the signal arrives.

Any thoughts?
Thanks in advance.
-Doug

Would using an Event Subprocess with an Interrupting Signal Start work?
At any point in your process, if you receive the signal, it would stop whatever it’s doing and jump to the subprocess.

If you only want to catch the Signal on a particular task, you should be able to use a Signal Boundary event.

1 Like

If I use an Event Sub-process, how could I get back out to the main process flow at the point that I want to jump to?

And as far as I understand, signal boundary events are only catching when that particular task is active. So I’d have to lose the collaborative lanes and wrap the bulk of the main process in a sub-process so that a signal could exit the sub-process and re-enter it at the beginning. Any way to keep the lanes?

Would you be able to upload the model you’re talking about? It’ll make it a lot easier to understand what you’re trying to do and what restrictions you have.

I’ve attached ProcessA.bpmn (21.3 KB) ProcessB.bpmn (10.3 KB)
When the Process A has revisions performed, the Process B needs to jump and expire all tokens so that complementary revisions can be done and reviews started over.

Maybe my understanding of intermediate events is a little off. I read somewhere that when a token arrives at an intermediate event, it waits there for that event. So I’m thinking that I have to get a token into an intermediate event in order for it to be waiting. But then I see the link events. The catch one does not need to have an inbound line/arrow. Is that unique to the link event? Or can I have my signal event as I’ve drawn it in ProcessB? And if I can, does it expire the token in the main path?

What do you think @Niall ?

I’ve been doing a little testing and I think this is what needs to happen.
I think I need a process to serve as the signal capture process that will start from a signal.
This process then has an external worker task in it.
That external worker task would

  1. get the variable data from the signal since it’s passed into the process that is started by a signal,

  2. interrogate the process that sent the signal,

  3. find all process instances of Process B that have a matching value,

  4. determine the currently running activities,

  5. Modify the instances to start the “Make Revisions” activity and cancel the currently running activity,

  6. and then complete the external worker task.

What do you think?

Hi @DGilmour22

I meant to get back to this question from you, so sorry for the delay.
First i want to say - good use of link events, i don’t see them too often in the wild and they’re pretty great.

it seems that by using lanes you’re kind of tying your hands of the best possible solution, which is to use an embedded sub process to surround the active part of the process that is waiting for the signal. I think before you take the solution to messing around with api there could be some unconventional BPMN solutions for this - it kind of depends on your model a bit but based on the one you sent, you could potentially use compensation to trigger an even after a signal is sent.

Thanks @Niall
I realize that I forgot a line on Process B. After the Make Revisions task, sequence flow should be routing back to Role 2 Review. (starting over essentially).
So I tried the compensation, but found that I could not leave the Compensation activity with a sequence flow. I don’t think that’s allowed in the BPMN specification.
So I’m going to try this with a link event.

EDIT :: That didn’t work. I can’t deploy because the there is no target for throwing link in the event sub-process.
"message": "sequence flow points to link event source with name 'ToRevisions' but no event target with that name exists. Most probably your link events are not configured correctly."

How do I get out of the event sub-process and back into the normal flow?

EDIT 2 :: It’s looking like I need to lose the lanes. Then I’d attach the intermediate catch signal to the sub-process you mentioned and have it loop back to re-enter the sub-process. Or if I really want to keep the lanes, then I put a catch signal on all of the tasks individually with “links” to the revision.

This is working. Where the signals are all listening for the same signal.