Discussion:
[jboss-user] [jBPM] - How to get Objects from VariableInstanceLog?
Jon Kranes
2013-05-17 12:47:48 UTC
Permalink
Jon Kranes [https://community.jboss.org/people/jkranes] created the discussion

"How to get Objects from VariableInstanceLog?"

To view the discussion, visit: https://community.jboss.org/message/818217#818217

--------------------------------------------------------------
VariableInstanceLog.getValue() returns a String.  How do I obtain the orignal Object value?   Looking at the values, the serialization scheme seems to be a json-like format.  I assume there must be a class somewhere in the JBPM API that knows how to convert it but for some reason I've been unable to locate it.

Thanks,

Jon
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/818217#818217]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Demian Calcaprina
2013-05-18 02:18:19 UTC
Permalink
Demian Calcaprina [https://community.jboss.org/people/calca] created the discussion

"Re: How to get Objects from VariableInstanceLog?"

To view the discussion, visit: https://community.jboss.org/message/818322#818322

--------------------------------------------------------------
Variable instance log is currently implemented to save the to string of the object.

The logger receives the string

https://github.com/droolsjbpm/jbpm/blob/5.4.x/jbpm-bam/src/main/java/org/jbpm/process/audit/JPAWorkingMemoryDbLogger.java#L107 https://github.com/droolsjbpm/jbpm/blob/5.4.x/jbpm-bam/src/main/java/org/jbpm/process/audit/JPAWorkingMemoryDbLogger.java#L107

The working memory logger converts it to string.

https://github.com/droolsjbpm/drools/blob/5.5.x/drools-core/src/main/java/org/drools/audit/WorkingMemoryLogger.java#L525 https://github.com/droolsjbpm/drools/blob/5.5.x/drools-core/src/main/java/org/drools/audit/WorkingMemoryLogger.java#L525

or you can use some variable persistence strategy... you can take a look at this..

https://github.com/droolsjbpm/jbpm/blob/5.4.x/jbpm-persistence-jpa/src/test/java/org/jbpm/persistence/session/VariablePersistenceStrategyTest.java https://github.com/droolsjbpm/jbpm/blob/5.4.x/jbpm-persistence-jpa/src/test/java/org/jbpm/persistence/session/VariablePersistenceStrategyTest.java

HTH!
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/818322#818322]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Loading...