7 Replies Latest reply on Aug 10, 2006 1:45 PM by jmjava

    Programmatically creating workflows

    jmjava

      Is there an API where you can create workflows - or better yet - customize existing workflows via Java?

      For instance we want to create a program that defines base workflow templates but allows managers to customize the workflow for a particular individual - is this possible in JBPM?

        • 1. Re: Programmatically creating workflows
          kukeltje

          Did you look at the documentation and examples/testcases? This is possible, but watch out with managers customizing workflows. Read all blog by Tom. It depends what you mean by customizing. Changing some parameters or changing flow. If the latter is the case you need an editor for it. Then you most likely want it web based... right... Lots of issues arise then. How do you test these for errors? Do you allow them to do it in production? etc..etc...etc.... I've advised people internally at the company I work for to NOT do this... I mean do not have managers or customers change processes themselves. I know, the business want to skip the tech people, but instead of having them do it themselves (yuck) create a new role, 'process designer' who does some invisible tech work on the days the business suite is not there and use a graphical designer if he is... Works perfectly here.

          • 2. Re: Programmatically creating workflows
            jmjava

             

            "kukeltje" wrote:
            I've advised people internally at the company I work for to NOT do this... I mean do not have managers or customers change processes themselves. I know, the business want to skip the tech people, but instead of having them do it themselves (yuck) create a new role, 'process designer' who does some invisible tech work on the days the business suite is not there and use a graphical designer if he is... Works perfectly here.


            I understand that in most use cases where JBPM will be used workflow can be controlled by the tech people, but in our use case having managers customize the workflow per person is integral to the solution. What i was hoping is that we could create tested pieces of workflow (possibly define workflow segments that are fully debugged) then allow managers to combine these segments into a "master" workflow.

            I don't know alot about JBPM at the moment and i'm not sure JBPM is the product for us - we may need something more flexible. It sounds like JBPM is designed to be used in a set manner. I think we may need something more flexible.





            • 3. Re: Programmatically creating workflows
              kbarfield

               

              "jmjava" wrote:

              I don't know alot about JBPM at the moment and i'm not sure JBPM is the product for us - we may need something more flexible. It sounds like JBPM is designed to be used in a set manner. I think we may need something more flexible.


              jBPM is very flexible, and can do what you are describing. kukeltje was just warning to make sure your solution would be maintainable in the long term. I can see a couple of different ways of doing this:

              1. Break the overall process into several sub-processes. These sub-processes are then called by the "master" workflow. This would give you greater independence with editting each sub process.
              2. Are the actual customizations you need changing the fundalemental flow of the process? For instance, are you going from a process that was A>B>C to H>Q>U>V? Or is it the case that the process variables and who gets assigned tasks what is changing? The later case is more of what we see, and for these types of cases you can use JBoss Rules with jBPM and have the rules be different for the different scenarios, not the underlying process definition.

              • 4. Re: Programmatically creating workflows
                kukeltje

                I totally agree with Kevin

                • 5. Re: Programmatically creating workflows
                  jmjava

                   

                  "kbarfield" wrote:



                  2. Are the actual customizations you need changing the fundalemental flow of the process? For instance, are you going from a process that was A>B>C to H>Q>U>V? Or is it the case that the process variables and who gets assigned tasks what is changing? The later case is more of what we see, and for these types of cases you can use JBoss Rules with jBPM and have the rules be different for the different scenarios, not the underlying process definition.


                  At a task level i think my workflow will remain the same. ( I can define pieces of workflow that remain constant) It's just the combination and order of execution that may vary so i may fall into the A>B>C to H>Q>V category

                  Are you saying that this is not possible programatically?







                  • 6. Re: Programmatically creating workflows
                    kbarfield

                     

                    "jmjava" wrote:


                    At a task level i think my workflow will remain the same. ( I can define pieces of workflow that remain constant) It's just the combination and order of execution that may vary so i may fall into the A>B>C to H>Q>V category

                    Are you saying that this is not possible programatically?



                    jBPM can do what you are talking about. It is very flexible, and you can programatically create processes, update processes, etc. All we were suggesting were some best practices based upon what we have seen. If you feel that you will need to change processes dynamically for your application, you can do it.

                    • 7. Re: Programmatically creating workflows
                      jmjava

                       

                      "kbarfield" wrote:


                      jBPM can do what you are talking about. It is very flexible, and you can programatically create processes, update processes, etc. All we were suggesting were some best practices based upon what we have seen. If you feel that you will need to change processes dynamically for your application, you can do it.


                      that's great news - thanks for clearing that up