This discussion is archived
3 Replies Latest reply: Jul 11, 2013 3:27 AM by DarkoIVANCAN RSS

How to provide inferred relationship as an input in the SOAP UI request.

SnehalS Newbie
Currently Being Moderated

In a single OPA project, I have two separate requests.

 

Request 1: All the base INPUTS are provided and an inferred relation is an OUTPUT of the request. The outputs of this request (attributes as well as relationships) is stored in the database. So that it can be retrieved and be used as an Input in some other request.

Request 2: The inferred relation from Request 1 is retrieved from the database and is provided as INPUT and then the respective OUTPUTS should be derived.

 

But when I try hitting the Request 2 (which uses INFERRED RELATIONSHIP as input) it throws me an Error saying "Inferred relationship cannot be set by the user".

 

Is there any possible way where we can use the inferred relationship as an input in the request?

 

Thanks

Snehal

  • 1. Re: How to provide inferred relationship as an input in the SOAP UI request.
    DarkoIVANCAN Newbie
    Currently Being Moderated

    Hi Snehal,

     

    An Inferred Relationship can not be provided by a user or as an input.

     

    Why don't you provide it as an "normal" relationship?

     

    Request 1: INPUT -> "the inferred relationship"

    Request 2: "the previously inferred relationship" -> OUTPUT

     

    This would require both restructuring the data from Request 1's output to Request 2's input

    and adapt the rulebase.

     

    Hope this helps,

    Darko

  • 2. Re: How to provide inferred relationship as an input in the SOAP UI request.
    SnehalS Newbie
    Currently Being Moderated

    Hi Darko,

     

    Thanks for the reply.

     

    I have a couple of questions for you:

    1. When you say "the previously inferred relationship" do you mean that all the base inputs (same as request 1) should be provided so that we have the inferred relation derived in request 2 as well?

    If not, can you please elaborate on the point?

     

    2. What kind of restructuring would be required in the request? (I guess this question should get answered once the above one is clear).

  • 3. Re: How to provide inferred relationship as an input in the SOAP UI request.
    DarkoIVANCAN Newbie
    Currently Being Moderated

    Hi SnehalS,

     

    Two approaches:

    1. If you keep your inferred relationship in Request 2 you should also provide the input data; which is what you apparently want to avoid.

     

    2. What I mean is probably best explained in the following example:

    Request 1:

    INPUT: 5 Persons (the person) with their age (the person's age), in global via the relationship "the person's"

    the rulebase identifies the children (age < 18) and adds them to the inferred relationship in global (the identified children)

    OUTPUT: the inferred relationship (the children), and all other output data

     

    Change the Request to use "the children" instead of "the identified children"

     

    Request 2: n Persons (the person) with their age (the person's age) in global via the relationship "the children"

    the rulebase does its determination

    OUTPUT: as defined for request 2

     

    Hope this Helps,

    Darko

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points