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 (7)
  • 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
  • Accepted Answer

    Wednesday, July 18 2018, 09:05 AM - #Permalink
    0
    Hi

    Still having issues with this one! On my second calculation step I am trying to write the ''success'' value to my validation results but it doesn't appear to be doing anything.

    I can get the results XML but anything after that doesn't seem to work. See attached screenshot.

    Am I missing something obvious here?

    Thanks
    David
    Attachments:
    • Brian Amos
      more than a month ago
      David,

      When you defined your ValidationResults variable in the Working Data area did you create it as a boolean or is it still the default value of string? When I tried this I created mine as boolean.
    The reply is currently minimized Show
  • Accepted Answer

    Monday, July 30 2018, 05:01 AM - #Permalink
    0
    Brian

    I have tried it with both string and boolean. The message I get on the second calculate step is confusing me.

    Value copied to the target of Calculate2 step:
    <?xml version="1.0" encoding="UTF-8"?>
    <tns:Success xmlns:tns="uri:sbm"/>
    [com.serena.ode.log.cl.CommonLogger]


    Its seems that it is successfully copying the value to my validation results field but each time I run it I get the result
    The following condition is triggered at IsValid step:  No condition.[com.serena.ode.log.cl.CommonLogger]


    Is there a way I can see exactly what is being copied to the validation results field? Should I use another calculate step to copy it to a string and then to the boolean?

    Thanks
    The reply is currently minimized Show
Your Reply

Recent Tweets

RT @TrainingsEdu: Potřebujete získat znalosti o produktu Micro Focus UCMDB, porozumět základním pojmům a aplikacím? Na kurzu Universal CMDB…

by Micro Focus Support