5 Replies Latest reply on May 20, 2015 2:56 AM by Maciej Swiderski

    JPAPlaceholderResolverStrategy issue

    cristian blanaru Newbie

      Hi

       

      I am running JBPM 6.2 on JBOSS EAP 6.3.2 by using jbpm-services-ejb.

      Now I am trying persist custom variables to the database by using JPAPlaceholderResolverStrategy.

      The problem I am facing is that at marshalling new variables, the variable ID is serialized to process instance info, but the variable is not persisted in its custom table.

      If in JPAPlaceholderResolverStrategy, I add the entity manager flush on the marshalling new variable case

       

      if (id == null) {

                  em.persist(object);

                  id = getClassIdValue(object);

                  em.flush();

              } else {

                  em.merge(object);

                  // since this is invoked by marshaller it's safe to call flush

                  // and it's important to be flushed so subsequent unmarshall operations

                  // will get update content especially when merged

                  em.flush();

              }

       

      everything works fine.

       

      Do you have any thoughts on this issue ?

       

      Thanks