Workflow with several End Event

Hi!
I have simple process for handling email attachments. I have several end event (when process is failed).


And I need to receive information about how this process finished (at which endpoint).
I thought about using exporter to send message to Kafka by filtering record about end event completion.
But I can’t make filter on exporter to receive only this records.
Is there some solution for my case?
Or maybe do I have to make my process in another way?

Thanks in advance.

Could you use an exporter that is listening to the BPMN Error event?

1 Like

Thanks for reply.
Yes, i think it would solve my problem. But I don’t know how to do this.
I know how to make exporter for incidents, but in my case this is different things.
For example, we want to handle Excel file, but we got some image. This is business error and attachment handle process will complete successfully with end event “format-file-verification-failed”. But when we can’t get the attachment from storage because of network problem or something else, it would be the incident.

1 Like

Alternatively to an exporter, you can also send the result directly to the caller (e.g. via service task). Or, in case of a short living workflow, you can create the workflow synchronously - see https://docs.zeebe.io/reference/workflow-instance-creation.html#create-and-await-results.

1 Like

You could also use a call activity, which calls this process. After the call activity you evaluate the result with an xor gateway and have several task which does your specific thing. Then this is also more transparent for you and others.

There are so many ways :grinning:

2 Likes

Thanks for replies!
In both this case I have to develop several services for sending information about process end. Or I have to include information about service finish status (success or failed) in workflow variables. I thought about this solutions but I want to make a more common decision.
The question is how can I receive information about end event of workflow.
I can analyze record value as a text in exporter but I hope that there is better solution for this case in Zeebe.

1 Like

Outcome worker? https://zeebe.io/blog/2019/08/zeebe-rest-affinity/

1 Like

You could also just model it in the same diagram after the boundary event, which makes it much clearer.
May I ask what do you want to achieve?

1 Like

Yes, I thought about this.
In fact it was our first solution.
In this case we will get something like this.


But we have to hardcode status as text in diagram or use some convention for status.
BPMN workflow and services become strictly dependent each to other. We try to avoid this. But If we didn’t find another solution, we will do this.

We have workflow with several possible way of completion and we need to get information about which way workflow is completed. We intend to store this data in Kafka. And Exporter seems the best way for this approach because information about all events already stored in broker.

1 Like