Uploaded image for project: 'jBPM'
  1. jBPM
  2. JBPM-2765

DB schema creation scripts were not updated after the introduction of the id generator

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: jBPM 4.3
    • Fix Version/s: jBPM 4.x
    • Component/s: Runtime Engine
    • Labels:
      None
    • Environment:

      Databases HSQLDB, MySQL, Oracle, PostgrasSql: if database tables where created using the sql-scripts in ${jbpm.home}/install/src/db/create

    • Workaround Description:
      Hide

      Workaround 1:

      • Letting hibernate do the creation of database tables.

      Workaround 2 (no good idea, because "signalProcessInstance" can't find ProcessInstance by ExecutionId):

      • Use integer-values as "key" in you processdefinition.
        e.g. use <process description="myDescription" key="123" name="myProcess" version="0" xmlns="http://jbpm.org/4.3/jpdl">
        instead of <process description="myDescription" key="anyString" name="myProcess" version="0" xmlns="http://jbpm.org/4.3/jpdl">
      Show
      Workaround 1: Letting hibernate do the creation of database tables. Workaround 2 (no good idea, because "signalProcessInstance" can't find ProcessInstance by ExecutionId): Use integer-values as "key" in you processdefinition. e.g. use <process description="myDescription" key="123" name="myProcess" version="0" xmlns="http://jbpm.org/4.3/jpdl"> instead of <process description="myDescription" key="anyString" name="myProcess" version="0" xmlns="http://jbpm.org/4.3/jpdl">

      Description

      org.jbpm.pvm.internal.model.ExecutionImpl.save() crashs with database-error.

      reason:

      • DatabaseIdComposer.createId(...) produces datatype string
      • but sql-Skripts create dbid-colums whose datatype is integer

      __________________________________________________________________________________________
      See more Details on: http://community.jboss.org/message/521822

      The reason of this problem can be found in org.jbpm.pvm.internal.id.DatabaseIdComposer.createId(...) which is called in org.jbpm.pvm.internal.model.ExecutionImpl.save() to initialize ExecutionImpl.dbid. Property dbid is mapped to database table JBPM4_EXECUTION (see: jbpm.execution.hbm.xml). As you can see in sql-files in ${jbpm.home}/src/db/create, the database-field-datatype of property DBID_ is a kind of integer. But DatabaseIdComposer.createId(...) produces String ...

      It seems that with the introduction of the id generator these scripts were not updated.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                Jan Scherf Jan Scherf
              • Votes:
                2 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: