Camunda REST - Retrieve Task Extension Properties

Hi.

I’m defined some extension properties on my tasks and I need to retrieve then using the Rest API. Which method should I use?

Hi @edgarberlinck,

There is no Rest API where you can retrieve the properties from.

You could implement your own Rest point where you can retrieve the properties from by using the camunda-bpmn-model-api 1.

What is the purpose of having such properties?

Cheers,
Roman

Hi @roman.smirnov

Because I want use to store some custom values to use on my application :frowning:

Yeah second this request, this will allow using general worker from C#. (via REST)

@jchonc @edgarberlinck how about something like this:

Look at the first example. Where you can have a Json file that you keep your config stored in. I find this be be much more clean

Thanks Stephen. I am a total newbie for camunda so please forgive me.

My question is more for GitHub - berndruecker/camunda-csharp-showcase: Showcase using Camunda BPM on .NET Platform with C# (no Java Coding required!), especially if I put in some more the extensionElements into a service task, like

<bpmn2:extensionElements>
        <camunda:field name="roleName">
          <camunda:string>xxyy</camunda:string>
        </camunda:field>
      </bpmn2:extensionElements>

Then how can I retrieve those values from the C# worker.

The goal is to have a generic worker to handle several notifications based upon the variable.
i.e. Notification for submitter, Notification for Nurse…

Thanks in advance.

You would have the worker get variables(process or local) or you could submit the values of the variables into the worker when you send the task to the worker.

Can you share some of your use case? And maybe a generic version of your process?

Thanks Stephen.

My simple test BPMN goes more or less like

(receive incident)->(a.notify submitter about reception)->(b. human task.)-> (c.notify submitter about resolution)->(end)

So both (a) and © are notifying the person who submit the file, but using different form letters. Thus I was thinking about using the same worker and just have 1 parameter to indicate which form letter to populate and send. Does that make any sense?

Thanks again and have a good weekend.

So to simplify. How about you build a web microservice (in c#?) that sends emails/messages/texts/whatever. And then use a service task configured with camunda http-connector. You can then configure the HTTP call to whatever POST payload you need for the two different scenarios.

Here are two examples:

Thank you Stephen, yeah that’ll definitely work, however allow end-user BA to configure http-connector might be a bit dangerous… (I was planning to expose web modeler in application). Currently I am using your first approach, but parsing the BPMN/XML in my own code to retrieve those fields. That’s why I wish to access those values from REST…

Thank you for your help.

id exposing the http connectors are a concern you could use a message event to message another process or use the call activity task to start a subprocess which would be your message/alert tasks.