You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ode.apache.org by "Cwik, Jan" <Ja...@sabre-holdings.com> on 2007/09/04 11:45:48 UTC

RE: veryfing node existance

Hi Alex,

Did you have a time to take a look at my issue? Am I doing smth wrong or
this is a bug?

regards
jan 

-----Original Message-----
From: Cwik, Jan [mailto:Jan.Cwik@sabre-holdings.com] 
Sent: Monday, August 27, 2007 11:15 AM
To: user@ode.apache.org
Subject: RE: veryfing node existance

 
Hi,

Yes I checked and this matches the variable. I mean when I remove the if
statement the copying is performed successfully.

I am attaching the servicemix log file with ode DEBUGs turned on.
However, I am unable to find any information about processing the if
statements. The bpel:if processing shall be right after the copying of
Version (bpel snippet below).

            <bpel:copy>
 
<bpel:from>$TravelItineraryCreateRequest.body/xsd1:OTA_AirBookRQ/@Versio
n</bpel:from>
                <bpel:to>$OTA_AirBookRequest.body/@Version</bpel:to>
            </bpel:copy>

I'm also attaching the bpel script.

regards
jan

-----Original Message-----
From: Alex Boisvert [mailto:boisvert@intalio.com] 
Sent: Friday, August 24, 2007 5:17 PM
To: user@ode.apache.org
Subject: Re: veryfing node existance

Hi Jan,

My guess is your expression
"$TravelItineraryCreateRequest.body/xsd1:OTA_AirBookRQ/xsd1:AirItinerary
"
doesn't match your variable content.

Did you check that it matches what you expect?  e.g. by doing an
assignment
when the data is there.   If your message part is an element, a common
mistake is to put the top-level element name in the expression.  Have
you
tried "$TravelItineraryCreateRequest.body/xsd1:AirItinerary" ?

Set the "org.apache.ode" category to DEBUG and check the logs to see
what
kind of data is returned from this expression.

alex


On 8/24/07, Cwik, Jan <Ja...@sabre-holdings.com> wrote:
>
>
> Hi,
>
> Sorry for late response but I wasn't able to verify it earlier. I have
> used the ODE revision 569274. I removed <then> and tested both xpath's
> exists and boolean. Unfortunatelly it didn't work for me, i.e. the
copy
> activity wasn't performed.
>
> <bpel:if>
>
> <bpel:condition
>
expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">bool
>
ean($TravelItineraryCreateRequest.body/xsd1:OTA_AirBookRQ/xsd1:AirItiner
> ary)</bpel:condition>
>
>         <bpel:copy>
>
>
<bpel:from>$TravelItineraryCreateRequest.body/xsd1:OTA_AirBookRQ/xsd1:Ai
> rItinerary</bpel:from>
>
> <bpel:to>$OTA_AirBookRequest.body/xsd1:AirItinerary</bpel:to>
>         </bpel:copy>
>
> </bpel:if>
>
> regards
> jan
>
> -----Original Message-----
> From: Alex Boisvert [mailto:boisvert@intalio.com]
> Sent: Monday, August 20, 2007 11:26 PM
> To: user@ode.apache.org
> Subject: Re: veryfing node existance
>
> Hi Jan,
>
> The <then> element has been dropped in the final  in BPEL 2.0 (c.f.
> issue
> 237), so the syntax of the <if> statement should be:
>
> <bpel:if>
>     <bpel:condition> ... <bpel:condition>
>     activity
> </bpel:if>
>
> Looks like we need to update a few test cases that still use BPEL 2.0
> draft
> syntax, so thanks for bringing this up!
>
> cheers,
> alex
>
> On 8/20/07, Cwik, Jan <Ja...@sabre-holdings.com> wrote:
> >
> > Hi,
> >
> > I'm trying to do copying based on node existance. That is first I
want
> > to find out if
> >
>
"$TravelItineraryCreateRequest.body/xsd1:OTA_AirBookRQ/xsd1:AirItinerary
> > " query returns any value. Then I want to copy it into the
> > OTA_AirBookRequest. If I run it standalone (that is without bpel:if)
> it
> > works well. However, if I use bpel:if the copying is not performed.
> >
> > What am I doing wrong ? The following is the snippet that I tested.
I
> > tried with and without expressionLanguage, I tried also with and
> without
> > boolean, all combinations did not work.
> >
> > <bpel:if>
> >     <bpel:condition
> >
>
expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">bool
> >
>
ean($TravelItineraryCreateRequest.body/xsd1:OTA_AirBookRQ/xsd1:AirItiner
> > ary)</bpel:condition>
> >     <bpel:then>
> >         <bpel:sequence>
> >             <bpel:assign>
> >                 <bpel:copy>
> >
> >
>
<bpel:from>$TravelItineraryCreateRequest.body/xsd1:OTA_AirBookRQ/xsd1:Ai
> > rItinerary</bpel:from>
> >
> > <bpel:to>$OTA_AirBookRequest.body/xsd1:AirItinerary</bpel:to>
> >                 </bpel:copy>
> >             </bpel:assign>
> >         </bpel:sequence>
> >     </bpel:then>
> > </bpel:if>
> >
> > best regards
> > jan
> >
>

Re: veryfing node existance

Posted by Alex Boisvert <bo...@intalio.com>.
On 9/5/07, Matthieu Riou <ma...@offthelip.org> wrote:
>
> Btw there are 2 other things you might want to try following the rules of
> boolean evaluations in XPath 1.0 [1]
>
>    * Make sure that you don't send an empty node.
>    * Try to change your expression to $request.body/hello:hello/text() as
> I'm not sure that Xalan considers a node only containing a text node as
> non
> empty.
>    * Try by setting the XPath 2.0 expression language on your process.



Actually, an XPath expression such as "/foo/bar/baz" returns a (possibly
empty) node-set.  So the expression "boolean(/foo/bar/baz)" would return
true if the "baz" element exists (under /foo/bar) whether or not the node
itself is empty.   I validated this with both XPath 1.0 + 2.0 yesterday.

alex

Re: Bpel 2.0 samples?

Posted by Nicolas Grossi <ni...@gmail.com>.
Thanks a lot for your info, any further sample will be appreciated,

cheers
Nico

Matthieu Riou wrote:
> Hi Nicolas,
>
> There are a few samples [1] bundled with the ODE distribution and there's
> also our BPEL test case suite [2]. These aren't very elaborate but can give
> you a good syntax overview activity by activity. The webinars [3] produced
> by Oasis are also pretty good introductory material and use a few examples
> as illustration.
>
> Cheers,
> Matthieu
>
> [1] http://svn.apache.org/repos/asf/ode/trunk/distro/src/examples-war/
> [2]
> http://svn.apache.org/repos/asf/ode/trunk/bpel-test/src/test/resources/bpel/2.0/
> [3] http://ode.apache.org/ws-bpel-20.html
>
> On 9/6/07, Nicolas Grossi <ni...@gmail.com> wrote:
>   
>> People:
>>            I'm starting with BPEL 2.0 and I would like to search for any
>> .bpel sample that introduce me to this new specification, Does any body
>> of you have any samples that can share with me or let me know where can
>> I search for samples?
>>
>> Thanks in advance,
>>
>> cheers
>> Nico
>>
>>     
>
>   


Re: Bpel 2.0 samples?

Posted by Matthieu Riou <ma...@offthelip.org>.
Hi Nicolas,

There are a few samples [1] bundled with the ODE distribution and there's
also our BPEL test case suite [2]. These aren't very elaborate but can give
you a good syntax overview activity by activity. The webinars [3] produced
by Oasis are also pretty good introductory material and use a few examples
as illustration.

Cheers,
Matthieu

[1] http://svn.apache.org/repos/asf/ode/trunk/distro/src/examples-war/
[2]
http://svn.apache.org/repos/asf/ode/trunk/bpel-test/src/test/resources/bpel/2.0/
[3] http://ode.apache.org/ws-bpel-20.html

On 9/6/07, Nicolas Grossi <ni...@gmail.com> wrote:
>
> People:
>            I'm starting with BPEL 2.0 and I would like to search for any
> .bpel sample that introduce me to this new specification, Does any body
> of you have any samples that can share with me or let me know where can
> I search for samples?
>
> Thanks in advance,
>
> cheers
> Nico
>

RE: veryfing node existance

Posted by "Cwik, Jan" <Ja...@sabre-holdings.com>.
Hi,

Thanks! It works fine now. I have tested it both on original and
simplified project.

regards
jan 

-----Original Message-----
From: matthieu.riou@gmail.com [mailto:matthieu.riou@gmail.com] On Behalf
Of Matthieu Riou
Sent: Thursday, September 06, 2007 7:02 PM
To: user@ode.apache.org
Subject: Re: veryfing node existance

Hi Jan,

