Task Event expoerter

Hi, im trying to export task events.
I know there is this epic: https://github.com/camunda/camunda/issues/21974 but we are trying to evaluate if migration to C8 is a viable solution for us and we need to answer this with a PoC in Q1.

Now, what we need it to react on task events: create, assign, unassign, complete, delete. In C7 we did this by reacting to changes in tasklifecycle. Since in C8, user tasks are “service tasks disguised as user tasks”, they seem to not produce events on change of assignee.

I have created an event exporter, which exports all events to my custom processor app, however, it seems like all the USER_TASK events produced by the engine, are events related to creation / completion of task. I understand that it makes sense, since all the assignee info is stored as additional properties of this pseudo user task, but how can I react to changes of these values? I have tried logging all events produced by the engine to verify what I should react to, but seems like no event of any type is produced on task assignment change. Please advise :slight_smile:

Hi @JohnArray - I don’t have a complete answer for you, but I think the best solution is going to the user task listeners that you linked to, which are currently targeted for version 8.7 (the next release). You can find some initial support for them in the latest 8.7 alpha releases (see here).

However, you said your deadline is Q1! Do you have an existing C7 license, or are you using C7CE?

Hi @nathan.loding, thank for your answers, I am aware of this functionality in 8.7, however, putting a listener on every single user task will not cut it for us. Our solution is an integrated platform on which multiple teams deploy their solutions, we don’t want to enforce all teams to put listeners into user tasks. In C7 we have developed a plugin for engine which captures all events of task lifecycle and propagates them to our processing server for user notification and data enrichment. This makes the approach process agnostic, “whatever you develop, we can react to it, without your involvement”, that was our approach. We hope to mimc this with exporters in C8. Currently we are running on C7CE, however our management wants to explore which way to proceed, either to go on C8 (but here the coverage is needed) or abandon Camunda completely and migrate to some C7 fork.

Are you by any chance aware if this kind of “plugin approach” will be possible with exporters?
Or maybe by any other kind of solution that is better than exporters, that will be able to handle this use case?

Hi John. Thanks for reaching out. I am discussing the same thing in a support ticket with a customer at the moment (for context: we created a taskforce internally to remove all migration blockers asap).

The solution approach for them is:

  • Use Task Listeners (I think you can validate them with alpha3)
  • Probably we need some more events in here - I am currently discussing this
  • Using a BpmnParse extension upon deployment of the models (which is close to the C7 mechanism, just that this is not a server component [aka Process Engine Plugin], but hooked into the client [via Spring on Auto-Deployment]

We are also discussing other options to allow such manipulations of the BPMN on-the-fly, but need to include all different deployment scenarios (e.g. deploying from the modeler, web-modeler, CI pipeline, …) - so it is a bit more complicated in C8 (but also gets more powerful).

Are you running SaaS or self-managed?

Best
Bernd

1 Like

Thanks for the update.

As for the proposed solutions:

  • Task Listeners - As per alpha release preview: “You can now define user task listeners in your Camunda 8.7 diagrams, with helpful guidance provided every step of the way. Note that the event names are subject to change prior to the stable release.” I understand that this is to strictly invoke job based on the BPMN element, there is no way of creating generic exporter for all kinds of task events?
  • BpmnParse could work for us, but I to be honest, modifying BPMN resources on the fly during deployment sounds very invasive, as in our case we would basically modify something provided by other team.

We are running self-managed as PoC, and if we decide to go to prod, it will be self-managed as well.

Hi @JohnArray

Redis exporter is a great option, unless your requirement involves blocking workflow execution until your logic finishes completely; in that case, task listeners would be more appropriate.

I understand that this is to strictly invoke job based on the BPMN element, there is no way of creating generic exporter for all kinds of task events?

Yes, but you could use the same jobType everywhere if you want to develop one generic handler

BpmnParse could work for us, but I to be honest, modifying BPMN resources on the fly during deployment sounds very invasive,

Actually the Process Engine Plugins in Camunda 7 also simply use BpmnParse - just hooked into a different place. So I don’t consider this a bad practice.

However I understand the requirement, especially if you need to support multiple deployment possibilities - and I will raise this internally.

And just because I stumbled upon it anyway - these are the events that are planned to be supported in 8.7:

We will continue to use the C7 event names: create, assignment, update, cancel, and complete.

Does that help @JohnArray ?

2 Likes

Yes, but you could use the same jobType everywhere if you want to develop one generic handler

That’s the way we are proceeding right now.

these are the events that are planned to be supported in 8.7

yes, if these events would work in similar way as jobType workers configured with userTask type, then it would be perfect :slight_smile:

Thanks!

Thanks!

1 Like