Camunda 8 - pass parameters from subprocess with error end event

Hi, with <zeebe.version>8.2.2</zeebe.version>
Is it possible to read parameters from subprocess, which ends with error end event, in main process?
I declared Output in Error End Event and in Error Boundary Event.
I set in serviceTask (BPS_CREATE_TICKET) that random12 = “random132322”.
It’s visible in subprocess correctly, but in main process it’s null.

Subprocess:

Main process:

Welcome to the community :tada:

I think that you’ll need to map your variables from the subprocess to the parent process. Take a look at the docs regarding variable scope

Hope this helps :smiley:

Hi, welcome to the community.

You cannot put an “Output” on an end event (someone should really add a feature request to lint for that…) since “Output” is how a variable is mapped from the step into the process. If the process is ended by the “End” step, where would that step map the variables into?

In order to work around that, add a step between BPS_CREATE_TICKET and the error end to create the variable you want to propagate up to the parent process

Thanks guys for answers, this community looks nice :slight_smile:

But for me it looks like bug. I tried it also with set Output in first step. Then…
If i end subprocess with End event, i can see this ‘positive’ variable set in parent process.
If i end subprocess with Error end event - this variable is null in parent process.

In parent process i marked ‘Propagate all child process variables’.

Hello my friend @Messikk94 !

And if in the “Global Error Reference” field you reference the same for the 2 error events, doesn’t it work?

I saw that the Global Error Reference of the end error event has one name… and the error boundary event of the call activity has another name for the Global Error Reference…

Try using the same name to test.

William Robert Alves

Thanks for hint @WilliamR.Alves but it’s still the same behavior.

This other thread might also be important to consider:

But I’m pretty sure your screenshots show that you are collecting variables in the Error Catch and Outputting them in the parent process.

Could you post a set of minimal repro files?

Hello, I have same problem. My minimal reproduction process:

Variable “status” is expected to have value “error” but has actual value “new”.

How could I propagate variables from subprocess ended with error?