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

Persisting in mappedvariable table comes null entry in its map_var_id

    XMLWordPrintable

Details

    • Bug
    • Resolution: Not a Bug
    • Major
    • None
    • None
    • None
    • None
    • False
    • False
    • NEW
    • NEW
    • Undefined
    • ---
    • ---

    Description

      Mapped variable info is lost if the primary key is provided.

      Steps to reproduce the problem:

      1. We used the same payload to start the process instance:
       

       {
           "Person": {
               "org.kvarela.pvp_example.Person": {
                   "age": 25,         
                   "name": "teste"     
                }
            }
       }
      

       

       jbpmdb=# select * from mappedvariable;
        mappedvarid | processinstanceid | taskid | variableid|          variabletype                 | optlock | workitemid | map_var_id 
       -----------------++-----------------------------++--------------------------------------------------------++------------------------------------------------------------------------------
                -38         |                    60           |            |        -27    | org.kvarela.pvp_example.Person | 0   |                    |        -27
       (1 row)
      
       jbpmdb=# select * from person;
        id  | age | name  
       -----++------------
        -27 |  25 | teste
       (1 row)
        
      

      2. to complete the task we used the following payload if I don't want a duplicate record from person table and you will see that that person is not duplicated, but the map_var_id field updates with null in mappedvariable table.

      {
          "person":{
             "org.kvarela.pvp_example.Person": {
                   "id": -27,
                   "name": "teste",
                   "age": 25             
             } 
           }
      }
       jbpmdb=# select * from person;
      
        id  | age | name  
       -----++------------
        -27 |  25 | teste
      
       (1 row)
      
      jbpmdb=# select * from mappedvariable;
      
        mappedvarid | processinstanceid | taskid | variableid|          variabletype                 | optlock | workitemid | map_var_id 
       -----------------++-----------------------------++--------------------------------------------------------++------------------------------------------------------------------------------
                -38         |                    60           |            |        -27    | org.kvarela.pvp_example.Person | 0   |                    |        
       (1 row)
        

      Attachments

        Issue Links

          Activity

            People

              elguardian@gmail.com Enrique González Martínez (Inactive)
              elguardian@gmail.com Enrique González Martínez (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: