I am stuck at strange issue.
I have a jbpm5.3
web panel and what i am trying to do it to create web services in servlets by manipulating mysql database. i have done all the things but stuck in one byte array.
this web panel uses a table workiteminfo in which it saves all the details and uses this byte array for further processing.
My problem is that i do not have information about this byte array, but what i got to know is that this byte array is an object an unknown class. If i have this class skeleton my problem will be solved.
Here im giving screenshot of that table, NULL entries are from my code :(
http://s9.postimg.org/hbgz6kar3/issue.png
What i have tried:
- Used random byte array [Not worked]
- Used byte array from another row [Web Panel gone mad]
- I can not change even a single line from web panel's code, everything need to be done at my end.
Please guys help me out, what approaches can i use to solve this issue?
Not sure what are you trying to do, but hey, who am I to judge you ;) The ByteArray can't be de-serialized to any java class because it is not just 1 serialized object. In fact, it appears to be 4 or more. As Fernando mentioned, jbpm uses protobuf to de/serialize its own state. In version 5.3, the Serializer implementation is this:
https://github.com/droolsjbpm/drools/blob/5.3.x/drools-core/src/main/java/org/drools/marshalling/impl/OutputMarshaller.java#L1067
You can see there how the writeWorkItem method is implemented. The analogous class of OutputMarshaller is InputMarshaller:
https://github.com/droolsjbpm/drools/blob/5.3.x/drools-core/src/main/java/org/drools/marshalling/impl/InputMarshaller.java#L1132
This class contains a readWorkItem method that knows how to marshall the byte array into a WorkItem class.
The serialization is triggered from the WorkItemInfo class.
One idea could be to use this class to de-serialize the whole table.
Hope it helps,
jBPM use protobuf to serialize the work item Data. It doesn't use common java serialization.
If you want to add some work items for jBpm you can launch a jBpm workflow with one UserTask or something similar.