cancel
Showing results for 
Search instead for 
Did you mean: 

Does Activiti support Intermediate Throwing Event?

matt1
Champ in-the-making
Champ in-the-making
Intermediate Throwing Event

I can't seem to find anything in the source. And I don't see this event in the eclipse designer. Is it supported?

More specifically, I would like to be able to throw an event and have it caught all within the same process.

However, so far I'm stumped as to how to make this happen. I've tried with signals and events, including a none throwing event + listener. (The problem here is getting a handle on the root execution id, which seems to be impossible from a listener)

In the case where I have two paths defined in a process, and one of those paths causes an event, and I want the other path to catch it. This seems straightforward, but I can't seem to find the right pattern to do it.

It seems to me that an intermediate throwing event is what I need, but I don't see how to set that up in Activiti.

If someone could suggest the appropriate throw/catch idiom, I'd be very grateful.

2 REPLIES 2

matt1
Champ in-the-making
Champ in-the-making
I have resolved the issues and confusion I was having. I was under a false assumption about how processes are managed in Activiti. I'd still like to know if Intermediate Throwing Event is support for Messages.

In any case, I'm able to publish, consume, and correlate messages by persisting a correlation between the process instance id and the business key in the path that subscribes to the message. In the publishing path, I lookup the execution id based on the business key and use that execution id to target the subscriber.

The root of my misunderstanding was that in a process diagram that starts two processes that these two processes would be children of a root process. But I realized that this is not the case. If there are two separate processes started they are distinct and separate even though they were started from the same process xml/diagram.

So, defining two processes in the same bpmn xml is equivalent to defining the processes in two separate bpmn xml files.

As such, one has to store correlation data from the subscribing process so that that the publishing process can lookup the correlation and the publish to the subscribing process. Since in my case the publishing and subscribing processes share the business key, I decide to use that key as the correlating bit of data.

Just leaving this here in case it helps someone in the future.

Thanks,
Matt


martin_grofcik
Confirmed Champ
Confirmed Champ
Hi Matt,

Intermediate message throw event should be supported.

Regards
Martin