I'm working on an API flow that, depending on the request payload, will take different branches and execute different API's. This is what I have so far:
I'm starting with the single branch for proof of concept but will eventually have three in total. I have the following set as a decision parameter:
${input.request}.request.updateMode
And this condition:
if ($.testme === 'add') 'True'
Where branch 1 should be executed if the condition is 'add'. If I test this from the 'Start' activity, the response is this:
{"result":""}
The schema for the request is the following:
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"request": {
"type": "object",
"properties": {
"companyNumber": {
"type": "integer"
},
"operatorInit": {
"type": "string"
},
"operatorPassword": {
"type": "string"
},
"updateMode": {
"type": "string"
},
"customerNumber": {
"type": "integer"
},
"shipTo": {
"type": "string"
},
"priceType": {
"type": "string"
},
"priceCd": {
"type": "integer"
}
},
"required": [
"companyNumber",
"operatorInit"
]
}
},
"required": ["request"]
}
Sample request:
{
"request": {
"companyNumber": 1,
"operatorInit": "ME",
"operatorPassword": "",
"updateMode": "add",
"customerNumber": 123,
"shipTo": "TEST",
"priceType": "PTYPE",
"priceCd": 2
}
}
It seems like once the payload moves past the decision activity it disappears. I have a test API flow with the same activities without the decision that works. My theory that the payload is lost is at least somewhat validated by hardcoding a decision parameter to force the payload to the 'True' branch. The result from that is this error:
Code is : 500 Error: "JQ Transform query expression exception. Message: com.infor.baas.apiflows.exception.ApiFlowRuntimeException: null (null) cannot be parsed as a number"
This is being thrown from the FormatReq_Chg JQ Transform. What would cause the payload to disappear once it passes through a decision activity?
Thank you!