7 Replies Latest reply on Feb 2, 2010 3:59 AM by sebastian.s

    jBPM 4.3 - Multiple values (types) in JBPM4_VARIABLE for single entry.

    jedizippy

      Hi,

       

      We are running into an issue where we end up with an entry in the JBPM4_VARIABLE table for a process execution variable that has two different values (types). The value should have a Long (numeric type) and most of the time it does. However it seems that the value of a different (String) process execution variable is also updated on the same row and hence this causes exceptions later then attempting to read the value as the String value is returned rather than the log.

       

      Has anyone else seen this before. It occurs with parameters passed into a subprocess.

       

      Regards

      Martin

        • 1. Re: jBPM 4.3 - Multiple values (types) in JBPM4_VARIABLE for single entry.
          sebastian.s
          Can you supply a unit test demonstrating the problem? I guess without it will be hard to reproduce the error and thus to help you.
          • 2. Re: jBPM 4.3 - Multiple values (types) in JBPM4_VARIABLE for single entry.
            jedizippy

            Hi,

             

            Unfortunately its not that easy to reproduce. It seems to occur randomly and we have so far not been able to identify the cause. We send in 5 parameters into each subprocess and it seems that one of these parameters (String) ends up in the same row as a value that is created inside a DecisionHandler java class. I will try and see if we can figure out what might be causing it.

             

            We are having major issues with ID generation at the moment and have implemented our own ID Generator to see if we can cure the problem. Maybe that will also solve this issue.I will update this thread if I find anything out.

             

            Regards

            Martin

            • 3. Re: jBPM 4.3 - Multiple values (types) in JBPM4_VARIABLE for single entry.
              sebastian.s
              But how does your process look like?? So you've got a sub-process activity and afterwards the decision node?
              • 4. Re: jBPM 4.3 - Multiple values (types) in JBPM4_VARIABLE for single entry.
                jedizippy

                The main process is just a sequence of calls to the sub-process with continue="async". The subprocess calls a <custom> task first and then goes to a decision to evaluate the status of the custom. Then moves to a <custom> which implements ExternalActivityBehaviour and does a waitForSignal(). There is some retry handling and a timer on the ExternalActvitvityBehaviour node in case no response comes back which goes to a <task>. Thats about it. Its pretty simple stuff.

                 

                For each sub-process we pass in 3 parameters and we find that one of these parameters (String orderId) is being written into a value that also contains a Long which is created in the ExternalActvitvityBehaviour node using execution.setVariable(). So it looks like somehow the process inbound parameters are getting mixed up with ones created manually in the java code.

                 

                I read something that in 4.3 process parameters are automatically persisted now but we dont use that feature. We explicitly call setVariable() when we need to store something. The code is quite simple so it looks definitely like a bug. Problem is that its hard to reproduce.

                 

                As for the unique id generation issue we are seeing it seems to be related to JTA/Transactions so maybe when something gets rolled back this triggers the problem. Will see how it goes in next days if we see it again or not.

                 

                Sadly we can get any info on the JTA confiuration for 4.3 as no one seems to know which .cf.xml to use. The one detailed in the docs wont work on any other app server than JBoss and I still can get an answer on if jbpm.tx.jta.cfg.xml should be used or not (see previous post on transactions).

                 

                REgards

                Martin

                • 5. Re: jBPM 4.3 - Multiple values (types) in JBPM4_VARIABLE for single entry.
                  sebastian.s
                  Have you tried using a database-provided generator (like a sequence) instead of the new jBPM generator?
                  • 6. Re: jBPM 4.3 - Multiple values (types) in JBPM4_VARIABLE for single entry.
                    jedizippy

                    Hi,

                     

                    Yes we have implemented our own ID Generator using Oracle Sequence. This seems in the short term to have fixed the issues with Integrity Constraint Violations but we still now have this issue with process variables.

                     

                    Regads

                    Martin

                    • 7. Re: jBPM 4.3 - Multiple values (types) in JBPM4_VARIABLE for single entry.
                      sebastian.s
                      Sorry, I overlooked this. Unfortunately 'm afraid without providing a unit-test demonstrating the problem it will be hard to help you.