6 Replies Latest reply on Oct 22, 2009 4:39 AM by Sebastian Schneider

    Some bugs and feature requests on jBPM 4.1

    Bernd Ruecker Master

      Hey guys.

      On a workshop at the customer this week we used jBPM 4.1 for a prototype, which we created on the fly. There are some issues I found on the way. Unofrtunately I don't have the time now to really investigate all of them, but I wanted to document them at least here!

      1. Classloading problems
      When you put you EventHandlers, Java delegation classes and/or process variable types in an EJB3 deployment and redeploy that, jBPM still holds a reference to the old class definitions, which results in class cast exceptions. My guess is, that this is becasue EventHandler and such are reused/pooled? So there we might have to discuss, what scenario we want to support.

      2. Invalid types.xml doesn't result in a parsing error
      We changed the types mapping and had a small XML error in that file. But this didn't resulted in a parsing exception, the parsing just stopped at this line and our type mapping wasn't read (which puzzled us for quite a while ;-)):

       <type name="..." class="..." variable-class="...EntityVariable"> <!-- end tag was missing! -->
       <type name="serializable" class="serializable"
       converter="org.jbpm.pvm.internal.type.converter.SerializableToBytesConverter"
      variable-class="org.jbpm.pvm.internal.type.variable.BlobVariable" />
      


      Now every Serializable process variable was rejected...


      Some issues I maybe just don't know how to do it:

      3. Bind e.g. integer value to EventListener field by expression
      This didn't work, and I don't know how to get it to work:

       <custom class="de...jbpm.NoopActivity" g="83,61,143,50" name="xxx">
       <on event="start">
       <event-listener class="de.....SomeEvenetListener">
       <field name="programm"><int value="#{programm}"/></field>
       </event-listener>
       </on>
       <transition g="14,-11" name="ok" to="b"/>
       </custom>
      

      The only possibility with expressions seems to be the which results in a field type doesn't match problem:
       <custom class="de...jbpm.NoopActivity" g="83,61,143,50" name="xxx">
       <on event="start">
       <event-listener class="de.....SomeEvenetListener">
       <field name="programm"><object expr="#{programm}"/></field>
       </event-listener>
       </on>
       <transition g="14,-11" name="ok" to="b"/>
       </custom>
      



      Some feature requests:

      4. Should be possible to set Subprocess Key by expression
      If you start a nw sub process instance, this normally has no special key, thus a key is created for it. It would be really convinient, if the main process could influence the sub process key by an expression (e.g. "#{execution.key}.SubXX.#{someUniqueVariableForIt}). maybe this need some more thoughts (what in case the key is not unique? ...?), but I think it could get handy in lot of situations.

      And there are some pretty annoying issues in thee GPD, which should be fixed ASAP:

      5. Writing in propteries panel is reversed
      I am pretty sure this bug is known (as I remeber it right, Koen showed it to me once). Would be pretty good to fix it anyway.

      6. type of is removed by the GPD sometimes
      In the workshop the type attribute disappeared a couple of times (but only this attribute). Don't know when and why exactly, but this is really annoying. This is the example from the workshop:

       <java class="de....service...Service" g="118,66,112,52" method="druckeEtikett" name="Etiketten drucken">
       <arg type="long"><object expr="#{xxx.charge.id}"/></arg>
       <arg type="java.lang.String"><object expr="#{xxx.ident}"/></arg>
       <arg><object expr="#{xxx.number}"/></arg>
       <transition g="-135,-18" name="to Zustand erfassen" to="Zustand erfassen"/>
       </java>
      


      7. Signavio
      by the way, using the Signavio Editor for a already running process results in a lot of attributes beeing removed when saving with Signavio. It should be somehow the default, to keep everything, it doesn't know. I think I remember a discussion, that this is pretty hard to implement. But I think it is crucial for real live use cases. At least for use cases I have in mind for Business-/-Alignment. But maybe we can discuss that in the next meeting in Berlin.

      And last but not least I started to implement

      8. Support EJB3 Entities as process variables
      I think this is a pretty important feature, since a lot of projeects start with EJB3 today. Since Tom fixed a bug in the binding code, I think I can go ahead with that. Will post something as soon I had time to work on it again. If anybody else putting effort into this, please let me know!


      Puh, this is it. Sorry for the long post and not splitting it into several posts, looking up or creating JIRA-Issues. I really have to work on the book today, just wanted to have it documented. Maybe some of you can tackle some of the issues, otherwise I will come back to it as soon there is some time for it.

      Cheers
      Bernd

        • 1. Re: Some bugs and feature requests on jBPM 4.1
          Sebastian Schneider Master

          Wow that's quite a lot of valueable feedback. :)
          How do we ensure these issues are all in JIRA?

          The issue with reversed values is already in JIRA. I updated the name of the issue to ensure it's easier to find:

          https://jira.jboss.org/jira/browse/GPD-372

          • 2. Re: Some bugs and feature requests on jBPM 4.1
            Joram Barrez Master

             

            "camunda" wrote:
            1. Classloading problems
            When you put you EventHandlers, Java delegation classes and/or process variable types in an EJB3 deployment and redeploy that, jBPM still holds a reference to the old class definitions, which results in class cast exceptions. My guess is, that this is becasue EventHandler and such are reused/pooled? So there we might have to discuss, what scenario we want to support.


            Eventhandlers, custom activities, etc were indeed instantiated at deploytime and pooled. Tom has recentlry changed this behaviour to instantiation at runtime (saves me a lot of hassle when deploying outside a project).

            But I still think the instances are pooled afterwards, for performance reasons. So imo, this is a bug and needs to be fixed. In the meantime, you can restart the processEngine after a deploy as a 'workaround' (albeit not a good one...)

            "camunda" wrote:

            2. Invalid types.xml doesn't result in a parsing error
            We changed the types mapping and had a small XML error in that file. But this didn't resulted in a parsing exception, the parsing just stopped at this line and our type mapping wasn't read (which puzzled us for quite a while ;-)):

             <type name="..." class="..." variable-class="...EntityVariable"> <!-- end tag was missing! -->
             <type name="serializable" class="serializable"
             converter="org.jbpm.pvm.internal.type.converter.SerializableToBytesConverter"
            variable-class="org.jbpm.pvm.internal.type.variable.BlobVariable" />
            


            Now every Serializable process variable was rejected...


            Indeed a 'nice to have' feature ... should be easy to catch and log.

            "camunda" wrote:

            3. Bind e.g. integer value to EventListener field by expression
            This didn't work, and I don't know how to get it to work:

             <custom class="de...jbpm.NoopActivity" g="83,61,143,50" name="xxx">
             <on event="start">
             <event-listener class="de.....SomeEvenetListener">
             <field name="programm"><int value="#{programm}"/></field>
             </event-listener>
             </on>
             <transition g="14,-11" name="ok" to="b"/>
             </custom>
            

            The only possibility with expressions seems to be the <object> which results in a field type doesn't match problem:
             <custom class="de...jbpm.NoopActivity" g="83,61,143,50" name="xxx">
             <on event="start">
             <event-listener class="de.....SomeEvenetListener">
             <field name="programm"><object expr="#{programm}"/></field>
             </event-listener>
             </on>
             <transition g="14,-11" name="ok" to="b"/>
             </custom>
            



            The first code snippet should indeed work. Probably a bug.

            "camunda" wrote:

            4. Should be possible to set Subprocess Key by expression
            If you start a nw sub process instance, this normally has no special key, thus a key is created for it. It would be really convinient, if the main process could influence the sub process key by an expression (e.g. "#{execution.key}.SubXX.#{someUniqueVariableForIt}). maybe this need some more thoughts (what in case the key is not unique? ...?), but I think it could get handy in lot of situations.


            I've heard this request from someone else too. Besides have an easier overview with multiple subprocesses, what other benefits do you see?

            "camunda" wrote:

            7. Signavio
            by the way, using the Signavio Editor for a already running process results in a lot of attributes beeing removed when saving with Signavio. It should be somehow the default, to keep everything, it doesn't know. I think I remember a discussion, that this is pretty hard to implement. But I think it is crucial for real live use cases. At least for use cases I have in mind for Business-/-Alignment. But maybe we can discuss that in the next meeting in Berlin.


            I agree. I got the same feedback from a meeting with real-life users. Also, the other way around (from Eclipse -> Signavio) doesn't always work well regarding coordinates, it seems.

            "camunda" wrote:

            8. Support EJB3 Entities as process variables
            I think this is a pretty important feature, since a lot of projeects start with EJB3 today. Since Tom fixed a bug in the binding code, I think I can go ahead with that. Will post something as soon I had time to work on it again. If anybody else putting effort into this, please let me know!


            The idea is to have a native activity for EJB3 invocations. If im correct, it was scheduled for 4.3.


            • 3. Re: Some bugs and feature requests on jBPM 4.1
              Ronald van Kuijk Master

               

              "jbarrez" wrote:

              "camunda" wrote:

              8. Support EJB3 Entities as process variables
              I think this is a pretty important feature, since a lot of projeects start with EJB3 today. Since Tom fixed a bug in the binding code, I think I can go ahead with that. Will post something as soon I had time to work on it again. If anybody else putting effort into this, please let me know!


              The idea is to have a native activity for EJB3 invocations. If im correct, it was scheduled for 4.3.


              Isn't there a difference between EJB3 invocations (SFSB, SLSB) and Entity(beans)? Bernd talks about the latter, while you talk about the former.

              In combination with the former, integration with Seam (components) should also have a high priority. Personally I'd not have a separate EJB activity, but extend the java activity in such a way that (component)resolvers are used to find the SLSB/SFSB/Seam component/Springbean by name

              • 4. Re: Some bugs and feature requests on jBPM 4.1
                Joram Barrez Master

                 

                "kukeltje" wrote:
                "jbarrez" wrote:

                "camunda" wrote:

                8. Support EJB3 Entities as process variables
                I think this is a pretty important feature, since a lot of projeects start with EJB3 today. Since Tom fixed a bug in the binding code, I think I can go ahead with that. Will post something as soon I had time to work on it again. If anybody else putting effort into this, please let me know!


                The idea is to have a native activity for EJB3 invocations. If im correct, it was scheduled for 4.3.


                Isn't there a difference between EJB3 invocations (SFSB, SLSB) and Entity(beans)? Bernd talks about the latter, while you talk about the former.

                In combination with the former, integration with Seam (components) should also have a high priority. Personally I'd not have a separate EJB activity, but extend the java activity in such a way that (component)resolvers are used to find the SLSB/SFSB/Seam component/Springbean by name


                Right ... in my head EJB3 = SF/SL session beans and JPA is something else ... probably has to do something with bad EJB2 entity memories. So sorry for not reading the remark correctly.

                Anyway. Afaik, the current plan is to extends the java activity with EJB capabilities and not create a new activity type.

                • 5. Re: Some bugs and feature requests on jBPM 4.1
                  Bernd Ruecker Master

                   

                  Joram wrote:

                  2. Invalid types.xml doesn't result in a parsing error

                  Indeed a 'nice to have' feature ... should be easy to catch and log.

                  No, I think logging is not appropriate. The XML is wrong, so it should throw an exception!

                  Joram wrote:

                  4. Should be possible to set Subprocess Key by expression

                  I've heard this request from someone else too. Besides have an easier overview with multiple subprocesses, what other benefits do you see?


                  If you have to externally signal that sub process you have to search it by key (since searching by process variables is not yet possible and maybe ineffective). But therefor you need a possibility to specify the key on creation to use it later to query the right process instance.

                  Joram wrote:

                  7. Signavio

                  I agree. I got the same feedback from a meeting with real-life users. Also, the other way around (from Eclipse -> Signavio) doesn't always work well regarding coordinates, it seems.

                  Yesterday I got a NPE when opening a process from Eclipse in Signavio (unfortantely in a live presentation ;-) Anyway, so for sure there is still some work to do in that area ;-)


                  8. Support EJB3 Entities as process variables


                  Yes, Ronald is right. How to use SLSB as variable? ;-) The other feature is nice as well, but EJB3 Entities is more important for me at the moment. But since both makes sense, cool to hear there is some progress in that area.

                  You should be totally releaxed after your honemoon, eh?

                  Can you create the bugs as JIRA issues? That would be really cool, otherwise I will do it hopefully next week.