Generic REST AFX Connector - JsonPath Response Not Passed to Fulfillment Workflow

Hi everyone,

I'm looking for some guidance regarding a Generic REST AFX Connector configuration.

We have created a Generic REST AFX Connector called. The REST call executes successfully, and on the application server we can see that the API returns the expected JSON response:

{

"Success": true,

"ReasonCode": 0,

"ReasonText": "Success",

"Data": {

"UserName": "abcd_ef",

"Password": "xxxxxxx"

}

}

We are using JsonPath to extract the response values and pass them to a fulfillment workflow. However, although the response is returned successfully, none of the JsonPath values are being populated in the workflow.

We've verified that:

  • The REST call completes successfully.
  • The response in the server logs is valid JSON.
  • The fulfillment workflow executes, but the expected response values are empty.

Has anyone experienced a similar issue with the Generic REST AFX Connector? Are there any known limitations or special configuration requirements for extracting nested JSON objects (for example,

$.Data.UserName

) and passing them to workflow variables?

Any suggestions or troubleshooting tips would be greatly appreciated.


  • TimWillemstein2 (Customer)

    What are the variables you are calling from your workflow? As far as I'm aware you cannot call variable output parameters from AFX call directly into your workflow. This is only possible for an AFX command node, for the statuscode and one other attribute if I recall correctly.

     

    The way I'm solving this case is by querying the database where the JSON output is stored for that AFX request. After retrieving it you can do whatever you need from workflow level.

  • TimWillemstein2 (Customer)

    Ah yes those variables are only useable when you have an explicit AFX command node, not when you utilize the normal AFX Fulfillment handler node.

     

    I use something like this in my flow:

     

    SELECT JSON_VALUE(brief, '$.timeStamp' ) as timestamp_value,

     (SELECT state

     FROM t_av_change_request_details

     WHERE id='${jobUserData_ChangeRequestItem.ItemId}'

     ) as state

    FROM

     (SELECT MAX(hist.id) as history_id

     FROM t_av_afx_request req

     INNER JOIN t_av_afx_request_history hist

     ON hist.request_id   =req.id

     WHERE req.change_item_id='${jobUserData_ChangeRequestItem.ItemId}'

     ) sub,

     t_av_afx_request_history hist

    WHERE id=sub.history_id

     

    With my brief response being super greedy:

    image.png 

    This way I capture everything that is being returned and I can parse it with JSON_VALUE functionality from PLSQL.

    Expand Post