I had a look at the issue and it seems that there's a problem with your
process. The condition is apparently nested within the assign like this:

        <bpel:assign name="HelloRequestToResponseCopy-Assign">
          <bpel:if>
            .....
          </bpel:if>
        </bpel:assign>

Instead the assign should be inside the <if> like this:

        <bpel:if>

<bpel:condition>boolean($request.body/hello:hello)</bpel:condition>
             <bpel:assign name="HelloRequestToResponseCopy-Assign">
                     <bpel:copy>
                        <bpel:from>$request.body/hello:hello</bpel:from>
                        <bpel:to>$response.body/hello:hello</bpel:to>
                     </bpel:copy>
             </bpel:assign>
        </bpel:if>

This seems to work properly for me. It actually took me a while to
realize
what the problem was, I think I should have a stronger espresso in the
morning :) I also think we should add schema-level validation.

Cheers,
Matthieu

On 9/6/07, Cwik, Jan <Ja...@sabre-holdings.com> wrote:
>
> Thanks for the hint, finally I managed to attach the project, I also
> added the request that I'm sending to the engine.
>
> >   * Try by setting the XPath 2.0 expression language on your
process.
> I tried XPath 2.0 with ODE and it doesn't work either. I also verified
> the XPath 1.0 and 2.0 expressions on my request in the XML Spy. It
> worked fine. I mean when I removed <hello> node it returned false,
when
> node was present it returned true.
>
> >   * Make sure that you don't send an empty node.
> This is what I'm trying to find out, I need to verify if node is empty
> or not. The reason is that in the response from (original project) I
may
> expect <Success>, <Error> or <Warning> nodes. Based on their presence
I
> need to make some actions.
>
> regards
> jan
>
> -----Original Message-----
> From: matthieu.riou@gmail.com [mailto:matthieu.riou@gmail.com] On
Behalf
> Of Matthieu Riou
> Sent: Wednesday, September 05, 2007 5:59 PM
> To: user@ode.apache.org
> Subject: Re: veryfing node existance
>
> Btw there are 2 other things you might want to try following the rules
> of
> boolean evaluations in XPath 1.0 [1]
>
>    * Make sure that you don't send an empty node.
>    * Try to change your expression to $request.body/hello:hello/text()
> as
> I'm not sure that Xalan considers a node only containing a text node
as
> non
> empty.
>    * Try by setting the XPath 2.0 expression language on your process.
>
> Thanks,
> Matthieu
>
> [1] http://www.w3.org/TR/xpath#section-Boolean-Functions
>
> On 9/5/07, Matthieu Riou <ma...@offthelip.org> wrote:
> >
> > On 9/5/07, Cwik, Jan <Ja...@sabre-holdings.com> wrote:
> > >
> > > Hi,
> > >
> > > I have raised the jira for it. I have managed to reproduce it on a
> > > simpler example (modified loan-broker). However, I didn't find the
> way
> > > to attach files to the issue. How can I do that ?
> > >
> > > https://issues.apache.org/jira/browse/ODE-178
> >
> >
> > "Attach file", second operation in the left column. Could you also
> include
> > the message content you're sending to the engine?
> >
> > Thanks,
> > Matthieu
> >
> > regards
> > > jan
> > >
> > > -----Original Message-----
> > > From: Alex Boisvert [mailto: boisvert@intalio.com]
> > > Sent: Tuesday, September 04, 2007 9:24 PM
> > > To: user@ode.apache.org
> > > Subject: Re: veryfing node existance
> > >
> > > I just took another look at it and I think there's something
fishy,
> > > although
> > > I can't tell without having all files (.bpel, .wsdl, .xsd, ...).
> > >
> > > I created a simpler test case with <if> <condition> boolean( ...)
> > > </condition> </if> to verify that the basics work and the test
> passed.
> > > So
> > > there must be something different in your use-case that's tripping
> the
> > > engine.
> > >
> > > I'd be happy to investigate further if you can send a working JBI
> > > assembly
> > > and a sample input message.  Can you create a Jira for it?
> > >
> > > thanks,
> > > alex
> > >
> > > On 9/4/07, Cwik, Jan <Ja...@sabre-holdings.com> wrote:
> > > >
> > > > Hi Alex,
> > > >
> > > > Did you have a time to take a look at my issue? Am I doing smth
> wrong
> > > or
> > > > this is a bug?
> > > >
> > > > regards
> > > > jan
> > > >
> > > > -----Original Message-----
> > > > From: Cwik, Jan [mailto: Jan.Cwik@sabre-holdings.com]
> > > > Sent: Monday, August 27, 2007 11:15 AM
> > > > To: user@ode.apache.org
> > > > Subject: RE: veryfing node existance
> > > >
> > > >
> > > > Hi,
> > > >
> > > > Yes I checked and this matches the variable. I mean when I
remove
> the
> > > if
> > > > statement the copying is performed successfully.
> > > >
> > > > I am attaching the servicemix log file with ode DEBUGs turned
on.
> > > > However, I am unable to find any information about processing
the
> if
> > > > statements. The bpel:if processing shall be right after the
> copying of
> > > > Version (bpel snippet below).
> > > >
> > > >             <bpel:copy>
> > > >
> > > >
> > >
>
<bpel:from>$TravelItineraryCreateRequest.body/xsd1:OTA_AirBookRQ/@Versio
> > > > n</bpel:from>
> > > >
> <bpel:to>$OTA_AirBookRequest.body/@Version</bpel:to>
> > > >             </bpel:copy>
> > > >
> > > > I'm also attaching the bpel script.
> > > >
> > > > regards
> > > > jan
> > > >
> > > > -----Original Message-----
> > > > From: Alex Boisvert [mailto:boisvert@intalio.com ]
> > > > Sent: Friday, August 24, 2007 5:17 PM
> > > > To: user@ode.apache.org
> > > > Subject: Re: veryfing node existance
> > > >
> > > > Hi Jan,
> > > >
> > > > My guess is your expression
> > > >
> > >
>
"$TravelItineraryCreateRequest.body/xsd1:OTA_AirBookRQ/xsd1:AirItinerary
> > > > "
> > > > doesn't match your variable content.
> > > >
> > > > Did you check that it matches what you expect?  e.g . by doing
an
> > > > assignment
> > > > when the data is there.   If your message part is an element, a
> common
> > > > mistake is to put the top-level element name in the expression.
> Have
> > > > you
> > > > tried "$TravelItineraryCreateRequest.body/xsd1:AirItinerary" ?
> > > >
> > > > Set the "org.apache.ode" category to DEBUG and check the logs to
> see
> > > > what
> > > > kind of data is returned from this expression.
> > > >
> > > > alex
> > > >
> > > >
> > > > On 8/24/07, Cwik, Jan < Jan.Cwik@sabre-holdings.com> wrote:
> > > > >
> > > > >
> > > > > Hi,
> > > > >
> > > > > Sorry for late response but I wasn't able to verify it
earlier.
> I
> > > have
> > > > > used the ODE revision 569274. I removed <then> and tested both
> > > xpath's
> > > > > exists and boolean. Unfortunatelly it didn't work for me, i.e.
> the
> > > > copy
> > > > > activity wasn't performed.
> > > > >
> > > > > <bpel:if>
> > > > >
> > > > > <bpel:condition
> > > > >
> > > >
> > >
>
expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">bool
> > > > >
> > > >
> > >
>
ean($TravelItineraryCreateRequest.body/xsd1:OTA_AirBookRQ/xsd1:AirItiner
> > > > > ary)</bpel:condition>
> > > > >
> > > > >         <bpel:copy>
> > > > >
> > > > >
> > > >
> > >
>
<bpel:from>$TravelItineraryCreateRequest.body/xsd1:OTA_AirBookRQ/xsd1:Ai
> > >
> > > > > rItinerary</bpel:from>
> > > > >
> > > > > <bpel:to>$OTA_AirBookRequest.body/xsd1:AirItinerary</bpel:to>
> > > > >         </bpel:copy>
> > > > >
> > > > > </bpel:if>
> > > > >
> > > > > regards
> > > > > jan
> > > > >
> > > > > -----Original Message-----
> > > > > From: Alex Boisvert [mailto:boisvert@intalio.com]
> > > > > Sent: Monday, August 20, 2007 11:26 PM
> > > > > To: user@ode.apache.org
> > > > > Subject: Re: veryfing node existance
> > > > >
> > > > > Hi Jan,
> > > > >
> > > > > The <then> element has been dropped in the final  in BPEL 2.0
> (c.f.
> > > > > issue
> > > > > 237), so the syntax of the <if> statement should be:
> > > > >
> > > > > <bpel:if>
> > > > >     <bpel:condition> ... <bpel:condition>
> > > > >     activity
> > > > > </bpel:if>
> > > > >
> > > > > Looks like we need to update a few test cases that still use
> BPEL
> > > 2.0
> > > > > draft
> > > > > syntax, so thanks for bringing this up!
> > > > >
> > > > > cheers,
> > > > > alex
> > > > >
> > > > > On 8/20/07, Cwik, Jan <Ja...@sabre-holdings.com> wrote:
> > > > > >
> > > > > > Hi,
> > > > > >
> > > > > > I'm trying to do copying based on node existance. That is
> first I
> > > > want
> > > > > > to find out if
> > > > > >
> > > > >
> > > >
> > >
>
"$TravelItineraryCreateRequest.body/xsd1:OTA_AirBookRQ/xsd1:AirItinerary
> > > > > > " query returns any value. Then I want to copy it into the
> > > > > > OTA_AirBookRequest. If I run it standalone (that is without
> > > bpel:if)
> > > > > it
> > > > > > works well. However, if I use bpel:if the copying is not
> > > performed.
> > > > > >
> > > > > > What am I doing wrong ? The following is the snippet that I
> > > tested.
> > > > I
> > > > > > tried with and without expressionLanguage, I tried also with
> and
> > > > > without
> > > > > > boolean, all combinations did not work.
> > > > > >
> > > > > > <bpel:if>
> > > > > >     <bpel:condition
> > > > > >
> > > > >
> > > >
> > >
>
expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">bool
> > > > > >
> > > > >
> > > >
> > >
>
ean($TravelItineraryCreateRequest.body/xsd1:OTA_AirBookRQ/xsd1:AirItiner
> > >
> > > > > > ary)</bpel:condition>
> > > > > >     <bpel:then>
> > > > > >         <bpel:sequence>
> > > > > >             <bpel:assign>
> > > > > >                 <bpel:copy>
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
>
<bpel:from>$TravelItineraryCreateRequest.body/xsd1:OTA_AirBookRQ/xsd1:Ai
> > > > > > rItinerary</bpel:from>
> > > > > >
> > > > > >
<bpel:to>$OTA_AirBookRequest.body/xsd1:AirItinerary</bpel:to>
> > > > > >                 </bpel:copy>
> > > > > >             </bpel:assign>
> > > > > >         </bpel:sequence>
> > > > > >     </bpel:then>
> > > > > > </bpel:if>
> > > > > >
> > > > > > best regards
> > > > > > jan
> > > > > >
> > > > >
> > > >
> > >
> >
> >
>

