Layer7 API Management

 View Only
  • 1.  Running Assertion for each item

    Posted Aug 10, 2019 12:31 PM
    Hello All, 

    I am trying to run assertion for each item but it fails unexpectedly.

    While searching for i.current value as paper on line 7, it fails.
    I was expecting that if it doesn't find paper, it should move on to the next value book and search it.

    Can you please suggest.



  • 2.  RE: Running Assertion for each item

    Posted Aug 11, 2019 01:00 AM
    At line number 7..if look up is failed what should it do ..it does fail the each assertion too..for that make use of at least one assertion block inside add two all assertion blocks..one block is for look up and other is for continue processing..if you face any other problem s make use of service debugger..it gives you run time execution to sort out your problem..


  • 3.  RE: Running Assertion for each item
    Best Answer

    Posted Aug 12, 2019 12:05 PM
    Edited by Christopher Hackett Aug 20, 2019 05:08 PM
    Hi.

    The Run Assertions For Each Item assertion has the same behavior of "All assertions must evaluate to true".
    If you want the loop to continue when the assertion fails, you need do implement the "At least one..."


    https://docops.ca.com/ca-api-gateway/9-4/en/policy-assertions/assertion-palette/policy-logic-assertions/run-assertions-for-each-item-assertion

    ------------------------------
    Sr. Consultant Services
    HCL Enterprise Studio
    ------------------------------