I’ve added to the Start event two properties in the “Properties panel” Extensions tab.
I’ve added an ExecutionListener. I’ve looked through all attributes of the (Delegateexecution) execution, but I cannot find the properties I’ve added. I can see the other predefined properties on the other tabs like Id, Name, documentation…
Is there a way to retrieve these properties programatically?
We are trying to add custom variables to each task / activity in the process / case. We would like to retrieve these variables in a separate system using a REST API directly.
I am trying to set a custom property for each task that is open with a user. I am able to retrieve all the standard properties for a task using REST API, however, the need is that I create a custom variable and retrieve that.
I have looked at the option of using process variables. However, these will flow through the entire process. This particular property will change on a task by task basis.
The major problem with process variables is that there might be multiple open tasks / activities for a BPM / CMMN at a particular time. The process variable will be able to hold only 1 value.
We need our solution to work with tasks / activities for both BPM / CMMN.
Kindly share an example of creating custom “Local Variables” ?
I was trying to add a “Property” using “Extensions” for a task in a BPM process. Is it the same as your advice ?
We need to use custom forms when tasks are referred to by external system. So, we need to store something like an “externalFormId” per task.
I just noticed that there are no “Extensions” or “Add Property” for tasks / activities in CMMN.
We need this solution to work similarly for both BPM processes, and CMMN.
How can I create custom variable for each task, and access it using REST API ?
Yes, I did explore the formKey field.
I can store an external Id there which the other system can fetch through REST API.
But IMHO, that limits any future capability where we would like to use “embedded forms” when accessing the same flow withing Camunda. Is there a way that I can use embedded forms, along with passing a custom Id to an external system using formKey ?
I am new to Camunda. Kindly correct me if I am wrong in my understanding.
Interesting use case. Have you thought about just storing a mapping between the formkeys and the external system forms. Could even use camunda dmn for this.
The formId that we need to store is very specific to an external system. So, the same needs to be returned to the calling system one way or the other.
Yes, I explored using DMN table as a mapping table. However, I guess that would need 2 API calls.
One on the task, and then a second API call on the DMN to get the corresponding externalFormId.
Ideally, we would like to achieve it in a single REST API call.
Kindly advise if my understanding of Camunda system is correct.
The external system is managed by a separate team.
I would still like to retain some level of control in the long term
Nevertheless, I did try with Extensions and Process Properties as well.
However, one, they are not accessible in the API.
Also, that is not an option with CMMN
Multiple tasks in a process or case complicates it even further.
I think we should consider giving it as an option where the user might want to have custom properties defined at any level (tasks / activities / BPM process / CMMN case, etc.)
Many thanks for your inputs Stephen and Philipp.
Let me try some workarounds if there is no straight jacket way to handle this !
@nitin you could create some middleware to do the double API call / logic between camunda and the external system. You could deploy this on the same camunda server as a JAX-RS or just build as some sort of microservice.
This seems like a good idea, Stephen. Thanks for the tip !
I’ll continue my research into all the workarounds, and let’s see what’s the best that I can come up with.
Building and deploying a middleware to handle this scenario could take a while. I am under pressure at the moment to deliver a workable solution quickly.
Many Thanks for all your inputs Stephen.
Appreciate the time that you’ve put in for this discussion!