API FLOW DECISION NOT WORK

rafael_falco
rafael_falco Member, Infor Partner Posts: 9

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?

Best Answer

  • rafael_falco
    rafael_falco Member, Infor Partner Posts: 9
    Answer ✓

    Hello, sorry for the delay. I needed it to return the last transformation from the JQ Transform component, just the JQTransformFilters or JQTransformFilters_1.However, it always returns the first JQTranform1 or JQTransform2 transformation. As the transformation was complex, I did it in two transformations. To get around this problem and continue using "Decision" I had to change it back to one JQTransform.

Answers

  • rafael_falco
    rafael_falco Member, Infor Partner Posts: 9

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

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

    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: 9

    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: 9

    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: 9

    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: 9
    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: 44

    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: 9

    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: 44

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