Re: Bpel 2.0 samples?

Posted by Antoine Toulme <at...@intalio.com>.
Hi,
there is an example in the 5.1 paragraph of the BPEL 2.0
specification<http://docs.oasis-open.org/wsbpel/2.0/CS01/wsbpel-v2.0-CS01.html>
.

Might be a good idea to have more samples.

I hope this helps.

Antoine

On 9/6/07, Nicolas Grossi <ni...@gmail.com> wrote:
>
> People:
>            I'm starting with BPEL 2.0 and I would like to search for any
> .bpel sample that introduce me to this new specification, Does any body
> of you have any samples that can share with me or let me know where can
> I search for samples?
>
> Thanks in advance,
>
> cheers
> Nico
>

Bpel 2.0 samples?

Posted by Nicolas Grossi <ni...@gmail.com>.
People:
           I'm starting with BPEL 2.0 and I would like to search for any 
.bpel sample that introduce me to this new specification, Does any body 
of you have any samples that can share with me or let me know where can 
I search for samples?

Thanks in advance,

cheers
Nico

Re: veryfing node existance

Posted by Matthieu Riou <ma...@offthelip.org>.
Hi Jan,

I had a look at the issue and it seems that there's a problem with your
process. The condition is apparently nested within the assign like this:

        <bpel:assign name="HelloRequestToResponseCopy-Assign">
          <bpel:if>
            .....
          </bpel:if>
        </bpel:assign>

Instead the assign should be inside the <if> like this:

        <bpel:if>

<bpel:condition>boolean($request.body/hello:hello)</bpel:condition>
             <bpel:assign name="HelloRequestToResponseCopy-Assign">
                     <bpel:copy>
                        <bpel:from>$request.body/hello:hello</bpel:from>
                        <bpel:to>$response.body/hello:hello</bpel:to>
                     </bpel:copy>
             </bpel:assign>
        </bpel:if>

This seems to work properly for me. It actually took me a while to realize
what the problem was, I think I should have a stronger espresso in the
morning :) I also think we should add schema-level validation.

Cheers,
Matthieu

On 9/6/07, Cwik, Jan <Ja...@sabre-holdings.com> wrote:
>
> Thanks for the hint, finally I managed to attach the project, I also
> added the request that I'm sending to the engine.
>
> >   * Try by setting the XPath 2.0 expression language on your process.
> I tried XPath 2.0 with ODE and it doesn't work either. I also verified
> the XPath 1.0 and 2.0 expressions on my request in the XML Spy. It
> worked fine. I mean when I removed <hello> node it returned false, when
> node was present it returned true.
>
> >   * Make sure that you don't send an empty node.
> This is what I'm trying to find out, I need to verify if node is empty
> or not. The reason is that in the response from (original project) I may
> expect <Success>, <Error> or <Warning> nodes. Based on their presence I
> need to make some actions.
>
> regards
> jan
>
> -----Original Message-----
> From: matthieu.riou@gmail.com [mailto:matthieu.riou@gmail.com] On Behalf
> Of Matthieu Riou
> Sent: Wednesday, September 05, 2007 5:59 PM
> To: user@ode.apache.org
> Subject: Re: veryfing node existance
>
> Btw there are 2 other things you might want to try following the rules
> of
> boolean evaluations in XPath 1.0 [1]
>
>    * Make sure that you don't send an empty node.
>    * Try to change your expression to $request.body/hello:hello/text()
> as
> I'm not sure that Xalan considers a node only containing a text node as
> non
> empty.
>    * Try by setting the XPath 2.0 expression language on your process.
>
> Thanks,
> Matthieu
>
> [1] http://www.w3.org/TR/xpath#section-Boolean-Functions
>
> On 9/5/07, Matthieu Riou <ma...@offthelip.org> wrote:
> >
> > On 9/5/07, Cwik, Jan <Ja...@sabre-holdings.com> wrote:
> > >
> > > Hi,
> > >
> > > I have raised the jira for it. I have managed to reproduce it on a
> > > simpler example (modified loan-broker). However, I didn't find the
> way
> > > to attach files to the issue. How can I do that ?
> > >
> > > https://issues.apache.org/jira/browse/ODE-178
> >
> >
> > "Attach file", second operation in the left column. Could you also
> include
> > the message content you're sending to the engine?
> >
> > Thanks,
> > Matthieu
> >
> > regards
> > > jan
> > >
> > > -----Original Message-----
> > > From: Alex Boisvert [mailto: boisvert@intalio.com]
> > > Sent: Tuesday, September 04, 2007 9:24 PM
> > > To: user@ode.apache.org
> > > Subject: Re: veryfing node existance
> > >
> > > I just took another look at it and I think there's something fishy,
> > > although
> > > I can't tell without having all files (.bpel, .wsdl, .xsd, ...).
> > >
> > > I created a simpler test case with <if> <condition> boolean( ...)
> > > </condition> </if> to verify that the basics work and the test
> passed.
> > > So
> > > there must be something different in your use-case that's tripping
> the
> > > engine.
> > >
> > > I'd be happy to investigate further if you can send a working JBI
> > > assembly
> > > and a sample input message.  Can you create a Jira for it?
> > >
> > > thanks,
> > > alex
> > >
> > > On 9/4/07, Cwik, Jan <Ja...@sabre-holdings.com> wrote:
> > > >
> > > > Hi Alex,
> > > >
> > > > Did you have a time to take a look at my issue? Am I doing smth
> wrong
> > > or
> > > > this is a bug?
> > > >
> > > > regards
> > > > jan
> > > >
> > > > -----Original Message-----
> > > > From: Cwik, Jan [mailto: Jan.Cwik@sabre-holdings.com]
> > > > Sent: Monday, August 27, 2007 11:15 AM
> > > > To: user@ode.apache.org
> > > > Subject: RE: veryfing node existance
> > > >
> > > >
> > > > Hi,
> > > >
> > > > Yes I checked and this matches the variable. I mean when I remove
> the
> > > if
> > > > statement the copying is performed successfully.
> > > >
> > > > I am attaching the servicemix log file with ode DEBUGs turned on.
> > > > However, I am unable to find any information about processing the
> if
> > > > statements. The bpel:if processing shall be right after the
> copying of
> > > > Version (bpel snippet below).
> > > >
> > > >             <bpel:copy>
> > > >
> > > >
> > >
> <bpel:from>$TravelItineraryCreateRequest.body/xsd1:OTA_AirBookRQ/@Versio
> > > > n</bpel:from>
> > > >
> <bpel:to>$OTA_AirBookRequest.body/@Version</bpel:to>
> > > >             </bpel:copy>
> > > >
> > > > I'm also attaching the bpel script.
> > > >
> > > > regards
> > > > jan
> > > >
> > > > -----Original Message-----
> > > > From: Alex Boisvert [mailto:boisvert@intalio.com ]
> > > > Sent: Friday, August 24, 2007 5:17 PM
> > > > To: user@ode.apache.org
> > > > Subject: Re: veryfing node existance
> > > >
> > > > Hi Jan,
> > > >
> > > > My guess is your expression
> > > >
> > >
> "$TravelItineraryCreateRequest.body/xsd1:OTA_AirBookRQ/xsd1:AirItinerary
> > > > "
> > > > doesn't match your variable content.
> > > >
> > > > Did you check that it matches what you expect?  e.g . by doing an
> > > > assignment
> > > > when the data is there.   If your message part is an element, a
> common
> > > > mistake is to put the top-level element name in the expression.
> Have
> > > > you
> > > > tried "$TravelItineraryCreateRequest.body/xsd1:AirItinerary" ?
> > > >
> > > > Set the "org.apache.ode" category to DEBUG and check the logs to
> see
> > > > what
> > > > kind of data is returned from this expression.
> > > >
> > > > alex
> > > >
> > > >
> > > > On 8/24/07, Cwik, Jan < Jan.Cwik@sabre-holdings.com> wrote:
> > > > >
> > > > >
> > > > > Hi,
> > > > >
> > > > > Sorry for late response but I wasn't able to verify it earlier.
> I
> > > have
> > > > > used the ODE revision 569274. I removed <then> and tested both
> > > xpath's
> > > > > exists and boolean. Unfortunatelly it didn't work for me, i.e.
> the
> > > > copy
> > > > > activity wasn't performed.
> > > > >
> > > > > <bpel:if>
> > > > >
> > > > > <bpel:condition
> > > > >
> > > >
> > >
> expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">bool
> > > > >
> > > >
> > >
> ean($TravelItineraryCreateRequest.body/xsd1:OTA_AirBookRQ/xsd1:AirItiner
> > > > > ary)</bpel:condition>
> > > > >
> > > > >         <bpel:copy>
> > > > >
> > > > >
> > > >
> > >
> <bpel:from>$TravelItineraryCreateRequest.body/xsd1:OTA_AirBookRQ/xsd1:Ai
> > >
> > > > > rItinerary</bpel:from>
> > > > >
> > > > > <bpel:to>$OTA_AirBookRequest.body/xsd1:AirItinerary</bpel:to>
> > > > >         </bpel:copy>
> > > > >
> > > > > </bpel:if>
> > > > >
> > > > > regards
> > > > > jan
> > > > >
> > > > > -----Original Message-----
> > > > > From: Alex Boisvert [mailto:boisvert@intalio.com]
> > > > > Sent: Monday, August 20, 2007 11:26 PM
> > > > > To: user@ode.apache.org
> > > > > Subject: Re: veryfing node existance
> > > > >
> > > > > Hi Jan,
> > > > >
> > > > > The <then> element has been dropped in the final  in BPEL 2.0
> (c.f.
> > > > > issue
> > > > > 237), so the syntax of the <if> statement should be:
> > > > >
> > > > > <bpel:if>
> > > > >     <bpel:condition> ... <bpel:condition>
> > > > >     activity
> > > > > </bpel:if>
> > > > >
> > > > > Looks like we need to update a few test cases that still use
> BPEL
> > > 2.0
> > > > > draft
> > > > > syntax, so thanks for bringing this up!
> > > > >
> > > > > cheers,
> > > > > alex
> > > > >
> > > > > On 8/20/07, Cwik, Jan <Ja...@sabre-holdings.com> wrote:
> > > > > >
> > > > > > Hi,
> > > > > >
> > > > > > I'm trying to do copying based on node existance. That is
> first I
> > > > want
> > > > > > to find out if
> > > > > >
> > > > >
> > > >
> > >
> "$TravelItineraryCreateRequest.body/xsd1:OTA_AirBookRQ/xsd1:AirItinerary
> > > > > > " query returns any value. Then I want to copy it into the
> > > > > > OTA_AirBookRequest. If I run it standalone (that is without
> > > bpel:if)
> > > > > it
> > > > > > works well. However, if I use bpel:if the copying is not
> > > performed.
> > > > > >
> > > > > > What am I doing wrong ? The following is the snippet that I
> > > tested.
> > > > I
> > > > > > tried with and without expressionLanguage, I tried also with
> and
> > > > > without
> > > > > > boolean, all combinations did not work.
> > > > > >
> > > > > > <bpel:if>
> > > > > >     <bpel:condition
> > > > > >
> > > > >
> > > >
> > >
> expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">bool
> > > > > >
> > > > >
> > > >
> > >
> ean($TravelItineraryCreateRequest.body/xsd1:OTA_AirBookRQ/xsd1:AirItiner
> > >
> > > > > > ary)</bpel:condition>
> > > > > >     <bpel:then>
> > > > > >         <bpel:sequence>
> > > > > >             <bpel:assign>
> > > > > >                 <bpel:copy>
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> <bpel:from>$TravelItineraryCreateRequest.body/xsd1:OTA_AirBookRQ/xsd1:Ai
> > > > > > rItinerary</bpel:from>
> > > > > >
> > > > > > <bpel:to>$OTA_AirBookRequest.body/xsd1:AirItinerary</bpel:to>
> > > > > >                 </bpel:copy>
> > > > > >             </bpel:assign>
> > > > > >         </bpel:sequence>
> > > > > >     </bpel:then>
> > > > > > </bpel:if>
> > > > > >
> > > > > > best regards
> > > > > > jan
> > > > > >
> > > > >
> > > >
> > >
> >
> >
>

RE: veryfing node existance

Posted by "Cwik, Jan" <Ja...@sabre-holdings.com>.
Thanks for the hint, finally I managed to attach the project, I also
added the request that I'm sending to the engine.

>   * Try by setting the XPath 2.0 expression language on your process.
I tried XPath 2.0 with ODE and it doesn't work either. I also verified
the XPath 1.0 and 2.0 expressions on my request in the XML Spy. It
worked fine. I mean when I removed <hello> node it returned false, when
node was present it returned true.

>   * Make sure that you don't send an empty node.
This is what I'm trying to find out, I need to verify if node is empty
or not. The reason is that in the response from (original project) I may
expect <Success>, <Error> or <Warning> nodes. Based on their presence I
need to make some actions.

regards
jan

-----Original Message-----
From: matthieu.riou@gmail.com [mailto:matthieu.riou@gmail.com] On Behalf
Of Matthieu Riou
Sent: Wednesday, September 05, 2007 5:59 PM
To: user@ode.apache.org
Subject: Re: veryfing node existance

Btw there are 2 other things you might want to try following the rules
of
boolean evaluations in XPath 1.0 [1]

   * Make sure that you don't send an empty node.
   * Try to change your expression to $request.body/hello:hello/text()
as
I'm not sure that Xalan considers a node only containing a text node as
non
empty.
   * Try by setting the XPath 2.0 expression language on your process.

Thanks,
Matthieu

[1] http://www.w3.org/TR/xpath#section-Boolean-Functions

On 9/5/07, Matthieu Riou <ma...@offthelip.org> wrote:
>
> On 9/5/07, Cwik, Jan <Ja...@sabre-holdings.com> wrote:
> >
> > Hi,
> >
> > I have raised the jira for it. I have managed to reproduce it on a
> > simpler example (modified loan-broker). However, I didn't find the
way
> > to attach files to the issue. How can I do that ?
> >
> > https://issues.apache.org/jira/browse/ODE-178
>
>
> "Attach file", second operation in the left column. Could you also
include
> the message content you're sending to the engine?
>
> Thanks,
> Matthieu
>
> regards
> > jan
> >
> > -----Original Message-----
> > From: Alex Boisvert [mailto: boisvert@intalio.com]
> > Sent: Tuesday, September 04, 2007 9:24 PM
> > To: user@ode.apache.org
> > Subject: Re: veryfing node existance
> >
> > I just took another look at it and I think there's something fishy,
> > although
> > I can't tell without having all files (.bpel, .wsdl, .xsd, ...).
> >
> > I created a simpler test case with <if> <condition> boolean( ...)
> > </condition> </if> to verify that the basics work and the test
passed.
> > So
> > there must be something different in your use-case that's tripping
the
> > engine.
> >
> > I'd be happy to investigate further if you can send a working JBI
> > assembly
> > and a sample input message.  Can you create a Jira for it?
> >
> > thanks,
> > alex
> >
> > On 9/4/07, Cwik, Jan <Ja...@sabre-holdings.com> wrote:
> > >
> > > Hi Alex,
> > >
> > > Did you have a time to take a look at my issue? Am I doing smth
wrong
> > or
> > > this is a bug?
> > >
> > > regards
> > > jan
> > >
> > > -----Original Message-----
> > > From: Cwik, Jan [mailto: Jan.Cwik@sabre-holdings.com]
> > > Sent: Monday, August 27, 2007 11:15 AM
> > > To: user@ode.apache.org
> > > Subject: RE: veryfing node existance
> > >
> > >
> > > Hi,
> > >
> > > Yes I checked and this matches the variable. I mean when I remove
the
> > if
> > > statement the copying is performed successfully.
> > >
> > > I am attaching the servicemix log file with ode DEBUGs turned on.
> > > However, I am unable to find any information about processing the
if
> > > statements. The bpel:if processing shall be right after the
copying of
> > > Version (bpel snippet below).
> > >
> > >             <bpel:copy>
> > >
> > >
> >
<bpel:from>$TravelItineraryCreateRequest.body/xsd1:OTA_AirBookRQ/@Versio
> > > n</bpel:from>
> > >
<bpel:to>$OTA_AirBookRequest.body/@Version</bpel:to>
> > >             </bpel:copy>
> > >
> > > I'm also attaching the bpel script.
> > >
> > > regards
> > > jan
> > >
> > > -----Original Message-----
> > > From: Alex Boisvert [mailto:boisvert@intalio.com ]
> > > Sent: Friday, August 24, 2007 5:17 PM
> > > To: user@ode.apache.org
> > > Subject: Re: veryfing node existance
> > >
> > > Hi Jan,
> > >
> > > My guess is your expression
> > >
> >
"$TravelItineraryCreateRequest.body/xsd1:OTA_AirBookRQ/xsd1:AirItinerary
> > > "
> > > doesn't match your variable content.
> > >
> > > Did you check that it matches what you expect?  e.g . by doing an
> > > assignment
> > > when the data is there.   If your message part is an element, a
common
> > > mistake is to put the top-level element name in the expression.
Have
> > > you
> > > tried "$TravelItineraryCreateRequest.body/xsd1:AirItinerary" ?
> > >
> > > Set the "org.apache.ode" category to DEBUG and check the logs to
see
> > > what
> > > kind of data is returned from this expression.
> > >
> > > alex
> > >
> > >
> > > On 8/24/07, Cwik, Jan < Jan.Cwik@sabre-holdings.com> wrote:
> > > >
> > > >
> > > > Hi,
> > > >
> > > > Sorry for late response but I wasn't able to verify it earlier.
I
> > have
> > > > used the ODE revision 569274. I removed <then> and tested both
> > xpath's
> > > > exists and boolean. Unfortunatelly it didn't work for me, i.e.
the
> > > copy
> > > > activity wasn't performed.
> > > >
> > > > <bpel:if>
> > > >
> > > > <bpel:condition
> > > >
> > >
> >
expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">bool
> > > >
> > >
> >
ean($TravelItineraryCreateRequest.body/xsd1:OTA_AirBookRQ/xsd1:AirItiner
> > > > ary)</bpel:condition>
> > > >
> > > >         <bpel:copy>
> > > >
> > > >
> > >
> >
<bpel:from>$TravelItineraryCreateRequest.body/xsd1:OTA_AirBookRQ/xsd1:Ai
> >
> > > > rItinerary</bpel:from>
> > > >
> > > > <bpel:to>$OTA_AirBookRequest.body/xsd1:AirItinerary</bpel:to>
> > > >         </bpel:copy>
> > > >
> > > > </bpel:if>
> > > >
> > > > regards
> > > > jan
> > > >
> > > > -----Original Message-----
> > > > From: Alex Boisvert [mailto:boisvert@intalio.com]
> > > > Sent: Monday, August 20, 2007 11:26 PM
> > > > To: user@ode.apache.org
> > > > Subject: Re: veryfing node existance
> > > >
> > > > Hi Jan,
> > > >
> > > > The <then> element has been dropped in the final  in BPEL 2.0
(c.f.
> > > > issue
> > > > 237), so the syntax of the <if> statement should be:
> > > >
> > > > <bpel:if>
> > > >     <bpel:condition> ... <bpel:condition>
> > > >     activity
> > > > </bpel:if>
> > > >
> > > > Looks like we need to update a few test cases that still use
BPEL
> > 2.0
> > > > draft
> > > > syntax, so thanks for bringing this up!
> > > >
> > > > cheers,
> > > > alex
> > > >
> > > > On 8/20/07, Cwik, Jan <Ja...@sabre-holdings.com> wrote:
> > > > >
> > > > > Hi,
> > > > >
> > > > > I'm trying to do copying based on node existance. That is
first I
> > > want
> > > > > to find out if
> > > > >
> > > >
> > >
> >
"$TravelItineraryCreateRequest.body/xsd1:OTA_AirBookRQ/xsd1:AirItinerary
> > > > > " query returns any value. Then I want to copy it into the
> > > > > OTA_AirBookRequest. If I run it standalone (that is without
> > bpel:if)
> > > > it
> > > > > works well. However, if I use bpel:if the copying is not
> > performed.
> > > > >
> > > > > What am I doing wrong ? The following is the snippet that I
> > tested.
> > > I
> > > > > tried with and without expressionLanguage, I tried also with
and
> > > > without
> > > > > boolean, all combinations did not work.
> > > > >
> > > > > <bpel:if>
> > > > >     <bpel:condition
> > > > >
> > > >
> > >
> >
expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">bool
> > > > >
> > > >
> > >
> >
ean($TravelItineraryCreateRequest.body/xsd1:OTA_AirBookRQ/xsd1:AirItiner
> >
> > > > > ary)</bpel:condition>
> > > > >     <bpel:then>
> > > > >         <bpel:sequence>
> > > > >             <bpel:assign>
> > > > >                 <bpel:copy>
> > > > >
> > > > >
> > > >
> > >
> >
<bpel:from>$TravelItineraryCreateRequest.body/xsd1:OTA_AirBookRQ/xsd1:Ai
> > > > > rItinerary</bpel:from>
> > > > >
> > > > > <bpel:to>$OTA_AirBookRequest.body/xsd1:AirItinerary</bpel:to>
> > > > >                 </bpel:copy>
> > > > >             </bpel:assign>
> > > > >         </bpel:sequence>
> > > > >     </bpel:then>
> > > > > </bpel:if>
> > > > >
> > > > > best regards
> > > > > jan
> > > > >
> > > >
> > >
> >
>
>

Re: veryfing node existance

Posted by Matthieu Riou <ma...@offthelip.org>.
Btw there are 2 other things you might want to try following the rules of
boolean evaluations in XPath 1.0 [1]

   * Make sure that you don't send an empty node.
   * Try to change your expression to $request.body/hello:hello/text() as
I'm not sure that Xalan considers a node only containing a text node as non
empty.
   * Try by setting the XPath 2.0 expression language on your process.

Thanks,
Matthieu

[1] http://www.w3.org/TR/xpath#section-Boolean-Functions

On 9/5/07, Matthieu Riou <ma...@offthelip.org> wrote:
>
> On 9/5/07, Cwik, Jan <Ja...@sabre-holdings.com> wrote:
> >
> > Hi,
> >
> > I have raised the jira for it. I have managed to reproduce it on a
> > simpler example (modified loan-broker). However, I didn't find the way
> > to attach files to the issue. How can I do that ?
> >
> > https://issues.apache.org/jira/browse/ODE-178
>
>
> "Attach file", second operation in the left column. Could you also include
> the message content you're sending to the engine?
>
> Thanks,
> Matthieu
>
> regards
> > jan
> >
> > -----Original Message-----
> > From: Alex Boisvert [mailto: boisvert@intalio.com]
> > Sent: Tuesday, September 04, 2007 9:24 PM
> > To: user@ode.apache.org
> > Subject: Re: veryfing node existance
> >
> > I just took another look at it and I think there's something fishy,
> > although
> > I can't tell without having all files (.bpel, .wsdl, .xsd, ...).
> >
> > I created a simpler test case with <if> <condition> boolean( ...)
> > </condition> </if> to verify that the basics work and the test passed.
> > So
> > there must be something different in your use-case that's tripping the
> > engine.
> >
> > I'd be happy to investigate further if you can send a working JBI
> > assembly
> > and a sample input message.  Can you create a Jira for it?
> >
> > thanks,
> > alex
> >
> > On 9/4/07, Cwik, Jan <Ja...@sabre-holdings.com> wrote:
> > >
> > > Hi Alex,
> > >
> > > Did you have a time to take a look at my issue? Am I doing smth wrong
> > or
> > > this is a bug?
> > >
> > > regards
> > > jan
> > >
> > > -----Original Message-----
> > > From: Cwik, Jan [mailto: Jan.Cwik@sabre-holdings.com]
> > > Sent: Monday, August 27, 2007 11:15 AM
> > > To: user@ode.apache.org
> > > Subject: RE: veryfing node existance
> > >
> > >
> > > Hi,
> > >
> > > Yes I checked and this matches the variable. I mean when I remove the
> > if
> > > statement the copying is performed successfully.
> > >
> > > I am attaching the servicemix log file with ode DEBUGs turned on.
> > > However, I am unable to find any information about processing the if
> > > statements. The bpel:if processing shall be right after the copying of
> > > Version (bpel snippet below).
> > >
> > >             <bpel:copy>
> > >
> > >
> > <bpel:from>$TravelItineraryCreateRequest.body/xsd1:OTA_AirBookRQ/@Versio
> > > n</bpel:from>
> > >                 <bpel:to>$OTA_AirBookRequest.body/@Version</bpel:to>
> > >             </bpel:copy>
> > >
> > > I'm also attaching the bpel script.
> > >
> > > regards
> > > jan
> > >
> > > -----Original Message-----
> > > From: Alex Boisvert [mailto:boisvert@intalio.com ]
> > > Sent: Friday, August 24, 2007 5:17 PM
> > > To: user@ode.apache.org
> > > Subject: Re: veryfing node existance
> > >
> > > Hi Jan,
> > >
> > > My guess is your expression
> > >
> > "$TravelItineraryCreateRequest.body/xsd1:OTA_AirBookRQ/xsd1:AirItinerary
> > > "
> > > doesn't match your variable content.
> > >
> > > Did you check that it matches what you expect?  e.g . by doing an
> > > assignment
> > > when the data is there.   If your message part is an element, a common
> > > mistake is to put the top-level element name in the expression.  Have
> > > you
> > > tried "$TravelItineraryCreateRequest.body/xsd1:AirItinerary" ?
> > >
> > > Set the "org.apache.ode" category to DEBUG and check the logs to see
> > > what
> > > kind of data is returned from this expression.
> > >
> > > alex
> > >
> > >
> > > On 8/24/07, Cwik, Jan < Jan.Cwik@sabre-holdings.com> wrote:
> > > >
> > > >
> > > > Hi,
> > > >
> > > > Sorry for late response but I wasn't able to verify it earlier. I
> > have
> > > > used the ODE revision 569274. I removed <then> and tested both
> > xpath's
> > > > exists and boolean. Unfortunatelly it didn't work for me, i.e. the
> > > copy
> > > > activity wasn't performed.
> > > >
> > > > <bpel:if>
> > > >
> > > > <bpel:condition
> > > >
> > >
> > expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">bool
> > > >
> > >
> > ean($TravelItineraryCreateRequest.body/xsd1:OTA_AirBookRQ/xsd1:AirItiner
> > > > ary)</bpel:condition>
> > > >
> > > >         <bpel:copy>
> > > >
> > > >
> > >
> > <bpel:from>$TravelItineraryCreateRequest.body/xsd1:OTA_AirBookRQ/xsd1:Ai
> >
> > > > rItinerary</bpel:from>
> > > >
> > > > <bpel:to>$OTA_AirBookRequest.body/xsd1:AirItinerary</bpel:to>
> > > >         </bpel:copy>
> > > >
> > > > </bpel:if>
> > > >
> > > > regards
> > > > jan
> > > >
> > > > -----Original Message-----
> > > > From: Alex Boisvert [mailto:boisvert@intalio.com]
> > > > Sent: Monday, August 20, 2007 11:26 PM
> > > > To: user@ode.apache.org
> > > > Subject: Re: veryfing node existance
> > > >
> > > > Hi Jan,
> > > >
> > > > The <then> element has been dropped in the final  in BPEL 2.0 (c.f.
> > > > issue
> > > > 237), so the syntax of the <if> statement should be:
> > > >
> > > > <bpel:if>
> > > >     <bpel:condition> ... <bpel:condition>
> > > >     activity
> > > > </bpel:if>
> > > >
> > > > Looks like we need to update a few test cases that still use BPEL
> > 2.0
> > > > draft
> > > > syntax, so thanks for bringing this up!
> > > >
> > > > cheers,
> > > > alex
> > > >
> > > > On 8/20/07, Cwik, Jan <Ja...@sabre-holdings.com> wrote:
> > > > >
> > > > > Hi,
> > > > >
> > > > > I'm trying to do copying based on node existance. That is first I
> > > want
> > > > > to find out if
> > > > >
> > > >
> > >
> > "$TravelItineraryCreateRequest.body/xsd1:OTA_AirBookRQ/xsd1:AirItinerary
> > > > > " query returns any value. Then I want to copy it into the
> > > > > OTA_AirBookRequest. If I run it standalone (that is without
> > bpel:if)
> > > > it
> > > > > works well. However, if I use bpel:if the copying is not
> > performed.
> > > > >
> > > > > What am I doing wrong ? The following is the snippet that I
> > tested.
> > > I
> > > > > tried with and without expressionLanguage, I tried also with and
> > > > without
> > > > > boolean, all combinations did not work.
> > > > >
> > > > > <bpel:if>
> > > > >     <bpel:condition
> > > > >
> > > >
> > >
> > expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">bool
> > > > >
> > > >
> > >
> > ean($TravelItineraryCreateRequest.body/xsd1:OTA_AirBookRQ/xsd1:AirItiner
> >
> > > > > ary)</bpel:condition>
> > > > >     <bpel:then>
> > > > >         <bpel:sequence>
> > > > >             <bpel:assign>
> > > > >                 <bpel:copy>
> > > > >
> > > > >
> > > >
> > >
> > <bpel:from>$TravelItineraryCreateRequest.body/xsd1:OTA_AirBookRQ/xsd1:Ai
> > > > > rItinerary</bpel:from>
> > > > >
> > > > > <bpel:to>$OTA_AirBookRequest.body/xsd1:AirItinerary</bpel:to>
> > > > >                 </bpel:copy>
> > > > >             </bpel:assign>
> > > > >         </bpel:sequence>
> > > > >     </bpel:then>
> > > > > </bpel:if>
> > > > >
> > > > > best regards
> > > > > jan
> > > > >
> > > >
> > >
> >
>
>

Re: veryfing node existance

Posted by Matthieu Riou <ma...@offthelip.org>.
On 9/5/07, Cwik, Jan <Ja...@sabre-holdings.com> wrote:
>
> Hi,
>
> I have raised the jira for it. I have managed to reproduce it on a
> simpler example (modified loan-broker). However, I didn't find the way
> to attach files to the issue. How can I do that ?
>
> https://issues.apache.org/jira/browse/ODE-178


"Attach file", second operation in the left column. Could you also include
the message content you're sending to the engine?

Thanks,
Matthieu

regards
> jan
>
> -----Original Message-----
> From: Alex Boisvert [mailto:boisvert@intalio.com]
> Sent: Tuesday, September 04, 2007 9:24 PM
> To: user@ode.apache.org
> Subject: Re: veryfing node existance
>
> I just took another look at it and I think there's something fishy,
> although
> I can't tell without having all files (.bpel, .wsdl, .xsd, ...).
>
> I created a simpler test case with <if> <condition> boolean( ...)
> </condition> </if> to verify that the basics work and the test passed.
> So
> there must be something different in your use-case that's tripping the
> engine.
>
> I'd be happy to investigate further if you can send a working JBI
> assembly
> and a sample input message.  Can you create a Jira for it?
>
> thanks,
> alex
>
> On 9/4/07, Cwik, Jan <Ja...@sabre-holdings.com> wrote:
> >
> > Hi Alex,
> >
> > Did you have a time to take a look at my issue? Am I doing smth wrong
> or
> > this is a bug?
> >
> > regards
> > jan
> >
> > -----Original Message-----
> > From: Cwik, Jan [mailto:Jan.Cwik@sabre-holdings.com]
> > Sent: Monday, August 27, 2007 11:15 AM
> > To: user@ode.apache.org
> > Subject: RE: veryfing node existance
> >
> >
> > Hi,
> >
> > Yes I checked and this matches the variable. I mean when I remove the
> if
> > statement the copying is performed successfully.
> >
> > I am attaching the servicemix log file with ode DEBUGs turned on.
> > However, I am unable to find any information about processing the if
> > statements. The bpel:if processing shall be right after the copying of
> > Version (bpel snippet below).
> >
> >             <bpel:copy>
> >
> >
> <bpel:from>$TravelItineraryCreateRequest.body/xsd1:OTA_AirBookRQ/@Versio
> > n</bpel:from>
> >                 <bpel:to>$OTA_AirBookRequest.body/@Version</bpel:to>
> >             </bpel:copy>
> >
> > I'm also attaching the bpel script.
> >
> > regards
> > jan
> >
> > -----Original Message-----
> > From: Alex Boisvert [mailto:boisvert@intalio.com]
> > Sent: Friday, August 24, 2007 5:17 PM
> > To: user@ode.apache.org
> > Subject: Re: veryfing node existance
> >
> > Hi Jan,
> >
> > My guess is your expression
> >
> "$TravelItineraryCreateRequest.body/xsd1:OTA_AirBookRQ/xsd1:AirItinerary
> > "
> > doesn't match your variable content.
> >
> > Did you check that it matches what you expect?  e.g. by doing an
> > assignment
> > when the data is there.   If your message part is an element, a common
> > mistake is to put the top-level element name in the expression.  Have
> > you
> > tried "$TravelItineraryCreateRequest.body/xsd1:AirItinerary" ?
> >
> > Set the "org.apache.ode" category to DEBUG and check the logs to see
> > what
> > kind of data is returned from this expression.
> >
> > alex
> >
> >
> > On 8/24/07, Cwik, Jan <Ja...@sabre-holdings.com> wrote:
> > >
> > >
> > > Hi,
> > >
> > > Sorry for late response but I wasn't able to verify it earlier. I
> have
> > > used the ODE revision 569274. I removed <then> and tested both
> xpath's
> > > exists and boolean. Unfortunatelly it didn't work for me, i.e. the
> > copy
> > > activity wasn't performed.
> > >
> > > <bpel:if>
> > >
> > > <bpel:condition
> > >
> >
> expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">bool
> > >
> >
> ean($TravelItineraryCreateRequest.body/xsd1:OTA_AirBookRQ/xsd1:AirItiner
> > > ary)</bpel:condition>
> > >
> > >         <bpel:copy>
> > >
> > >
> >
> <bpel:from>$TravelItineraryCreateRequest.body/xsd1:OTA_AirBookRQ/xsd1:Ai
> > > rItinerary</bpel:from>
> > >
> > > <bpel:to>$OTA_AirBookRequest.body/xsd1:AirItinerary</bpel:to>
> > >         </bpel:copy>
> > >
> > > </bpel:if>
> > >
> > > regards
> > > jan
> > >
> > > -----Original Message-----
> > > From: Alex Boisvert [mailto:boisvert@intalio.com]
> > > Sent: Monday, August 20, 2007 11:26 PM
> > > To: user@ode.apache.org
> > > Subject: Re: veryfing node existance
> > >
> > > Hi Jan,
> > >
> > > The <then> element has been dropped in the final  in BPEL 2.0 (c.f.
> > > issue
> > > 237), so the syntax of the <if> statement should be:
> > >
> > > <bpel:if>
> > >     <bpel:condition> ... <bpel:condition>
> > >     activity
> > > </bpel:if>
> > >
> > > Looks like we need to update a few test cases that still use BPEL
> 2.0
> > > draft
> > > syntax, so thanks for bringing this up!
> > >
> > > cheers,
> > > alex
> > >
> > > On 8/20/07, Cwik, Jan <Ja...@sabre-holdings.com> wrote:
> > > >
> > > > Hi,
> > > >
> > > > I'm trying to do copying based on node existance. That is first I
> > want
> > > > to find out if
> > > >
> > >
> >
> "$TravelItineraryCreateRequest.body/xsd1:OTA_AirBookRQ/xsd1:AirItinerary
> > > > " query returns any value. Then I want to copy it into the
> > > > OTA_AirBookRequest. If I run it standalone (that is without
> bpel:if)
> > > it
> > > > works well. However, if I use bpel:if the copying is not
> performed.
> > > >
> > > > What am I doing wrong ? The following is the snippet that I
> tested.
> > I
> > > > tried with and without expressionLanguage, I tried also with and
> > > without
> > > > boolean, all combinations did not work.
> > > >
> > > > <bpel:if>
> > > >     <bpel:condition
> > > >
> > >
> >
> expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">bool
> > > >
> > >
> >
> ean($TravelItineraryCreateRequest.body/xsd1:OTA_AirBookRQ/xsd1:AirItiner
> > > > ary)</bpel:condition>
> > > >     <bpel:then>
> > > >         <bpel:sequence>
> > > >             <bpel:assign>
> > > >                 <bpel:copy>
> > > >
> > > >
> > >
> >
> <bpel:from>$TravelItineraryCreateRequest.body/xsd1:OTA_AirBookRQ/xsd1:Ai
> > > > rItinerary</bpel:from>
> > > >
> > > > <bpel:to>$OTA_AirBookRequest.body/xsd1:AirItinerary</bpel:to>
> > > >                 </bpel:copy>
> > > >             </bpel:assign>
> > > >         </bpel:sequence>
> > > >     </bpel:then>
> > > > </bpel:if>
> > > >
> > > > best regards
> > > > jan
> > > >
> > >
> >
>

RE: veryfing node existance

Posted by "Cwik, Jan" <Ja...@sabre-holdings.com>.
Hi,

I have raised the jira for it. I have managed to reproduce it on a
simpler example (modified loan-broker). However, I didn't find the way
to attach files to the issue. How can I do that ?

https://issues.apache.org/jira/browse/ODE-178

regards
jan

-----Original Message-----
From: Alex Boisvert [mailto:boisvert@intalio.com] 
Sent: Tuesday, September 04, 2007 9:24 PM
To: user@ode.apache.org
Subject: Re: veryfing node existance

I just took another look at it and I think there's something fishy,
although
I can't tell without having all files (.bpel, .wsdl, .xsd, ...).

I created a simpler test case with <if> <condition> boolean( ...)
</condition> </if> to verify that the basics work and the test passed.
So
there must be something different in your use-case that's tripping the
engine.

I'd be happy to investigate further if you can send a working JBI
assembly
and a sample input message.  Can you create a Jira for it?

thanks,
alex

On 9/4/07, Cwik, Jan <Ja...@sabre-holdings.com> wrote:
>
> Hi Alex,
>
> Did you have a time to take a look at my issue? Am I doing smth wrong
or
> this is a bug?
>
> regards
> jan
>
> -----Original Message-----
> From: Cwik, Jan [mailto:Jan.Cwik@sabre-holdings.com]
> Sent: Monday, August 27, 2007 11:15 AM
> To: user@ode.apache.org
> Subject: RE: veryfing node existance
>
>
> Hi,
>
> Yes I checked and this matches the variable. I mean when I remove the
if
> statement the copying is performed successfully.
>
> I am attaching the servicemix log file with ode DEBUGs turned on.
> However, I am unable to find any information about processing the if
> statements. The bpel:if processing shall be right after the copying of
> Version (bpel snippet below).
>
>             <bpel:copy>
>
>
<bpel:from>$TravelItineraryCreateRequest.body/xsd1:OTA_AirBookRQ/@Versio
> n</bpel:from>
>                 <bpel:to>$OTA_AirBookRequest.body/@Version</bpel:to>
>             </bpel:copy>
>
> I'm also attaching the bpel script.
>
> regards
> jan
>
> -----Original Message-----
> From: Alex Boisvert [mailto:boisvert@intalio.com]
> Sent: Friday, August 24, 2007 5:17 PM
> To: user@ode.apache.org
> Subject: Re: veryfing node existance
>
> Hi Jan,
>
> My guess is your expression
>
"$TravelItineraryCreateRequest.body/xsd1:OTA_AirBookRQ/xsd1:AirItinerary
> "
> doesn't match your variable content.
>
> Did you check that it matches what you expect?  e.g. by doing an
> assignment
> when the data is there.   If your message part is an element, a common
> mistake is to put the top-level element name in the expression.  Have
> you
> tried "$TravelItineraryCreateRequest.body/xsd1:AirItinerary" ?
>
> Set the "org.apache.ode" category to DEBUG and check the logs to see
> what
> kind of data is returned from this expression.
>
> alex
>
>
> On 8/24/07, Cwik, Jan <Ja...@sabre-holdings.com> wrote:
> >
> >
> > Hi,
> >
> > Sorry for late response but I wasn't able to verify it earlier. I
have
> > used the ODE revision 569274. I removed <then> and tested both
xpath's
> > exists and boolean. Unfortunatelly it didn't work for me, i.e. the
> copy
> > activity wasn't performed.
> >
> > <bpel:if>
> >
> > <bpel:condition
> >
>
expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">bool
> >
>
ean($TravelItineraryCreateRequest.body/xsd1:OTA_AirBookRQ/xsd1:AirItiner
> > ary)</bpel:condition>
> >
> >         <bpel:copy>
> >
> >
>
<bpel:from>$TravelItineraryCreateRequest.body/xsd1:OTA_AirBookRQ/xsd1:Ai
> > rItinerary</bpel:from>
> >
> > <bpel:to>$OTA_AirBookRequest.body/xsd1:AirItinerary</bpel:to>
> >         </bpel:copy>
> >
> > </bpel:if>
> >
> > regards
> > jan
> >
> > -----Original Message-----
> > From: Alex Boisvert [mailto:boisvert@intalio.com]
> > Sent: Monday, August 20, 2007 11:26 PM
> > To: user@ode.apache.org
> > Subject: Re: veryfing node existance
> >
> > Hi Jan,
> >
> > The <then> element has been dropped in the final  in BPEL 2.0 (c.f.
> > issue
> > 237), so the syntax of the <if> statement should be:
> >
> > <bpel:if>
> >     <bpel:condition> ... <bpel:condition>
> >     activity
> > </bpel:if>
> >
> > Looks like we need to update a few test cases that still use BPEL
2.0
> > draft
> > syntax, so thanks for bringing this up!
> >
> > cheers,
> > alex
> >
> > On 8/20/07, Cwik, Jan <Ja...@sabre-holdings.com> wrote:
> > >
> > > Hi,
> > >
> > > I'm trying to do copying based on node existance. That is first I
> want
> > > to find out if
> > >
> >
>
"$TravelItineraryCreateRequest.body/xsd1:OTA_AirBookRQ/xsd1:AirItinerary
> > > " query returns any value. Then I want to copy it into the
> > > OTA_AirBookRequest. If I run it standalone (that is without
bpel:if)
> > it
> > > works well. However, if I use bpel:if the copying is not
performed.
> > >
> > > What am I doing wrong ? The following is the snippet that I
tested.
> I
> > > tried with and without expressionLanguage, I tried also with and
> > without
> > > boolean, all combinations did not work.
> > >
> > > <bpel:if>
> > >     <bpel:condition
> > >
> >
>
expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">bool
> > >
> >
>
ean($TravelItineraryCreateRequest.body/xsd1:OTA_AirBookRQ/xsd1:AirItiner
> > > ary)</bpel:condition>
> > >     <bpel:then>
> > >         <bpel:sequence>
> > >             <bpel:assign>
> > >                 <bpel:copy>
> > >
> > >
> >
>
<bpel:from>$TravelItineraryCreateRequest.body/xsd1:OTA_AirBookRQ/xsd1:Ai
> > > rItinerary</bpel:from>
> > >
> > > <bpel:to>$OTA_AirBookRequest.body/xsd1:AirItinerary</bpel:to>
> > >                 </bpel:copy>
> > >             </bpel:assign>
> > >         </bpel:sequence>
> > >     </bpel:then>
> > > </bpel:if>
> > >
> > > best regards
> > > jan
> > >
> >
>

