We have a requirement to select one processing rule for different values of an attribute. For example if the value in the attribute is “String 1” or “String 2” or “String 3” we need select same rule. We are using Extended criteria for this purpose but we dont have an option to specify an OR condition there. If we specify multiple extended criteria’s then TN is taking by default and AND condition. Is there any way to Specify an OR condition in extended criteria.
Thanks a prior.
There can be multiple ways to handle this. TN by default uses ‘AND’ for attributes, even for Transaction Analysis
One way is to have multiple processing rules with the attribute value being ‘String1’ and ‘String2’ and ‘String3’ with the same action
Another way would be handle this at the document level. If the document is a custom document (not standard), then you can define a custom attribute and extract that attribute using a IS service in transformation. By this way, you can have an attribute say ‘evaluateProcessingRule’ set to true or false based on the values 'String1|String2|Strinng3. This new attribute can be used in Processing rule for evaluation
Hope this helps
Thanks for the suggestion.
Currently we are using the first option i.e. multiple rules in TN for different values of the attribute. However, we would like to consolidate them if can.
The second option cannot be used beacuse the document is standrad and is being used by many partners. It would not be good to add custom attributes.
if your concern is to consolidate the processing rules, how about add another layer to call a service do to the filtering instead of specify the criteria in the processing rule?
if the criteria matched, the service will call another service for subsequent actions.
We can us this logic. However, we were looking for some thing configurable in TN itself so that we dont have change the code if some creteria is changed or a new criteria is added.
I just did a small sample. We can achieve this by invoking a custom service during the extraction of Attribute in Document Type section.
This custom service has input defined as values (string list), and output as newValues (string list).
Logic inside this service -
if values is string1 or string2,
So everytime if string1/string2 appears in input, the service will reset the attribute value to “STRING” by invoking the custom service…
Does that help your scenario? No additional processing rule required!