4 Replies Latest reply on Dec 6, 2006 5:47 AM by kukeltje

    Extension point for Transactions

    pirx

      jBpm provides fine extensions points for Nodes, Actions and the like
      when defining the workflow with JDPL. Unfortunately, Transitions can't
      be extended in a similar fashion and are always connected to the
      default implementation provided by jBpm when using JDPL.

      I now have a use case, where I want to add a type attribute to a
      Transition needed by some node for a decision which leaving transition to take. Actually, I do this by keeping the transition-type
      association in the surrounding node, but this is obviously redundant.

      Example:

       <x-state>
       <transition name='to-s' to='s'/>
       <transition-types>
       <transition name='to-s' type="manual"/>
       </transition-types>
       </x-state>
      


      With the possibility of an extension of this transition this could be
      reduced to:

       <x-state>
       <x-transition type='manual' to='s'/>
       </x-state>
      


      Introducing this into JpdlXmlReader.resolveTransitionDestination()
      shouldn't be difficult and is perfectly backwards compatible. If you
      like, I could do it and provide a patch.

      Is there any chance to get an extension mechanism for transistions
      into jBpm ?

        • 1. Re: Extension point for Transactions
          pirx

          Subject should be 'Extension point for Transitions', of course ....

          • 2. Re: Extension point for Transactions
            kukeltje

            why not simply use an event on the transition and set a processvariable. Even more backwards compatible and not that different.

            The reason I mention this is that there are so many usecases wich can be solved by extending jPDL but also by using the actions on events. extending jPDL is not that trivial and Tom is (for good reason) hasitant to do this in minor releases. There are some changes on the roadmap for 4.0 but not sure if this will be one of them.

            • 3. Re: Extension point for Transitions
              pirx

               

              "kukeltje" wrote:
              why not simply use an event on the transition and set a processvariable. Even more backwards compatible and not that different.


              I definetly agree with you that extending jPDL should be the last option. But
              in my use case I need to obtain list of transitions of a certain type
              'manual' which can be presented to a user in a UI for selection. Transitions
              of type 'timed', which are triggered by some schedule should be hidden
              instead. I couldn't find any existing jBPM feature which supports this sort of
              use case, but if you could point out how to do this right now, I would be
              very happy.

              BTW, IMO my suggestion is in so far consequent as every other central
              element in jPDL like Actions or Nodes are customizable via extension
              except for Transitions. And it is not an extension to jPDL syntax but
              only yet another hook, so I don't see any problems to introduce this into a
              minor release.





              • 4. Re: Extension point for Transactions
                kukeltje

                Ok, so what you basically want are 'guarded' transitions. That IS on the roadmap for at least 4.0, maybe 3.3. Look in the Jira