You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ode.apache.org by buddhika chamith <ch...@gmail.com> on 2009/03/02 13:00:14 UTC

Re: BPEL object model

Hi Matthieu,

Sorry for the late feedback. Anyway thanks for the reply. Couldn't get
started on this until now. I examined usage of the BOM.

InputSource isrc = new InputSource(new
ByteArrayInputStream(StreamUtils.read(bpelFile.toURL())));
isrc.setSystemId(bpelFile.getAbsolutePath());
Process process = BpelObjectFactory.getInstance().parse(isrc,_bpelFile.toURI());

But I now have a problem as to how I should proceed finding the  variables
in process file starting from the Process object. In the API I couldn't any
hint as to how this can be done. Is there any other top level object that I
have to use? Or have I missed some thing obvious?

Regards,
Buddhika

On Mon, Feb 23, 2009 at 9:30 PM, Matthieu Riou <ma...@gmail.com>wrote:

> On Sun, Feb 22, 2009 at 6:13 AM, buddhika chamith
> <ch...@gmail.com>wrote:
>
> > Hi,
> >
> > I recently came across the need to parse BPEL files to obtain information
> > about process variables. So I searched the internet and found references
> to
> > BOM api. Can anybody enlighten me on the status of it now and where I can
> > download the necessary jars?
> >
>
> ODE has its own compiler that relies on a BPEL object model layered on top
> of DOM. We've never really packaged it independently but the bpel-compiler
> JAR is pretty close to that.
>
> To see how it's used, check the compile(File bpelFile) method in the
> following class:
>
>
> http://svn.apache.org/repos/asf/ode/branches/APACHE_ODE_1.X/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/BpelC.java
>
> Cheers,
> Matthieu
>
>
> > Regards,
> > Chamith Buddhika.
> >
>

Re: BPEL object model

Posted by Matthieu Riou <ma...@gmail.com>.
On Mon, Mar 2, 2009 at 4:00 AM, buddhika chamith <ch...@gmail.com>wrote:

> Hi Matthieu,
>
> Sorry for the late feedback. Anyway thanks for the reply. Couldn't get
> started on this until now. I examined usage of the BOM.
>
> InputSource isrc = new InputSource(new ByteArrayInputStream(StreamUtils.read(bpelFile.toURL())));
>
> isrc.setSystemId(bpelFile.getAbsolutePath());
> Process process = BpelObjectFactory.getInstance().parse(isrc,_bpelFile.toURI());
>
> But I now have a problem as to how I should proceed finding the  variables
> in process file starting from the Process object. In the API I couldn't any
> hint as to how this can be done. Is there any other top level object that I
> have to use? Or have I missed some thing obvious?
>

Nothing top-level, the variables are referenced by each scope. The ones
declared in the top scope will be accessible from
process.processScope.variables. If you want all of them you can either
browse the tree or look for all the scopes in process.children (this guy has
*all* the activities in the process).

Matthieu


>
> Regards,
> Buddhika
>
>
> On Mon, Feb 23, 2009 at 9:30 PM, Matthieu Riou <ma...@gmail.com>wrote:
>
>> On Sun, Feb 22, 2009 at 6:13 AM, buddhika chamith
>> <ch...@gmail.com>wrote:
>>
>> > Hi,
>> >
>> > I recently came across the need to parse BPEL files to obtain
>> information
>> > about process variables. So I searched the internet and found references
>> to
>> > BOM api. Can anybody enlighten me on the status of it now and where I
>> can
>> > download the necessary jars?
>> >
>>
>> ODE has its own compiler that relies on a BPEL object model layered on top
>> of DOM. We've never really packaged it independently but the bpel-compiler
>> JAR is pretty close to that.
>>
>> To see how it's used, check the compile(File bpelFile) method in the
>> following class:
>>
>>
>> http://svn.apache.org/repos/asf/ode/branches/APACHE_ODE_1.X/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/BpelC.java
>>
>> Cheers,
>> Matthieu
>>
>>
>> > Regards,
>> > Chamith Buddhika.
>> >
>>
>
>