0
Hi

I'm having some trouble using the 'Decision' step in a RestCaller_get orchestration. The orchestration calls out to an API that returns a value containing 'true' or 'false' (example below) in the resultXML.

Once the orchestration reaches the 'Decision' step I want to throw an error if it returns 'false'. I'm having trouble writing a rule that will guide the call down the correct decision branch. I have a calculation step that puts the resultXML into a string field I created as working data which I then use in my rule (screenshot). I can get the orchestration to validate and deploy but when it runs I get the following message on the common log "The following condition is triggered at IsValid step: No condition."

Example Code
Value copied to the target of ResultXML step:
<?xml version="1.0" encoding="UTF-8"?>
<resultXML>
<JsonDoc>
<ErrorMessage>ICL 1 is not a hardware graphics changelist</ErrorMessage>
<Success>false</Success>
</JsonDoc>
</resultXML>
[com.serena.ode.log.cl.CommonLogger]


Example rule:
CONTAINS( BodyXMLVariableIn\ValidationResults\SUCCESS, 'true')


Does anyone have any advice for me? Do any of you use something similar in your process apps?

Thanks
Attachments:
Responses (5)
  • Accepted Answer

    Wednesday, June 13 2018, 01:20 PM - #Permalink
    0
    David not sure if this link will help but you can open this app and see a real simple example of how the data mapping should work.

    Using your example I mapped my data like this image and was able to get my fault to happen.
    Attachments:
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, June 14 2018, 05:54 AM - #Permalink
    0
    Hi

    Thanks for the info that is helpful. Can I ask what you are using the two calculate steps for in your example?
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, June 14 2018, 09:54 AM - #Permalink
    0
    The first is this assignment

    BodyXMLVariableIn

    RESTCaller_get\getResponse\results\resultXML

    This is the second so I can use it in the decision

    ValidationResults

    BodyXMLVariableIn\JsonDoc\Success
    The reply is currently minimized Show
  • Accepted Answer

    Friday, June 15 2018, 04:50 AM - #Permalink
    0
    Still having issues with the decision rule. What rule are you using to throw an error?

    Thanks:)
    The reply is currently minimized Show
  • Accepted Answer

    Friday, June 15 2018, 12:16 PM - #Permalink
    0
    My ValidationResults is setup as a boolean instead of a string so this is my branch.
    Attachments:
    The reply is currently minimized Show
Your Reply