How to interrogate a type "Reaction Tree"

I've created an expression rule to call a!startProcess(). When I run an adhoc test on it the output Type is "Reaction Tree" and Value is "Smart Service". Can someone explain how I interrogate the output as I want to be able to check the values in statusCode, response and responseMessage.


The expression rule

with(

a!startProcess(
processModel: cons!MONITORING_RESPONSE_WEBAPI,
processParameters: {
businessKey: "Test",
demandName: "Increment",
endDateTime: now(),
processRegistryId: 0,
serviceMonitorId: generateUUID(),
startDateTime: now(),
transactionUUID: generateUUID(),
userid: "Demand API",
webAPIName: "createDemandAPI"
},
onSuccess: a!httpResponse(
statusCode: 200,
headers: {
a!httpHeader(name: "Content-Type", value: "application/json")
},
body: a!toJson(
...

OriginalPostID-272911

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer
    @steveb if you want to extract process variable(PVs) values from the Process then you can get it from the Reaction tree as below:

    fv!processInfo.pv.yourProcessVariable

    But try doing this in the expression rule so that will be returned to WEB-API, instead of doing directly in WEB-API because when i did this in WEB-API last time, i got the error but while doing the same in Expression rule, was just fine.

    Again i am not sure whether you looking for getting the Process Variables values only, or something else,

    Please let me know if you are looking for something else to get from this process in WEB-API instead on PVs
Reply
  • 0
    Certified Lead Developer
    @steveb if you want to extract process variable(PVs) values from the Process then you can get it from the Reaction tree as below:

    fv!processInfo.pv.yourProcessVariable

    But try doing this in the expression rule so that will be returned to WEB-API, instead of doing directly in WEB-API because when i did this in WEB-API last time, i got the error but while doing the same in Expression rule, was just fine.

    Again i am not sure whether you looking for getting the Process Variables values only, or something else,

    Please let me know if you are looking for something else to get from this process in WEB-API instead on PVs
Children
No Data