Hi Tammo,

Thanks a lot for your time.
I realized the second issue later however was not able to find a good solution 
like you proposed.
Thanks for both the solutions.
I will try.

Regards,
Jitendra

-----Original Message-----
From: Tammo van Lessen [mailto:[email protected]] 
Sent: Tuesday, December 23, 2014 8:38 PM
To: user
Subject: Re: ForEach not working in ODE 1.3.6

Hi Jitendra,

haven't find any time until today. I just checked the XPath 1.0 case 
(TestForEachLooProcess), which seems to show a bug in ODE. The counter value is 
not properly casted to a number and as a string, the filtering does not seem to 
work as expected. As a workaround, you may use 
tns:args[number($Counter)]/tns:name in order to force an explicit cast of the 
object.

However, after doing that, you will get another selectionFailure because the 
target variable is only populated with one args element, however, if you have 
more than one args element in the source, the args element in the target with a 
number higher than 1 cannot be found. Thus, you will need to add such an 
element first. The standard way would be to use XSLT for such an array 
scenario, or one of ODE's XPath extensions (insert-before, insert-after), which 
are only available in XPath 2.0.

I hope to find the time to look into the other samples you attached.
Meanwhile I hope this answer helps to get over this problem.

Best,
  Tammo

On Thu, Dec 18, 2014 at 8:34 AM, Kharche, Jitendra < 
[email protected]> wrote:

> Hi Tammo,
>
> Did you get time to check this?
> Or can you point me to some reference material.
>
> Regards,
> Jitendra
>
> -----Original Message-----
> From: Kharche, Jitendra [mailto:[email protected]]
> Sent: Tuesday, December 09, 2014 11:42 AM
> To: user
> Subject: RE: ForEach not working in ODE 1.3.6
>
> Hi Tammo,
>
> Please find attached the process.
> I am using XPath 1.0.
> However, while I was looking for help on the following errors, I saw 
> some posts saying XPath2.0 resolves this issue. So I changed the 
> bpel:query lines in my process to use XPath 2.0 as follows.
>
> Original line:
> <bpel:query 
> queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
>
> Changed line:
> <bpel:query 
> queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0">
>
> But it did not help. I got the same errors.
>
> I tried writing a sample process using RepeatUntil and While. I got 
> same errors for these two.
> Attaching those sample processes too.
> However, I hope the solution will be same for all.
>
> Regards,
> Jitendra
>
>
>
> -----Original Message-----
> From: Tammo van Lessen [mailto:[email protected]]
> Sent: Monday, December 08, 2014 7:12 PM
> To: user
> Subject: Re: ForEach not working in ODE 1.3.6
>
> Hi Jitendra,
>
> thanks for reporting this. Could you please try to attach your sample 
> process so that we can try to reproduce the issue? Do you use XPath 
> 1.0 or 2.0?
>
> Thanks,
>   Tammo
>
> On Tue, Dec 2, 2014 at 12:16 PM, Kharche, Jitendra < 
> [email protected]> wrote:
>
> > Hi,
> >
> > I need to use ForEach loop  in my process. However it is not working 
> > correctly.
> > I am using ODE 1.3.6. Attaching the BPEL project for reference.
> >
> > I am getting following errors:
> >
> >
> >
> > 1.       If I do not use $ symbol before variable Counter I get following
> > error:
> >
> > 16:29:42,866 INFO  [ASSIGN] Assignment Fault: { 
> > http://docs.oasis-open.org/wsbpel/2.0/process/executable}selectionFa
> > il ure,lineNo=75,faultExplanation=No results for expression:
> > 'tns:args[Counter]/tns:name' against '<?xml version="1.0"
> > encoding="UTF-8"?> <sam:TestForEachLooProcessRequest xmlns:sam="
> > http://eclipse.org/bpel/sample"; xmlns:soapenv="
> > http://schemas.xmlsoap.org/soap/envelope/";>
> >
> >          <sam:args>
> >             <sam:name>arg1</sam:name>
> >             <sam:value>val1</sam:value>
> >          </sam:args>
> >          <sam:args>
> >             <sam:name>arg2</sam:name>
> >             <sam:value>val2</sam:value>
> >          </sam:args>
> >          <sam:args>
> >             <sam:name>arg3</sam:name>
> >             <sam:value>val3</sam:value>
> >          </sam:args>
> >       </sam:TestForEachLooProcessRequest>'
> > -------------------------------------------------------
> >
> >
> > 2.       If I use $Counter I get following error:
> >
> > 16:33:25,123 INFO  [ASSIGN] Assignment Fault: { 
> > http://docs.oasis-open.org/wsbpel/2.0/process/executable}selectionFa
> > il ure,lineNo=75,faultExplanation=Multiple
> > results for expression: 'tns:args[$Counter]/tns:name' against '<?xml 
> > version="1.0" encoding="UTF-8"?> <sam:TestForEachLooProcessRequest 
> > xmlns:sam="
> > http://eclipse.org/bpel/sample"; xmlns:soapenv="
> > http://schemas.xmlsoap.org/soap/envelope/";>
> >
> >          <sam:args>
> >             <sam:name>arg1</sam:name>
> >             <sam:value>val1</sam:value>
> >          </sam:args>
> >          <sam:args>
> >             <sam:name>arg2</sam:name>
> >             <sam:value>val2</sam:value>
> >          </sam:args>
> >          <sam:args>
> >             <sam:name>arg3</sam:name>
> >             <sam:value>val3</sam:value>
> >          </sam:args>
> >       </sam:TestForEachLooProcessRequest>'
> >
> > What am I missing?
> > Or this is a bug in ODE.
> >
> > Regards,
> > Jitendra
> >
> >
>
>
> --
> Tammo van Lessen - http://www.taval.de
>



--
Tammo van Lessen - http://www.taval.de

Reply via email to