Dear Webmaker Support,
Could someone provide an overview, with a little more detail than that provided in the help documents, with respect to the Assign and Insert action specifications in Rulemaker, please?
In my case, I'd like to loop through a set of SQL results to check a value and set a flag for use in rule processing later in the same logic sheet. I've tried "assigning" and "inserting" values into a node in the XML output, but the logs are showing that the action is not taking place.
I've considered using variables, but, here, again, I am missing something with referencing the variables, because my desired processing is not occurring.
Any advice would be most helpful.
Thank you,
mike
Could someone provide an overview, with a little more detail than that provided in the help documents, with respect to the Assign and Insert action specifications in Rulemaker, please?
In my case, I'd like to loop through a set of SQL results to check a value and set a flag for use in rule processing later in the same logic sheet. I've tried "assigning" and "inserting" values into a node in the XML output, but the logs are showing that the action is not taking place.
I've considered using variables, but, here, again, I am missing something with referencing the variables, because my desired processing is not occurring.
Any advice would be most helpful.
Thank you,
mike
RE: Rulemaker Actions - Assign, Insert, factsheet and variables
If you are checking a value in each SQL record returned for a set then it is not clear why you would want to set a flag? A rule condition that checks for the value and then loops would achieve the same thing?
You will need a rule with a condition that is checking for the value you are interested in, with the loop setting to ensure it will match all the records with the value you are looking for.
Assign can only be used to set a value of an existing element or attribute.
Insert will place a 'chunk' of XML, but then you would need to perform Assign.
Possibly easiest is to use Insert Attribute against an element you are checking in the SQL record data. You can add an attribute called '...flag' with a value such as 'true'.
RE: Rulemaker Actions - Assign, Insert, factsheet and variables
Sure - I am looping through result set nodes to look for a value that may possibly occur as a result of a query. I want to use the occurrence of the value in the result set to satisfy conditions in additional rules further down in the controller.
I have declared a node(flag) under the Data element in the output document. I've tried copying existing node trees to the flag; I've tried to assign a string to the flag; I've tried inserting an xml fragment beneath the flag element. Nothing. The logs do not show that flag node even exists as an empty element in the document.
I feel like I am missing some little trick to get this to work as I had expected.
Thank you,
Mike
RE: Rulemaker Actions - Assign, Insert, factsheet and variables
From what you have said, you should be able to look for the value in the second set of rules diectly?
A possible problem from your description could be a namespace related matching issue, but it is difficult to be sure?
Are you able to attach screenshots of your rules and the log xml before and afterthe rules?
Steve. [hr][/hr]
Hi Mike,
From what you have said, you should be able to look for the value in the second set of rules diectly?
A possible problem from your description could be a namespace related matching issue, but it is difficult to be sure?
Are you able to attach screenshots of your rules and the log xml before and afterthe rules?
Steve.