Output variables from CallActivity on BoundaryEvent trigger?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-19-2012 11:25 AM
After triggering the boundary event, I'd like to read the published exit-code variable in the parent process, but tracing the Activiti Engine, it appears that handling the boundary event preempts publishing the call activity's internal exit-code variable to the output variable, so the output variable isn't pushed out to the parent (it is set in the child process, looking at the DB).
Is there a way to ensure that the parent process can read a variable from it's child call activity in the event a boundary event is triggered?
- Labels:
-
Archive
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-21-2013 08:51 AM
We are not a big fan of the BPMN data input and output definition.
So this will definitely need a lot more discussion.
Because we are now finalising the source code to the 5.11 release I would ask to let this one rest to after the release.
Then we can startup a discussion about it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-21-2013 08:52 AM
I also think it is better to be implemented with the new version of parser. I will reopen the issue after release of 5.11.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-21-2013 08:53 AM
Hi Saeid,
Yes we can do that now. I think we need a similar definition as the call activity to define the payload of the error message.
In the case of an error end event we only need an output definition.
As I said before we don't like the BPMN itemdefinition approach so I would like to keep it similar to the current call activity input and output definitions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-21-2013 08:54 AM
Do you mean something from BPMN standard or some activiti specific extension ?
Can you suggest an hypothetical xml sample ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-24-2013 05:39 AM
Will have to think a bit about that one. I'll come back to this tomorrow.
Best regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-25-2013 10:08 AM
If we could add a Map to the BpmnError then we have a container to add variables.
The error event definition could something like this:
<blockcode>
<errorEventDefinition errorRef="myError">
<extensionElements>
<activiti:variable name="customerNr" />
<activiti:variable expression="${customer.name}" />
</extensionElements>
</errorEventDefinition>
</blockcode>
Do you think this would be a good way to define the payload of the BpmnError?
Best regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-19-2013 04:08 PM
We currently use error end events to exit a subprocess in the case of an error and boundary error events attached to the CallActivities in calling processes. In a new use case we have to somehow attach data to the error event, because out-parameters of CallActivities (which we use to pass information back to the caller for regular end events) don't seem to be written in the case of error events.
I've seen there is a JIRA feature request for this https://jira.codehaus.org/browse/ACT-1462, but without progress in 2013. Is this feature still on the roadmap? Or is there some other way to pass information from callee to caller in the case of an error end event?
Many thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-20-2013 06:30 AM
I was waiting for a response from Saeid (or somebody else).
I'll ping Saeid about this and let's see if we can add it to the 5.13 roadmap.
Best regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-22-2013 06:18 AM
I've updated the post with the code, it was gone due to the rendering of the new forum.
If you add a blockquote element to your code it will be better readable as well.
In the case of this error event definition, I don't think we need an source and target definition, but only a way to express which variables should be part of the error payload. So that's the background of my code proposal. WDYT?
Best regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2013 03:57 AM
First of all, it seems that you have inserted a piece of XML in your above #17 comment, which is not readable Do you have it somewhere ?
Lets have a wrap up. We need extensions on two parts, catching and throwin. And either of them can be done in two ways, BPMN standard and activiti shortcut.
1. BPMN standard
If we want to stick to the standard, based on the specification, these could be throwing and catching parts.
Sample throwing, BPMN style, Long version:
<endEvent id="myErrorEndEvent">
<dataInput id="event_variable" />
<dataInputAssociation>
<sourceRef> process_variable </sourceRef>
<targetRef> event_variable" />
<assignment>
<from> ${process_variable.field}</from>
<to>${event_variable.field}</to>
</assignment>
</dataInputAssociation>
<errorEventDefinition errorRef="myError" />
</endEvent>
or simpler:
Sample throwing, BPMN style, shorter version:
<endEvent id="myErrorEndEvent">
<dataInput id="event_variable" />
<dataInputAssociation>
<sourceRef> process_variable </sourceRef>
<targetRef> event_variable" />
</dataInputAssociation>
<errorEventDefinition errorRef="myError" />
</endEvent>
sample catching, BPMN style, Long version:
<intermediateCatchEvent id="myErrorIntermediateCatcher">
<dataOutputAssociation>
<sourceRef>event_variable</sourceRef>
<targetRef>process_var2</targetRef>
<assignment>
<from> ${event_variable.field}</from>
<to> ${process_variable.field}</to>
</assignment>
</dataOutputAssociation>
<signalEventDefinition signalRef="MyMessage" />
</intermediateCatchEvent>
or simpler:
Sample catching, BPMN Style, Short version:
<intermediateCatchEvent id="myErrorIntermediateCatcher">
<dataOutputAssociation>
<sourceRef>event_variable</sourceRef>
<targetRef>process_var2</targetRef>
</dataOutputAssociation>
<signalEventDefinition signalRef="MyMessage" />
</intermediateCatchEvent>
Ok, You have already stated clearly at least twice that you are not a big fan of usage of BPMN Data input and Data output specification, but I would like to insist on keeping compatibility with BPMN as far as possible and the same time provide easier activiti specific shortcuts. Actually it is already used in web service task.
Here is my shortcut proposal:
Activiti extension:
Sample throwing, Activiti extension style:
<endEvent id="myErrorEndEvent">
<extensionElements>
<activiti:in source="process_var" target="event_var" />
</extensionElements>
<errorEventDefinition errorRef="myError" />
</endEvent>
Sample catching, Activiti extension style:
<intermediateCatchEvent id="myErrorIntermediateCatcher">
<extensionElements>
<activitiut source="event_var" target="process_target_var" />
</extensionElements>
<signalEventDefinition signalRef="myError" />
</intermediateCatchEvent>