Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for numeric input #12142

Closed
markfarkas-camunda opened this issue Mar 27, 2023 · 7 comments
Closed

Support for numeric input #12142

markfarkas-camunda opened this issue Mar 27, 2023 · 7 comments
Assignees
Labels
blocker/info Marks an issue as blocked, awaiting more information from the author kind/feature Categorizes an issue or PR as a feature, i.e. new behavior

Comments

@markfarkas-camunda
Copy link

Is your feature request related to a problem? Please describe.
In some cases a numeric type input would be necessary.

For example: I would like to create a template based on the http-json (rest) connector, to call an API, but that API might only accept numeric values for certain properties in the body of the request.

Describe the solution you'd like
It would be awesome if I could define an input field with "type": "Number" instead of "type": "String".

Describe alternatives you've considered
An alternative solution can be to convert the value from string to number with the number() function first, and then use this in the body of the request. In my opinion this is very inconvenient though.

@markfarkas-camunda markfarkas-camunda added the kind/feature Categorizes an issue or PR as a feature, i.e. new behavior label Mar 27, 2023
@korthout korthout self-assigned this Mar 29, 2023
@korthout korthout added the blocker/info Marks an issue as blocked, awaiting more information from the author label Mar 29, 2023
@korthout
Copy link
Member

korthout commented Mar 29, 2023

Hi @markfarkas-camunda 👋 I don't fully understand your request.

It would be awesome if I could define an input field with "type": "Number" instead of "type": "String".

Input mappings can evaluate to any of the supported types, not just strings. Why would you need to define a type?

Can you please clarify, what you're trying to achieve, and what the missing functionality in Zeebe is? Perhaps you can add an example process to show your case.

@markfarkas-camunda
Copy link
Author

Hi @korthout ,
As far as I know I cannot specify "type": "Number" in the element template, and therefore when I am using the Connectors SDK to get variables, they are always a type of String. Same situation with Boolean values. You could argue that I can transform these values in the connector backend code, but that's not possible if we reuse an existing connector, e.g. the rest connector. There might be certain API calls which expect a request body with specific types. Consider the following body:

{
  "propertyName1": "value",
  "numericPropertyName": 3,
  "booleanPropertyName": true
}

In this case the value of "numericPropertyName" would be a string representation of the number 3 that might not be a valid request body.

On top of the type issue, a number or a boolean (checkbox) input would be more convenient on the front-end as it would automatically validate the input data.

@korthout
Copy link
Member

korthout commented Apr 4, 2023

I see, thanks for clarifying @markfarkas-camunda. I may be wrong, but it sounds to me that this is a feature request for element templates or for the Web/Desktop Modelers: being able to specify the type of an input-mapping.

@nikku Can you guide us where (in which repo) to make this feature request?

@nikku
Copy link
Member

nikku commented Apr 4, 2023

@markfarkas-camunda Let's handle this as a element template feature request, until we know better.

Could you re-open this in the Desktop Modeler? As you move over, please attach a concrete use-case / connector template that we can reproduce your request with. If there is any issues that require actual execution support, we'd be able to open issues on the execution side of things as a follow up.

@korthout
Copy link
Member

korthout commented Apr 4, 2023

Thanks @nikku - I'm closing this for now.

@korthout korthout closed this as not planned Won't fix, can't repro, duplicate, stale Apr 4, 2023
@nikku
Copy link
Member

nikku commented May 17, 2023

@markfarkas-camunda Did you re-open this in the Desktop Modeler as suggested? We'd want to approach this from the modeling site of things, but it appears as this issue is stalled.

@markfarkas-camunda
Copy link
Author

@nikku thanks for noticing, I overlooked it, but created the issue now: camunda/camunda-modeler#3622

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker/info Marks an issue as blocked, awaiting more information from the author kind/feature Categorizes an issue or PR as a feature, i.e. new behavior
Projects
None yet
Development

No branches or pull requests

3 participants