camunda / camunda-bpm-platform

Flexible framework for workflow and decision automation with BPMN and DMN. Integration with Quarkus, Spring, Spring Boot, CDI.
https://camunda.com/
Apache License 2.0
4.13k stars 1.56k forks source link

Getting enum values and constraints from user tasks in REST API #2256

Open ThorbenLindhauer opened 5 years ago

ThorbenLindhauer commented 5 years ago

This issue was imported from JIRA:

Field Value
JIRA Link CAM-10949
Reporter j25xJJj
What is this name? This pseudonym name was generated based on the user name in JIRA to protect the personal data of our JIRA users. You can use this identifier to search for issues by the same reporter.
Has restricted visibility comments false

AT:


Original description:

This request is based on forum topic 10714 but also 3057 and 347. Unfortunately provided solutions in this topics are not at all satisfactory.

I understand Camunda has lots of functionality when running as an embedded engine in another application or when Camunda web interface is used as the interface for the users. But I think all functionality should also be available from REST API if you want to build you own interface. This means you should be able to retrieve ‘all relevant information’ from entities in a structured way (JSON obviously) to build your own user interface or logic.

We intend to run Camunda in it’s own load balanced server environment as a micro service. This means we need to interact with it over REST from other applications in our architecture. But unfortunately when we retrieve the form variables from a user task, we don’t get the possible enum values, constraints and properties, which we need to build our own form fields in our interface. Currently, we only get:

{ “monthlyExpenses”: { “type”: “Long”, “value”: null, “valueInfo”: {} }, “monthsOfBuffer”: { “type”: “Long”, “value”: null, “valueInfo”: {} },

(It looks like this is more based on the current values of variables, not so much on the variables themselves.)

Where is (for example) the element “enumValues” and “constraints” of the form variables?

In topic 347 rubenjgarcia does provide some work around code to get the enum vales out of the forms from the process definition XML dump. But this is, in our opinion, just a work around. The REST API should provide this.

So the question is: can one of the Camunda developers add this to the product development backlog?

Thanks!

Links:

ThorbenLindhauer commented 5 years ago

This comment was imported from JIRA and written by user @koevskinikola


Links to the referred forum topics:

Related Camunda docs:

ThorbenLindhauer commented 5 years ago

This comment was imported from JIRA and written by user @koevskinikola


Hi jwrO5rv,

Thank you for the detailed description.

Can you also explain why you classified the ticket as a bug? I would say that it is a feature request since the docs don't state that enum values and constraints should be provided through the Rest API.

Best, Nikola

ThorbenLindhauer commented 5 years ago

This comment was imported from JIRA and written by user j25xJJj

What is this name? This pseudonym name was generated based on the user name in JIRA to protect the personal data of our JIRA users. You can use this identifier to search for issues by the same reporter.


Hi,

You are absolutely right of course. I'm sorry,

Can you change it to a feature request? Or should I do it. if the latter, can you please tell me how I should do it?

Rogier

ThorbenLindhauer commented 5 years ago

This comment was imported from JIRA and written by user j25xJJj

What is this name? This pseudonym name was generated based on the user name in JIRA to protect the personal data of our JIRA users. You can use this identifier to search for issues by the same reporter.


Ok, that was pretty easy.. :-) I already changed it to feature request

ThorbenLindhauer commented 4 years ago

This comment was imported from JIRA and written by user moqW7vg

What is this name? This pseudonym name was generated based on the user name in JIRA to protect the personal data of our JIRA users. You can use this identifier to search for issues by the same reporter.


By "constraints", do you mean <camunda:validation> block I assume? What about camunda:properties and custom type fields in general (I am now sure about this one though)? Is it included in this feature request? If not, could it be included, please?

ThorbenLindhauer commented 4 years ago

This comment was imported from JIRA and written by user j25xJJj

What is this name? This pseudonym name was generated based on the user name in JIRA to protect the personal data of our JIRA users. You can use this identifier to search for issues by the same reporter.


My idea was indeed all form field information:

itself, with label, type All  when type = enum And on task-level:
ThorbenLindhauer commented 4 years ago

This comment was imported from JIRA and written by user @ThorbenLindhauer


Hello Rogier,

Thanks for raising this feature request. It would fit into the product, however we will not be able to schedule it for implementation due to other priorities. If you would like to contribute this feature, please let us know.

Best regards, Thorben

ThorbenLindhauer commented 2 years ago

This comment was imported from JIRA and written by user k4Yd0q

What is this name? This pseudonym name was generated based on the user name in JIRA to protect the personal data of our JIRA users. You can use this identifier to search for issues by the same reporter.


Would be nice if this gets added. Not being able to use enums when dealing with the Rest API is unfortunate.