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

REST Connector: validation for URL not working in all cases #1382

Closed
MaxTru opened this issue Nov 7, 2023 · 7 comments
Closed

REST Connector: validation for URL not working in all cases #1382

MaxTru opened this issue Nov 7, 2023 · 7 comments
Labels
kind:bug Something isn't working

Comments

@MaxTru
Copy link
Contributor

MaxTru commented Nov 7, 2023

Describe the Bug

REST Connector: validation for URL not working in all cases

Steps to Reproduce

  1. Use the REST POST Connector
  2. Have the following FEEL statement for the URL:
"https://api.github.com/repos/camunda/product-hub/issues/" +
  string(epicIssueNumber) +
  "/comments"
  1. Deploy diagram => everything works
  2. See that Linting gives an error:
Bildschirmfoto 2023-11-07 um 11 10 38

Expected Behavior

Linting only highlights actual errors

Environment

SaaS as of 07.11. on a 8.3.x cluster

@MaxTru MaxTru added the kind:bug Something isn't working label Nov 7, 2023
@sbuettner
Copy link
Contributor

@MaxTru The multi-line input breaks the input validation check as we only test non-FEEL input. Its therefore an outcome of the missing multi-line support in the modeler FEEL syntax validation.

cc @nikku

@MaxTru
Copy link
Contributor Author

MaxTru commented Nov 17, 2023

Hi Simon,
I think there was an update on this, but I forgot :-) Can you please recommend what way I should best format this (I want to get rid of the errors in our diagram). Currently I have:

"https://api.github.com/repos/camunda/product-hub/issues/" +
  string(epicIssueNumber) +
  "/comments"

@sbuettner
Copy link
Contributor

Hey @MaxTru as this was merged camunda/feel-scala#701 we have to wait until zeebe is using the new FEEL engine. Hopefully in the next release in December. This will unblock this issue. For now you will have to either use the rest connector or convert the issue number to a string in a previous script task.

@CharlieBytesX
Copy link

Hi, what's the proper way to interpolate strings with process variables?

@CharlieBytesX
Copy link

CharlieBytesX commented Sep 30, 2024

Or append
Im using:
"http://host.docker.internal:3000/get_person_id_by_employee_cr_id/"+string(employee_cr_id)
and get
jakarta.validation.ValidationException: Found constraints violated while validating input:

  • Property: url: Validation failed.

@ev-codes
Copy link
Contributor

ev-codes commented Oct 1, 2024

Hi @CharlieBytesX !

Your FEEL expression looks ok to me.

Here's some troubleshooting steps:

  • Make sure the dynamic FEEL expression button (fx) next to the URL field is enabled. When enabled, the button should turn blue and an equals sign should appear next to the text field (see screenshot).
  • Make sure the employee_cr_id process variable is not null. If a null value is expected, you could try an expression like: "YOUR_URL" + (if employee_cr_id then string(employee_cr_id) else "")

Screenshot 2024-10-01 at 9 28 08 AM

@ev-codes
Copy link
Contributor

ev-codes commented Oct 1, 2024

I'm closing the issue because:

  • I can no longer reproduce the bug
  • I don't think @CharlieBytesX 's question is related to the original bug in this issue

We can re-open this issue later if needed 😄

@ev-codes ev-codes closed this as completed Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants