ode-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "sujoy ray" <sujoy....@gmail.com>
Subject Re: WS-BPEL if and switch statement
Date Tue, 27 Feb 2007 01:20:02 GMT
Hi!! Alex,

 I was making a mistake. I didnot have any code in <else></else> section but
was writing it to be compliant with the <if> statement. I removed that and
it is deployed but for the <case condition> I still could not find it. I
gonna post the modified code soon. One more question:
How can we wrtie OR and AND statement in <if> condition?
is the following syntax right ?

<condition>contains($tmpVar,'Fly'')&&contains($tmpVar,'Swim')</condition>

let me know please.
Best Regards
Sujoy


On 2/26/07, Alex Boisvert <boisvert@intalio.com> wrote:
>
> Hi Sujoy,
>
> I can't spot the error in the BPEL snippet you provided.  Can you open a
> Jira issue and attach your full BPEL or a portion that can be deployed and
> tested with the compiler?
>
> alex
>
>
> On 2/23/07, sujoy ray <sujoy.ray@gmail.com> wrote:
> >
> > Hi!!
> >
> > I wanna use if and switch statement in my BPEL code.
> >
> > my code
> > ========
> >
> > <sequence>
> >          <assign name="test">
> >             <copy>
> >             <from variable="Input" part="assets1"/>
> >             <to>$tmpVar</to>
> >             </copy>
> >          </assign>
> > </sequence>
> > <if name="checker">
> >      <condition>contains($tmpVar,'Power')</condition>
> >      <then>
> >      .........This_code_runs_perfectly
> >      </then>
> >      <else>
> >      .........Nothing_to_write
> >      </else>
> > </if>
> >
> > However getting the following error during deployment.
> >
> > java.lang.IllegalArgumentException: null-argument
> >         at org.apache.ode.bpel.compiler.BpelCompiler.compile(
> > BpelCompiler.java:6
> > 87)
> >         at org.apache.ode.bpel.compiler.IfGenerator.compile(
> > IfGenerator.java
> > :45)
> >
> >         at org.apache.ode.bpel.compiler.BpelCompiler$7.run(
> > BpelCompiler.java
> > :753
> > )
> >
> >
> >
> > Even a condition 1=1 is giving the same error.
> >
> > Secondly, I wish to use switch statement with case condition
> >
> > <switch>
> >
> > <case condition ="contains($tmpVar,'Power')">
> >
> > my_code_runs_here
> >
> > </case>
> >
> > </switch>
> >
> > Can anybody please tell me the right way of writing these two
> statements?
> >
> > Best Regards,
> >
> > Sujoy
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message