API FLOW DECISION NOT WORK

rafael_falco
rafael_falco Member, Infor Partner Posts: 7

Hi guys. I'm trying differents way to use the API FLOW Decision, but it's not working. The flow always goes through the default branch. Can you help me?

Answers

  • rafael_falco
    rafael_falco Member, Infor Partner Posts: 7

    I have tried this also if($.drop == 'BRANCH1') 'BRANCH1' ; 'BRANCH2'

  • Brandon Watson
    Brandon Watson Member, Infor Partner Posts: 25

    Here is an example of a Branch that I have used, maybe this will help point you in the right direction. I think you are close with your last comment, just need to leave out the BRANCH2 part maybe.

  • rafael_falco
    rafael_falco Member, Infor Partner Posts: 7

    Tks for your quick response. Maybe a bug with method Get, parameter Type "Query", "input" value not working?

  • rafael_falco
    rafael_falco Member, Infor Partner Posts: 7

    AND If I change the branch I can verify that the Decision Properties Conditrions is not working with the input values…

  • rafael_falco
    rafael_falco Member, Infor Partner Posts: 7

    Hi https://community.developer.infor.com/profile/Brandon%20Watson … just a feedback. The "decision" worked when I run tests via API Gateway -> INFOR API Flows, but testing within the flow does not work. After the "decision" other adjustments I made also stopped working only in the internal test, but they work via API Gateway. I also noticed that the response no longer returned a "JSON" object and now returns a string. Funny isn't it?

  • rafael_falco
    rafael_falco Member, Infor Partner Posts: 7
    edited October 10

    Another problem I had is that it always returns the first "output" that has a value. In this case I want to return the second transformation, JQTransformFilters.output or JQTransformFilters_1.output, so an alternativa I found was put "SetVariable" with value "${JQTransformFilters.output}"… and finally I will create new transformation to return "variable1" or "variable2"…

  • Brandon Watson
    Brandon Watson Member, Infor Partner Posts: 25

    That is very interesting. I think I had similar issues with API Test not working, but working from swagger and Postman. Do you have this issue resolved then?

  • rafael_falco
    rafael_falco Member, Infor Partner Posts: 7

    Hi… Yes, this issue was resolved. The expression only with the paremeter $.dprop was working in the beginning, but only from external tests… tks.

  • Brandon Watson
    Brandon Watson Member, Infor Partner Posts: 25

    I am not quite understanding what you are saying here. Do you need JQTransform1 to return 1 value from the Estoque_1 call?