Re: veryfing node existance

Posted by Alex Boisvert <bo...@intalio.com>.
I just took another look at it and I think there's something fishy, although
I can't tell without having all files (.bpel, .wsdl, .xsd, ...).

I created a simpler test case with <if> <condition> boolean( ...)
</condition> </if> to verify that the basics work and the test passed.  So
there must be something different in your use-case that's tripping the
engine.

I'd be happy to investigate further if you can send a working JBI assembly
and a sample input message.  Can you create a Jira for it?

thanks,
alex

On 9/4/07, Cwik, Jan <Ja...@sabre-holdings.com> wrote:
>
> Hi Alex,
>
> Did you have a time to take a look at my issue? Am I doing smth wrong or
> this is a bug?
>
> regards
> jan
>
> -----Original Message-----
> From: Cwik, Jan [mailto:Jan.Cwik@sabre-holdings.com]
> Sent: Monday, August 27, 2007 11:15 AM
> To: user@ode.apache.org
> Subject: RE: veryfing node existance
>
>
> Hi,
>
> Yes I checked and this matches the variable. I mean when I remove the if
> statement the copying is performed successfully.
>
> I am attaching the servicemix log file with ode DEBUGs turned on.
> However, I am unable to find any information about processing the if
> statements. The bpel:if processing shall be right after the copying of
> Version (bpel snippet below).
>
>             <bpel:copy>
>
> <bpel:from>$TravelItineraryCreateRequest.body/xsd1:OTA_AirBookRQ/@Versio
> n</bpel:from>
>                 <bpel:to>$OTA_AirBookRequest.body/@Version</bpel:to>
>             </bpel:copy>
>
> I'm also attaching the bpel script.
>
> regards
> jan
>
> -----Original Message-----
> From: Alex Boisvert [mailto:boisvert@intalio.com]
> Sent: Friday, August 24, 2007 5:17 PM
> To: user@ode.apache.org
> Subject: Re: veryfing node existance
>
> Hi Jan,
>
> My guess is your expression
> "$TravelItineraryCreateRequest.body/xsd1:OTA_AirBookRQ/xsd1:AirItinerary
> "
> doesn't match your variable content.
>
> Did you check that it matches what you expect?  e.g. by doing an
> assignment
> when the data is there.   If your message part is an element, a common
> mistake is to put the top-level element name in the expression.  Have
> you
> tried "$TravelItineraryCreateRequest.body/xsd1:AirItinerary" ?
>
> Set the "org.apache.ode" category to DEBUG and check the logs to see
> what
> kind of data is returned from this expression.
>
> alex
>
>
> On 8/24/07, Cwik, Jan <Ja...@sabre-holdings.com> wrote:
> >
> >
> > Hi,
> >
> > Sorry for late response but I wasn't able to verify it earlier. I have
> > used the ODE revision 569274. I removed <then> and tested both xpath's
> > exists and boolean. Unfortunatelly it didn't work for me, i.e. the
> copy
> > activity wasn't performed.
> >
> > <bpel:if>
> >
> > <bpel:condition
> >
> expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">bool
> >
> ean($TravelItineraryCreateRequest.body/xsd1:OTA_AirBookRQ/xsd1:AirItiner
> > ary)</bpel:condition>
> >
> >         <bpel:copy>
> >
> >
> <bpel:from>$TravelItineraryCreateRequest.body/xsd1:OTA_AirBookRQ/xsd1:Ai
> > rItinerary</bpel:from>
> >
> > <bpel:to>$OTA_AirBookRequest.body/xsd1:AirItinerary</bpel:to>
> >         </bpel:copy>
> >
> > </bpel:if>
> >
> > regards
> > jan
> >
> > -----Original Message-----
> > From: Alex Boisvert [mailto:boisvert@intalio.com]
> > Sent: Monday, August 20, 2007 11:26 PM
> > To: user@ode.apache.org
> > Subject: Re: veryfing node existance
> >
> > Hi Jan,
> >
> > The <then> element has been dropped in the final  in BPEL 2.0 (c.f.
> > issue
> > 237), so the syntax of the <if> statement should be:
> >
> > <bpel:if>
> >     <bpel:condition> ... <bpel:condition>
> >     activity
> > </bpel:if>
> >
> > Looks like we need to update a few test cases that still use BPEL 2.0
> > draft
> > syntax, so thanks for bringing this up!
> >
> > cheers,
> > alex
> >
> > On 8/20/07, Cwik, Jan <Ja...@sabre-holdings.com> wrote:
> > >
> > > Hi,
> > >
> > > I'm trying to do copying based on node existance. That is first I
> want
> > > to find out if
> > >
> >
> "$TravelItineraryCreateRequest.body/xsd1:OTA_AirBookRQ/xsd1:AirItinerary
> > > " query returns any value. Then I want to copy it into the
> > > OTA_AirBookRequest. If I run it standalone (that is without bpel:if)
> > it
> > > works well. However, if I use bpel:if the copying is not performed.
> > >
> > > What am I doing wrong ? The following is the snippet that I tested.
> I
> > > tried with and without expressionLanguage, I tried also with and
> > without
> > > boolean, all combinations did not work.
> > >
> > > <bpel:if>
> > >     <bpel:condition
> > >
> >
> expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">bool
> > >
> >
> ean($TravelItineraryCreateRequest.body/xsd1:OTA_AirBookRQ/xsd1:AirItiner
> > > ary)</bpel:condition>
> > >     <bpel:then>
> > >         <bpel:sequence>
> > >             <bpel:assign>
> > >                 <bpel:copy>
> > >
> > >
> >
> <bpel:from>$TravelItineraryCreateRequest.body/xsd1:OTA_AirBookRQ/xsd1:Ai
> > > rItinerary</bpel:from>
> > >
> > > <bpel:to>$OTA_AirBookRequest.body/xsd1:AirItinerary</bpel:to>
> > >                 </bpel:copy>
> > >             </bpel:assign>
> > >         </bpel:sequence>
> > >     </bpel:then>
> > > </bpel:if>
> > >
> > > best regards
> > > jan
> > >
> >
>