9 Replies Latest reply on Nov 16, 2013 2:05 PM by swiderski.maciej

    SOA+BPM using Switchyard and jBPM6

    wpilar

      Hello!

       

      I tried to check, if JBPM6 and Switchyard is a platform for SOA+BPM used in the classical way:

       

      1) Switchyard is providing services

      2) JBPM is orchestrating them

       

      In addition I tried to check, if this is possible:

       

      3) KIE workbench is the tool for the business users working on the conceptual level

      4) Eclipse is a tool for developer, who reifies business level concepts

       

      I would like to describe my efforts and ask for advise and hints from anybody knowing anything about it, what went wrong and how to do it better.

       

      Software is still under development and therefore quite chaotical. I was using many different versions and also latest snapshots,

      looking here and there for something that works at all. In the end I don't know what I have, but I must wait until the final version arrives to clean it up.

      I hope also, that many of my problems described below will then disappear. But I don't regret my efforts, I have learnt a lot and I plan to drill down into the questions enumerated below.

       

      I couldn't find any sample which would fit. So I have started from switchyard-quickstart-bpm-service.

      SwitchYardServiceTaskHandler in this example is using local SwitchYardServiceInvoker.

      I wanted to separate BPM server from the Switchyard server, so I have changed it to RemoteInvoker.

      BPM process is not concerned about how the service is implemented, it just sends the request to Switchyard.

      Switchyard with its Camel can adapt the request and invoke any service implemented in any technology.

      For kie-wb I have added inside of jboss-deployment-structure.xml the needed Switchyard dependencies, but

      the registration of my SwitchYardRemoteServiceTaskHandler using CustomeWorkItemHandler.conf has failed.

       

      5) What is the problem?

       

      When searching for the resolution, I have found out, that I can register it using an implementation of WorkItemHandlerProducer and it worked.

      I have propomoted services from switchyard-quickstart-bpm-service using SCA binding to be able to invoke them remotely.

      Switchyard part was ready, process had to be created inside the BPM part.

       

      6) BPMN Designer is not a tool for the business user. It contains too many technical details difficult even for an experienced developer.

       

      7) There is no any tool for conceptual modeling present.

       

      Next challenge: in kie-wb importing of the Java model disappeared in comparison with previous versions.

       

      8) Is it by design? I am suspecting, that it can be provided as a Maven dependency.

       

      Not knowing what is the situation, I have decided to create the data model using the Data Modeler.

      (This is not what I wanted. I would rather expect, that data modelling is provided by specialized tools like TEEID).

      I have cloned the kie-wb into Eclipse, but the project doesn't build, pom.xml is not complete.

       

      9) Is kie-wb build using Maven build at all?

       

      I have adjusted pom.xml and recreated Switchyard services (They are not supposed to be touched, because they can come from anywhere).

       

      With Form Modeler I have created a process start form, which creates an object, object is passed to the process and used as the input parameter in a Switchyard task and it works. 

       

      Things to explore:

       

      11) How to use service registry? I don't need service repository. I need only one work item handler, which invokes Switchyard, Switchyard is using service repository to

      find the service implementation.

       

      12) Far future: how to use ontological tools for conceptual modeling.

       

      Conclusions:

       

      1) and 2) are possible. Now it's very hard, let's wait for the final version.

      3) and 4) can be dismissed.

       

      Wieslaw

        • 1. Re: SOA+BPM using Switchyard and jBPM6
          swiderski.maciej

          Glad to see such detailed analysis and overall interest.

          wieslaw pilarczyk wrote:

           

          Hello!

           

          I tried to check, if JBPM6 and Switchyard is a platform for SOA+BPM used in the classical way:

           

          1) Switchyard is providing services

          2) JBPM is orchestrating them

           

          In addition I tried to check, if this is possible:

           

          3) KIE workbench is the tool for the business users working on the conceptual level

          4) Eclipse is a tool for developer, who reifies business level concepts

           

          I would like to describe my efforts and ask for advise and hints from anybody knowing anything about it, what went wrong and how to do it better.

           

          Software is still under development and therefore quite chaotical. I was using many different versions and also latest snapshots,

          looking here and there for something that works at all. In the end I don't know what I have, but I must wait until the final version arrives to clean it up.

          I hope also, that many of my problems described below will then disappear. But I don't regret my efforts, I have learnt a lot and I plan to drill down into the questions enumerated below.

           

          I couldn't find any sample which would fit. So I have started from switchyard-quickstart-bpm-service.

          SwitchYardServiceTaskHandler in this example is using local SwitchYardServiceInvoker.

          I wanted to separate BPM server from the Switchyard server, so I have changed it to RemoteInvoker.

          BPM process is not concerned about how the service is implemented, it just sends the request to Switchyard.

          Switchyard with its Camel can adapt the request and invoke any service implemented in any technology.

          For kie-wb I have added inside of jboss-deployment-structure.xml the needed Switchyard dependencies, but

          the registration of my SwitchYardRemoteServiceTaskHandler using CustomeWorkItemHandler.conf has failed.

           

          5) What is the problem?

           

          When searching for the resolution, I have found out, that I can register it using an implementation of WorkItemHandlerProducer and it worked.

          I have propomoted services from switchyard-quickstart-bpm-service using SCA binding to be able to invoke them remotely.

          Switchyard part was ready, process had to be created inside the BPM part.

          what might be the problem is that registering work item handles via the conf file has its limitations - can only be registered if the class back be instantiated with default no arg constructor or constructor with single argument of type StatefullKnowledgeSession. Using producers gives much more flexibility and allows to bootstrap handler in mode advanced ways.

          wieslaw pilarczyk wrote:

           

          6) BPMN Designer is not a tool for the business user. It contains too many technical details difficult even for an experienced developer.

           

          7) There is no any tool for conceptual modeling present.

          it can be seen as such as well, although it provides end to end support for modeling and providing execution details from within same application - web designer. There is no need to fill in all details if you're not going to execute the process. So business users can put kind of a sketch of the process definition and then hand it over to technicians.

          wieslaw pilarczyk wrote:

           

          Next challenge: in kie-wb importing of the Java model disappeared in comparison with previous versions.

           

          8) Is it by design? I am suspecting, that it can be provided as a Maven dependency.

           

          Not knowing what is the situation, I have decided to create the data model using the Data Modeler.

          (This is not what I wanted. I would rather expect, that data modelling is provided by specialized tools like TEEID).

          I have cloned the kie-wb into Eclipse, but the project doesn't build, pom.xml is not complete.

           

          correct, now such model artifacts should be added as maven dependency. Depending on what you mean that it does not build? Does it build it kie-wb?

          wieslaw pilarczyk wrote:

           

          9) Is kie-wb build using Maven build at all?

           

          I have adjusted pom.xml and recreated Switchyard services (They are not supposed to be touched, because they can come from anywhere).

          what have you adjusted? What build errors did you get? Could you file a jira issue for that

          wieslaw pilarczyk wrote:

          Conclusions:

           

          1) and 2) are possible. Now it's very hard, let's wait for the final version.

          3) and 4) can be dismissed.

           

          what you mean it's very hard - due to lack of documentation or?

           

          Thanks a lot for very valuable feedback and to come through the SOA and BPM path, that is very much appreciated. Keep up the good feedback coming and feel free to contribute - file jira issues, provide docs, code, etc

          • 2. Re: SOA+BPM using Switchyard and jBPM6
            wpilar

            5) I couldn't find the code processing CustomWorkItemHandler.conf. Where is it?

             

            6) To be investigated. In case services are created outside of the Designer, it could be OK, if the process designer has access to some service registry. But if he wants to create new service, how can he describe them on the conceptual level?

             

            9) Data model uses annotations:

             

            @org.kie.api.definition.type.Position(value = 0)

            but pom.xml doesn't contain dependency on kie-api, so Maven build fails. Kie-wb build succeeds, therefore I conclude, that Maven build is not used.

             

            It's hard, because it's unstable. But it's not finished yet, so I hope it will improve.

            • 3. Re: SOA+BPM using Switchyard and jBPM6
              wpilar

              11) No user faced service registry viewer is available. S-ramp-ui is a low level technical editor. It confirms what I said initially in 6).

              • 4. Re: SOA+BPM using Switchyard and jBPM6
                swiderski.maciej

                wieslaw pilarczyk wrote:

                 

                5) I couldn't find the code processing CustomWorkItemHandler.conf. Where is it?

                 

                this is actually done as part of ksession initialization and it's inside AbstractWorkingMemory

                wieslaw pilarczyk wrote:

                 

                6) To be investigated. In case services are created outside of the Designer, it could be OK, if the process designer has access to some service registry. But if he wants to create new service, how can he describe them on the conceptual level?

                designer has service repository where you put your custom nodes aka work items. These are then available in designer pallete with all definitions such as data inputs and outputs. So they can be simple drag and drop on the canvas and added by that to process definition. Creating new service is more like creating new work item, then it's actually to the implementation (work item handler) to do the heavy work so to say.

                wieslaw pilarczyk wrote:

                 

                9) Data model uses annotations:

                 

                @org.kie.api.definition.type.Position(value = 0)

                but pom.xml doesn't contain dependency on kie-api, so Maven build fails. Kie-wb build succeeds, therefore I conclude, that Maven build is not used.

                kie wb uses embedded maven but since it has all the kie-api etc libs already on class path they are found. Could you please file jira issue for missing dependencies declaration for kjar projects so that can be added and next build outside of kie-wb?

                wieslaw pilarczyk wrote:

                 

                It's hard, because it's unstable. But it's not finished yet, so I hope it will improve.

                would be great if you could submit a jira for any issues you have found, otherwise it will be rather difficult to fix them if we are not aware of them. Have you tried recent snapshot of 6.0.x branch? This is pretty much what will be 6.0.0.Final.

                 

                HTH

                • 5. Re: SOA+BPM using Switchyard and jBPM6
                  swiderski.maciej

                  wieslaw pilarczyk wrote:

                   

                  11) No user faced service registry viewer is available. S-ramp-ui is a low level technical editor. It confirms what I said initially in 6).

                  check service repository section in jbpm documentation, might be something useful in your case.

                   

                  HTH

                  • 6. Re: SOA+BPM using Switchyard and jBPM6
                    wpilar
                    designer has service repository where you put your custom nodes aka work items. These are then available in designer pallete with all definitions such as data inputs and outputs. So they can be simple drag and drop on the canvas and added by that to process definition. Creating new service is more like creating new work item, then it's actually to the implementation (work item handler) to do the heavy work so to say.

                     

                    This is not what I want. Services are implemented outside of the process and in the process I have only on work item, which invokes them (to register it, I used the procedure described by you). Everything what I must provide is the name of the service, operation name and parameters wrapped in a message. I just need to see services and this tool

                     

                    https://github.com/Governance/s-ramp

                     

                    should help me to do it.

                    • 7. Re: SOA+BPM using Switchyard and jBPM6
                      swiderski.maciej

                      got it.

                       

                      Although you can still have dedicated work items for different services you're going to invoke with your process, just to have them separated even though they will be realized by the same handler. Of course this is not always needed.

                       

                      HTH

                      • 8. Re: SOA+BPM using Switchyard and jBPM6
                        wpilar

                        This is a longer discussion. Eric in his sample:

                         

                        http://www.schabell.org/2013/10/jboss-bpm-suite-rocking-the-mortgage-demo.html

                         

                        is using BPMN like a programming language and it is for me a very strange usage of it.

                        For programming I have programming languages and soon Java 8 with its functional capabilities will give me all the power, which I need.

                        What I miss is a service orchestration. Notion of services is present in IT from the dawn of time, they were many approaches to resolve the issue (like ebXML and BPEL)

                        and BPMN is the next attempt. My investigations aim to check, if we have a feasible solution.

                         

                        I don't want to implement any service and any work item. This is about separation of concerns. Services should be provided by external systems (possibly in the cloud).

                        I just want to use them. If I miss services, they must be implemented, but then I switch into another role and another environment.

                        I have implemented one work item, but I shouldn't be forced even to do it, because BPMN standard provides for it. I wouldn't need it, if this implementation:

                         

                        https://github.com/jboss-switchyard/components/blob/master/bpm/src/main/java/org/switchyard/component/bpm/service/StandardSwitchYardServiceTaskHandler.java

                         

                        would be more general and provide the location transparency.

                        • 9. Re: SOA+BPM using Switchyard and jBPM6
                          swiderski.maciej

                          I would say that approach described by you is more of traditional BPM which was at the beginning for service orchestration like BPEL etc. Where nowadays it's much more than that. In my opinion service orchestration is just one of the things it supports and in fact number of other technologies can provide you with support for it too like ESB - switchyard for instance. Of course using BPM for that is a valid scenario but we need to keep in mind it can do much more like human interaction, increased visibility of your business domain, alignment of IT and business etc.

                          Using default constructs of BPMN2 that allow quite a lot as it is generic and might be enough in some cases but in others it is simply too generic. The notion of work items is here to provide extension to what's in BPMN2 and to allow reuse of domain specific services within processes. So looking at this from business user point of view I agree, such person should not care about the definition of these services they should be created and provided as part of some kind of repository to them. And the IT personal should be responsible for defining work items for them to be available on design time. The reusability aspect is in my opinion the most important one. Of course you could always use the generic tasks e.g. Service Task but it might be difficult to make use of it in number of places as it would usually mean you need to create them multiple times. So idea of defining them once and then reuse is there for you.

                           

                          HTH