1 Reply Latest reply on Feb 7, 2011 8:04 AM by armahdi

    Jbpm Variable Instance looses foreign key to ProcessInstance

    c0upal

      Hi.


      I am testing a code in my program that involves a jbpm process ProcessA.  Now I created the first Process Instance by executing a method on a session bean with a @CreateProcess Annotation.  ProcessA has 5 jbpm variables.  When the 1st instance executed, I checked the JbpmVariableInstance table on SQLYog and sure enough the 5 variables, named Var1, Var2, up to Var5 had the correct values and correct values for the TOKEN, TOKENVARIABLEMAP, and PROCESSINSTANCE columns.  However when I immediately launch another process instance for ProcessA on the same session, JbpmVariableInstance table now has 10 rows.  The Previous sets of variables for the 1st process was changed.  For example, Now Var2 and Var4 now has NULL as the values for TOKEN, TOKENVARIABLEMAP, and PROCESSINSTANCE columns. SO when I try to display the variables somewhere, I can't reach it since the ProcessInstance column is NULL for those particular Variables.


      However when I changed variable names of those with NULL values, the correct column values are OK for both process instances.


      I wonder what is causing the previous sets of variables to change their column values to NULL, since I only used Seam annotations to start the Process (@CreateProcess)