Tony Okusanya Respected Contributor.
Respected Contributor.
1652 views

Looping/Iteration issue using XPath Evaluator or XML Element Filter

Jump to solution

Greetings members

          I have ran into an issue with these two operations

XML Element Filter

XPath Evaluator

When I try to use either of these in a Loop to iterate over values retrieved from an xml file I have noticed that they

only allow you to loop once. When the OP indicates it has no more items to process, if the input is changed it will start the loop over again but giving results based on the previous run through the loop.(hope this makes sense )

Essentially the input is stuck to whatever you set it to to begin with.

I dont have this issue with the list iterator

I have had to use the list iterator and the XML Get Element value as a work arround

 

Any one else noticed this ? bug or by design?

Labels (1)
0 Likes
1 Solution

Accepted Solutions
Absent Member.. KrisMusard Absent Member..
Absent Member..

Re: Looping/Iteration issue using XPath Evaluator or XML Element Filter

Jump to solution

From the Content Pack 8 Release notes:

 

Title: The Library/Utility Operations/XML Processing/XPath Evaluator operation returns
inconsistent results when iterated in a flow (QCCR1D144023)

 

Description: When looping over XPath Evaluator in the same step, the same results are returned
although the xml input is different.

 

Fix: The XPath Evaluator operation functionality has been updated to fix the issue.This fix is
available only if you apply CP8 on top of OO 9.04 release.

0 Likes
4 Replies
Absent Member.. ntt00015 Absent Member..
Absent Member..

Re: Looping/Iteration issue using XPath Evaluator or XML Element Filter

Jump to solution

Hi,

 

If  I do not misunderstand you, you are trying to use XML operation in a Loop operation. I ve noticed that issue before and opened a case about it. It is a bug. We are waiting a permanent fix in the new release.

 

My workaround is,  gather the operations in the loop in a subflow and, call this subflow in the loop. It will solve the problem. 

 

 

Best Regards. 

0 Likes
Tony Okusanya Respected Contributor.
Respected Contributor.

Re: Looping/Iteration issue using XPath Evaluator or XML Element Filter

Jump to solution

Thanks I have had to adapt that work arround you suggested

I look forward to HP's fix

0 Likes
g-mitchell Absent Member.
Absent Member.

Re: Looping/Iteration issue using XPath Evaluator or XML Element Filter

Jump to solution

Hi - I have the exact same issue. When you wish to iterate through several returned values, the first hit is returned many times. On my XML sample, this XPATH  should return three different data sets. /Netcool/Server[@name="${server}"] however, it returns the same one three times. Been at this a few days, now. Is this a bug ? Shame - this is a very  powerful tool, IF it worked !

 

BTW What was the workaround ? 

0 Likes
Absent Member.. KrisMusard Absent Member..
Absent Member..

Re: Looping/Iteration issue using XPath Evaluator or XML Element Filter

Jump to solution

From the Content Pack 8 Release notes:

 

Title: The Library/Utility Operations/XML Processing/XPath Evaluator operation returns
inconsistent results when iterated in a flow (QCCR1D144023)

 

Description: When looping over XPath Evaluator in the same step, the same results are returned
although the xml input is different.

 

Fix: The XPath Evaluator operation functionality has been updated to fix the issue.This fix is
available only if you apply CP8 on top of OO 9.04 release.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.