2 Replies Latest reply on Jul 20, 2011 3:52 AM by sonicool

    Problem with attaching super process

    sonicool

      Hello everybody,

      I have got a problem with jBPM which is making me crazy, and I would be grateful if somebody could help me. I am doing some kind of ‘migration application’, which aim is to to ‘replace’ the old process instance in database with the new one. I have got serious problem with doing this, when there is a super process to the instance which I am just changing (replacing).

       

      Here is an example:

      At the beginning the tables look like this:

      s1.png

       

      After this I am doing some ‘code work’ which looks more and less like this:

      ProcessInstance newProcessInstance = createNewInstance(….)

      Token superToken = oldProcessInstance.getSuperProcessToken();

       

      superToken.setSubProcessInstance(newProcessInstance);

      newProcessInstance.setSuperProcessToken(superToken);

       

      ctx.save(newProcessInstance)

       

       

      The result looks like this:

      s2.png

       

      So like you see, one reference from the super token is not being created. Could somebody help me with this?

       

      Regards,

      T.