-
Notifications
You must be signed in to change notification settings - Fork 489
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 and boolean input types #3622
Comments
Thanks for suggestion. Is this a blocker for the team? |
Not right now but we are creating connectors frequently, and we have to use workarounds if we face this. Therefore the sooner it is implemented the better from our and also from the customers' perspective. |
Thanks for insights. We will discuss it in the next iteration planning. |
FYI @christian-konrad. This is a medium sized issue and we did not prioritize it. |
@nikku Hey Nico, in the context of element template generation we would like to make use of |
We'll discuss this topic with the team again. |
An earlier investigation already revealed that building boolean bindings properly is likely not straight forward, cf. bpmn-io/bpmn-js-element-templates#39 and following. I added prior user feedback to this issue, asking for similar functionality. It is definitely unexpected that we don't support |
is there a way to prioritize it? |
This is in |
Unfortunately this is not true. In core (engine) all fields without In other places interpretation of the value is completely user defined ( In form-js things are easier, as we know which fields are numbers, and we interpret them as such. Element templates in contrast can bind to arbitrary properties. This is why it is particularily tricky to bind to everything that is not a string.
@markfarkas-camunda This is an interesting expectation. I presume you mean you don't want to convert when using an input mapping? Or do you refer to other things as well, i.e. |
I am aware of that, as described in the problem section. This is in context of the solution proposal of 2.2, where we would automagically add the |
We may know for input mappings. But what about other things such as additional configuration ( One example is webhook inbound (start) connector where there exists no input mappings, but tons of FEEL expressions (that may be fed by My suggestion is: Let us not do magic, but find a robust solution to handle that. This is reflected on an earlier comment of mine (bpmn-io/bpmn-js-element-templates#39 (comment)). |
I see, let's not do any magic then and rely on user input to decide how we handle the input. However, is our existing |
I feel the same 🙂. Maybe it is going to be a different property as well. My proposal is: Let's prototype something and see how it works. |
👍
I thought about this as well, but we cover 90% of the use-cases with the existing FEEL property already: if a feel expression is optional, we will not break it if we commit |
I investigated the reported problems and evaluated them. I also tried to assign priorities to the issues to figure out what needs to be fixed before the release:
|
@marstamm We agreed that we'd officially release this with the next release? If so, please milestone accordingly (M75). Otherwise let's close + assess which linked issues we can close in the process. |
Only major thing missing for an official release is https://github.com/bpmn-io/internal-docs/issues/919 documentation |
Closing as discussed. Will follow-up with documentation soon. |
Problem you would like to solve
It is impossible to define boolean or numeric input type in the element template.
This issue was first raised here: camunda/camunda#12142
This issue was also raised in the forum: https://forum.camunda.io/t/checkbox-in-a-camunda-8-connector-template/44610
Consider the following case: I would like to create a Stripe connector based on the rest prototype connector. For creating a charge, specifying the amount is mandatory. This has to be in integer format. See here
For this it would make sense to have an input type Number in the element template json file.
Format would look like this:
Supporting numeric inputs would also give the following advantages:
Also, adding a boolean type would have similar benefits. In the element template I could imagine something like this if we want to make it possible to get the right value for e.g.: the capture boolean property:
Supporting boolean inputs would also give the following advantages:
Having Boolean and Number type format would allow us to construct a body property in the element template which consist of different types of values. For example:
In this particular Stripe demo case:
Constructing the body in element template looks something like this below. Converting inputs to the proper format makes it even harder to read this long value. That's one reason supporting different format would be really helpful:
Proposed solution
Make it possible to define an input field with "type": "Number" and "type":"Boolean" instead of "type": "String".
Alternatives considered
An alternative solution can be to convert the value from string to number with the number() function first, and then use this instead, but this approach is very inconvenient and cumbersome.
Additional context
Related to #740
Related to #472
Related to #2739
Related to #1933
Related to bpmn-io/bpmn-js-element-templates#39
The text was updated successfully, but these errors were encountered: