[jboss-user] [JBoss jBPM] - Re: Find a process via variable associated with it - unique
dslevine
do-not-reply at jboss.com
Sun Jan 14 16:13:21 EST 2007
I am trying to figure out the best way to do this as well. Please share any ideas you come up with. The way I have come up with for now is to define a link from my object to the variableInstance object in Hibernate. (Assuming you are saving your objects as HiberateLongVariable type objects.)
| <class name="MyObject" table="MY_TABLE">
|
| <set name="variableInstances">
| <key column="LONGVALUE_" />
| <one-to-many class="org.jbpm.context.exe.variableinstance.HibernateLongInstance" />
| </set>
| </class>
|
|
Then you can call myObject.getVariableInstances to return a Set. On each variable in that list you can then call hibernateLongInstance.getProcessInstance();
The ProcessInstance works fine... except...
I am having a separate problem where when I access the ProcessInstance this way, and I then call
| processInstance.getContextInstance().createVariable("anotherVariable", anotherVariable)
|
the variables dont get set in the DB at all. Hmmmmmm. Any thoughts?
Again, I dont think this is the "best" way to access the variables from the object, so please share back any other thoughts.
dan
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4001578#4001578
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4001578
More information about the jboss-user
mailing list