You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ode.apache.org by Andreas Fritzler <an...@googlemail.com> on 2010/01/19 16:59:36 UTC

Execution State of a Process Instance

Hi,

How exactly is an execution state of a process instance persisted?
saveState() in the BpelRuntimeContextImpl class seems to store it with
the help of the RuntimeInstanceImpl class in the soup.

public Object saveState(OutputStream bos) throws IOException {
        if (bos != null) _soup.write(bos);
        return _soup;
}

I want to serialize the state in the management api. The only way I
can retrieve it there is by getting it as a ByteArrayOutputStream. Is
there a way to get the execution state in a more structured way? I was
thinking of using XStream to serialize that.

Cheers,
Andi

Re: Execution State of a Process Instance

Posted by Andreas Fritzler <an...@googlemail.com>.
How exactly can I do the mapping between the execution state binary
stream and the soup?

On Wed, Jan 20, 2010 at 18:22, Rafal Rusin <ra...@gmail.com> wrote:
> 2010/1/19 Andreas Fritzler <an...@googlemail.com>:
>> Hi,
>>
>> How exactly is an execution state of a process instance persisted?
>> saveState() in the BpelRuntimeContextImpl class seems to store it with
>> the help of the RuntimeInstanceImpl class in the soup.
>>
>> public Object saveState(OutputStream bos) throws IOException {
>>        if (bos != null) _soup.write(bos);
>>        return _soup;
>> }
>>
>> I want to serialize the state in the management api. The only way I
>> can retrieve it there is by getting it as a ByteArrayOutputStream. Is
>> there a way to get the execution state in a more structured way? I was
>> thinking of using XStream to serialize that.
>
> You can use soup to convert between byte array and Object tree.
> You can check out code where it's created, in BpelRuntimeContextImpl.
>
> As for XStream, you can do this, but bear in mind that there will be huge
> output, since deserialization connects execution state with compiled process
> (CBP). I did this for analysis and for converting execution states between
> 64 bit and 32 JVMs, and I got a few megabytes of xml.
>
> Regards,
> --
> Rafał Rusin
> http://rrusin.blogspot.com
> http://www.touk.pl
> http://top.touk.pl
>

Re: Execution State of a Process Instance

Posted by Rafal Rusin <ra...@gmail.com>.
2010/1/19 Andreas Fritzler <an...@googlemail.com>:
> Hi,
>
> How exactly is an execution state of a process instance persisted?
> saveState() in the BpelRuntimeContextImpl class seems to store it with
> the help of the RuntimeInstanceImpl class in the soup.
>
> public Object saveState(OutputStream bos) throws IOException {
>        if (bos != null) _soup.write(bos);
>        return _soup;
> }
>
> I want to serialize the state in the management api. The only way I
> can retrieve it there is by getting it as a ByteArrayOutputStream. Is
> there a way to get the execution state in a more structured way? I was
> thinking of using XStream to serialize that.

You can use soup to convert between byte array and Object tree.
You can check out code where it's created, in BpelRuntimeContextImpl.

As for XStream, you can do this, but bear in mind that there will be huge
output, since deserialization connects execution state with compiled process
(CBP). I did this for analysis and for converting execution states between
64 bit and 32 JVMs, and I got a few megabytes of xml.

Regards,
-- 
Rafał Rusin
http://rrusin.blogspot.com
http://www.touk.pl
http://top.touk.pl