1 2 3 Previous Next 31 Replies Latest reply on Jul 7, 2014 1:39 AM by swiderski.maciej

    jBPM 6 Deploy a process from Java code

    zen1800

      Is there a way to deploy a process into jBPM6 without using the KIE workbench?

       

      I have some java automation code that I want to be able to make a call (REST, java package, whatever) to remotely deploy a process on an existing jBPM environment.

        • 1. Re: jBPM 6 Deploy a process from Java code
          swiderski.maciej

          take a look at kie-config-cli that allows you to deploy stuff via command line even for remote installations of KIE workbench.

           

          HTH

          • 2. Re: jBPM 6 Deploy a process from Java code
            zen1800

            This does appear to be what I want, but I have been unable to find a way to hook into a remote KIE workbench. Where/how is this done?

            • 3. Re: jBPM 6 Deploy a process from Java code
              swiderski.maciej

              while starting kie-config-cli it will ask for location of git repository that is hosted on kie workbench by default it's git://localhost/system but you can reconfigure this with org.uberfire.nio.git.daemon.host system property on the application server then you would access it via git://{host}/system

               

              Please note that the remote capabilities were added rather recently so it will not be possible in CR2.

               

              HTH

              • 4. Re: jBPM 6 Deploy a process from Java code
                zen1800

                So what sort of value does org.uberfire.nio.git.daemon.host need to be set to? Is it just the host name of the remote server? And is this property along with any other ones documented somewhere for me to reference?

                • 5. Re: jBPM 6 Deploy a process from Java code
                  holmeson

                  Hi Maciej:

                      I designed a project in eclipse, how can i deploy it into web-console? I remember that there was a plug-in in jBPM 5 which can do this thing, but i cann't find it in jBPM6.

                      I also have a question. I remember that  all process definitions are deployed into database in jBPM3. Does jBPM6 do the same thing?

                      thanks a lot!

                  tian chen

                  • 6. Re: jBPM 6 Deploy a process from Java code
                    swiderski.maciej

                    Ryan Curd wrote:

                     

                    So what sort of value does org.uberfire.nio.git.daemon.host need to be set to? Is it just the host name of the remote server? And is this property along with any other ones documented somewhere for me to reference?

                    yes, it should be the host on which git server will be available. Here you can find documentation of different config options for the web app.

                    • 7. Re: jBPM 6 Deploy a process from Java code
                      swiderski.maciej

                      tian chen wrote:

                       

                      Hi Maciej:

                          I designed a project in eclipse, how can i deploy it into web-console? I remember that there was a plug-in in jBPM 5 which can do this thing, but i cann't find it in jBPM6.

                      in general the console now operates on kjars which is a maven project with single descriptor kmodule.xml that defines it's config in terms of kbase and ksession.  So you would need to build such jar with maven. You can use this archetype to simplify project creation. Project can be build in eclipse and if the console runs on same machine it can be simply installed using UI (Deployments panel) or kie-config-cli as mentioned above.

                       

                      tian chen wrote:

                          I also have a question. I remember that  all process definitions are deployed into database in jBPM3. Does jBPM6 do the same thing?

                      no, jbpm 5 and 6 does not store process definitions in data base. jBPM 6 uses maven repository as the source of artifacts to deploy and once requested fetches them from remote repository.

                       

                      HTH

                      • 8. Re: jBPM 6 Deploy a process from Java code
                        zen1800

                        Maciej Swiderski wrote:

                         

                        Please note that the remote capabilities were added rather recently so it will not be possible in CR2.

                         

                         

                         

                        When you say CR2, do you mean jBPM CR2 or just the kie-config-cli 6.0.0.CR2?

                        • 9. Re: jBPM 6 Deploy a process from Java code
                          swiderski.maciej

                          they use same version number, you can use 6.0.0.Final now.

                           

                          HTH

                          • 10. Re: jBPM 6 Deploy a process from Java code
                            zen1800

                            So I'm trying to run a test using the kie-config-cli java part, but it is getting a connection refused when it tries to connect to the remote server using ssh://<remote-server-name>:8001/system. When I check the remote server, there is nothing listening on port 8001. Does something extra need to be setup or should a different port be used?

                            • 11. Re: jBPM 6 Deploy a process from Java code
                              swiderski.maciej

                              I believe you should use git protocol for 6.0.0.Final as ssh was added post 6.0.0.Final release. So try git://<remote-server-name>/system

                               

                              HTH

                              • 12. Re: jBPM 6 Deploy a process from Java code
                                zen1800

                                Ok, I'm using the git protocol now but I'm still getting a connection refused error. Do I need to have a git daemon running on the remote server, or do anything else besides starting up jBPM out of the box?

                                • 13. Re: jBPM 6 Deploy a process from Java code
                                  swiderski.maciej

                                  you need to then instruct to what host name the git demon should be bound to as by default it is localhost. Take a look here for details on how to set it.

                                   

                                  HTH

                                  • 14. Re: jBPM 6 Deploy a process from Java code
                                    zen1800

                                    Ok, I was able to finally connect after starting the git daemon and I can perform list calls fine (list-repos and list-deployments), but when I try to so add-deployment and then push-changes I don't get any errors but I also don't see any new deployments show up in the jbpm-console. The new deployment will show up when I do another list-deployments though with the CLI. How do I get the new deployment to show up under the deployments screen in the jbpm-console?

                                     

                                    Also, the kie-config-cli talks about managing the git repository, but the documentation for the Deployments window in the jbpm-console talks about the Maven repository. Are they connected somehow, or is the kie-config-cli really meant for something else?

                                    1 2 3 Previous Next