<!--
# This file specifies how jbpm will store variables into the database.
#
# If jbpm needs to determine how to store a variable into the database, 
# the jbpm-types below or scanned in sequence as they are specified here.
# For each jbpm-type, jbpm will see if the give variable object matches 
# with the matcher bean.  If there is a match, the converter (optional)
# and the variable instance will be used to store and retrieve 
# the variable value for the rest of its lifetime till the variable is 
# deleted. 
-->
<jbpm-types>

  <list name="jbpm.types" singleton="true">
  
    <!-- java.lang.String -->
    <jbpm-type>
      <matcher>
        <bean class="org.jbpm.context.exe.matcher.ClassNameMatcher">
          <field name="className"><string value="java.lang.String" /></field>
        </bean>
      </matcher>
      <variable-instance class="org.jbpm.context.exe.variableinstance.StringInstance" />
    </jbpm-type>
      
    <!-- java.lang.Boolean -->
    <jbpm-type>
      <matcher>
        <bean class="org.jbpm.context.exe.matcher.ClassNameMatcher">
          <field name="className"><string value="java.lang.Boolean" /></field>
        </bean>
      </matcher>
      <converter class="org.jbpm.context.exe.converter.BooleanToStringConverter" />
      <variable-instance class="org.jbpm.context.exe.variableinstance.StringInstance" />
    </jbpm-type>
      
    <!-- java.lang.Character -->
    <jbpm-type>
      <matcher>
        <bean class="org.jbpm.context.exe.matcher.ClassNameMatcher">
          <field name="className"><string value="java.lang.Character" /></field>
        </bean>
      </matcher>
      <converter class="org.jbpm.context.exe.converter.CharacterToStringConverter" />
      <variable-instance class="org.jbpm.context.exe.variableinstance.StringInstance" />
    </jbpm-type>
      
    <!-- java.lang.Long -->
    <jbpm-type>
      <matcher>
        <bean class="org.jbpm.context.exe.matcher.ClassNameMatcher">
          <field name="className"><string value="java.lang.Long" /></field>
        </bean>
      </matcher>
      <variable-instance class="org.jbpm.context.exe.variableinstance.LongInstance" />
    </jbpm-type>

    <!-- java.lang.Byte -->
    <jbpm-type>
      <matcher>
        <bean class="org.jbpm.context.exe.matcher.ClassNameMatcher">
          <field name="className"><string value="java.lang.Byte" /></field>
        </bean>
      </matcher>
      <converter class="org.jbpm.context.exe.converter.ByteToLongConverter" />
      <variable-instance class="org.jbpm.context.exe.variableinstance.LongInstance" />
    </jbpm-type>
  
    <!-- java.lang.Short -->
    <jbpm-type>
      <matcher>
        <bean class="org.jbpm.context.exe.matcher.ClassNameMatcher">
          <field name="className"><string value="java.lang.Short" /></field>
        </bean>
      </matcher>
      <converter class="org.jbpm.context.exe.converter.ShortToLongConverter" />
      <variable-instance class="org.jbpm.context.exe.variableinstance.LongInstance" />
    </jbpm-type>
  
    <!-- java.lang.Integer -->
    <jbpm-type>
      <matcher>
        <bean class="org.jbpm.context.exe.matcher.ClassNameMatcher">
          <field name="className"><string value="java.lang.Integer" /></field>
        </bean>
      </matcher>
      <converter class="org.jbpm.context.exe.converter.IntegerToLongConverter" />
      <variable-instance class="org.jbpm.context.exe.variableinstance.LongInstance" />
    </jbpm-type>
  
    <!-- java.lang.Double -->
    <jbpm-type>
      <matcher>
        <bean class="org.jbpm.context.exe.matcher.ClassNameMatcher">
          <field name="className"><string value="java.lang.Double" /></field>
        </bean>
      </matcher>
      <variable-instance class="org.jbpm.context.exe.variableinstance.DoubleInstance" />
    </jbpm-type>
  
    <!-- java.lang.Float -->
    <jbpm-type>
      <matcher>
        <bean class="org.jbpm.context.exe.matcher.ClassNameMatcher">
          <field name="className"><string value="java.lang.Float" /></field>
        </bean>
      </matcher>
      <converter class="org.jbpm.context.exe.converter.FloatToDoubleConverter" />
      <variable-instance class="org.jbpm.context.exe.variableinstance.DoubleInstance" />
    </jbpm-type>
  
    <!-- java.util.Date -->
    <jbpm-type>
      <matcher>
        <bean class="org.jbpm.context.exe.matcher.ClassNameMatcher">
          <field name="className"><string value="java.util.Date" /></field>
        </bean>
      </matcher>
      <variable-instance class="org.jbpm.context.exe.variableinstance.DateInstance" />
    </jbpm-type>

    <!-- org.alfresco.repo.workflow.jbpm.JBPMNode -->
    <jbpm-type>
      <matcher>
        <bean class="org.jbpm.context.exe.matcher.ClassNameMatcher">
          <field name="className"><string value="org.alfresco.repo.workflow.jbpm.JBPMNode" /></field>
        </bean>
      </matcher>
      <converter class="org.alfresco.repo.workflow.jbpm.NodeConverter" />
      <variable-instance class="org.jbpm.context.exe.variableinstance.StringInstance" />
    </jbpm-type>
  
    <!-- org.alfresco.repo.workflow.jbpm.JBPMNodeList -->
    <jbpm-type>
      <matcher>
        <bean class="org.jbpm.context.exe.matcher.ClassNameMatcher">
          <field name="className"><string value="org.alfresco.repo.workflow.jbpm.JBPMNodeList" /></field>
        </bean>
      </matcher>
      <converter class="org.alfresco.repo.workflow.jbpm.NodeListConverter" />
      <variable-instance class="org.jbpm.context.exe.variableinstance.ByteArrayInstance" />
    </jbpm-type>

    <!-- byte[] -->
    <jbpm-type>
      <matcher>
        <bean class="org.jbpm.context.exe.matcher.ClassNameMatcher">
          <field name="className"><string value="[B" /></field>
        </bean>
      </matcher>
      <converter class="org.jbpm.context.exe.converter.BytesToByteArrayConverter" />
      <variable-instance class="org.jbpm.context.exe.variableinstance.ByteArrayInstance" />
    </jbpm-type>
  
    <!-- java.io.Serializable -->
    <jbpm-type>
      <matcher>
        <bean class="org.jbpm.context.exe.matcher.SerializableMatcher" />
      </matcher>
      <converter class="org.jbpm.context.exe.converter.SerializableToByteArrayConverter" />
      <variable-instance class="org.jbpm.context.exe.variableinstance.ByteArrayInstance" />
    </jbpm-type>
  
    <!-- hibernatable long id types -->
    <jbpm-type>
      <matcher>
        <bean class="org.jbpm.context.exe.matcher.HibernateLongIdMatcher" />
      </matcher>
      <variable-instance class="org.jbpm.context.exe.variableinstance.HibernateLongInstance" />
    </jbpm-type>
  
    <!-- hibernatable string id types -->
    <jbpm-type>
      <matcher>
        <bean class="org.jbpm.context.exe.matcher.HibernateStringIdMatcher" />
      </matcher>
      <variable-instance class="org.jbpm.context.exe.variableinstance.HibernateStringInstance" />
    </jbpm-type>
  
    <!-- hibernatable ejb3 types -->
    <jbpm-type>
      <matcher>
        <bean class="org.jbpm.context.exe.matcher.Ejb3Matcher" />
      </matcher>
      <variable-instance class="org.jbpm.context.exe.variableinstance.Ejb3Instance" />
    </jbpm-type>
    
  </list>

</jbpm-types>
