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 <[email protected]> wrote: > 2010/1/19 Andreas Fritzler <[email protected]>: >> 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 >
