Creating defined sequence flows

Hi,

We have a system that works with .net and camunda 8. We keep our task, process and task action definitions in our own database.
We have a request like this, a user task and then an exclusive gateway come in the processes, then the user’s action is checked and the flow progresses according to this action, we define the actions that the user can take on our own screens, but our request is that these actions be recorded in the database according to the sequence flows belonging to the exclusive gateway in the modeler, for example, there are 2 sequence flows, approve and reject, these are defined automatically in the database. For this, we can use the “http://xxx:8081/v1/process-definitions/{{taskdefkey}}/xml” service, read the xml and create task actions accordingly. But the problem here is that we do not want an action to be defined more than once, for example, let our “approve” action be defined once, all the information belonging to it be entered (shortcode, description, actionresult etc.) and when adding a flow to the exclusive gateway, it should be added by selecting from these defined flow definitions, is there a method?

The advantage of this for us is that when a designer designs a process, “approve” or “reject” buttons will appear on our own frontend according to the sequence flows added after the user task. If he adds a sequence flow called “send for upper approval” at another time, he will not have to define it in a different place and another button called “send for upper approval” will appear on the frontend.
image