Hi All, I have a expression that inturn calls a query rule which accepts a

Hi All,
I have a expression that inturn calls a query rule which accepts a attributeType as input and outputs the results. I need to fetch data for 4 types of attributes and each needs to saved in an seperate variable. The expression definition is encapsulated in load(). So when i want to do this from a script task, i need to take 4 ACPs and provide expression to each of them, and a different attributeType for each of them them and collect them into PVs. But i observed that the results retrieved from the expression of first ACP is stored into all the PVs. Till this point of time i thought that usage of load()/ with() apart from tempo doesn't have any significance in terms of execution. Is this the desired behavior? If so could anyone please justify this behavior?

TIA, ...

OriginalPostID-93512

OriginalPostID-93512

  Discussion posts and replies are publicly visible

  • can you post your code if possible? It'd be useful to understand what you're trying to achieve. Along with the code, also paste a sample output of what you expect.
  • Hi satya.srinivasan,
    I have a expression rule!fetchValuesFromType() which inturn calls a query rule rule!getValuesFromType() which returns various values based on type.
    On a scripttask, i have four acps which are configured in the following order:
    rule!fetchValuesFromType("Vegetables")
    rule!fetchValuesFromType("Fruits")
    rule!fetchValuesFromType("Chocolates")
    rule!fetchValuesFromType("Cookies")
    and I am collecting them in outputs into four seperate PVs. But everytime i am seeing the result rule!fetchValuesFromType("Vegetables") into all the PVs or the value of acp which is configured at top level.
    NB: Definition of rule!fetchValuesFromType() is encapsulated in load()
  • Hi,
    I am still not clear about what you're trying to achieve here. But let me give you some pointers.
    The sequence of execution on the data->output is not guaranteed. Which means any of the above said script task can execute in any order.
    Secondly, if you're saving them into 4 separate pv!, then make sure all those pv! are multiple.
    Next, make sure, by mistake, you are not saving the output of the above into one of the same. Which means you end up over-writing the expression.
    Finally, is your load() using any of the pv! where the above expressions are saving data into? Check this.
    Hope this helps to get you in the right track.