2 Replies Latest reply on Oct 29, 2009 7:26 AM by Joram Barrez

    Store long strings as variables

    Adolf Grazou Newbie

      Hello,

      I am currently trying to store strings of various lengths into JBPM4 context.

      This works fine until the string reaches the maximum size defined in the database, then crashes.

      The behavior I am trying to obtain is the following :
      * String is stored as a String if shorted than the limit.
      * String is stored as a Blob if it longer than the limit.

      I have tried to remove the following line in the jbpm.variables.types.xml file :

      <type name="string" class="java.lang.String" variable-class="org.jbpm.pvm.internal.type.variable.StringVariable" />


      This works just fine, as all strings are saved a Blobs as Strings are Serializable . (which is not what I am aiming at).

      Is my understanding correct when I assume it is not possible to have my strings handled as Strings or as Blobs depending on their size just with configuration ?

      I was thinking of implementing another Variable class in order to replace org.jbpm.pvm.internal.type.variable.StringVariable and handle this. Does it make any sense or is there a much simpler way to do this ?