3 Replies Latest reply on Sep 11, 2015 3:50 AM by happyhippo

    can I disable git-based VFS and Maven from kie-wb [jBPM6.2.0.Final]

    stevenhu

      In my case, I use Eclipse RCP to author the process diagram, and do not use the kie-wb to author the process diagram. The kie-wb is effectively as kind of process executor. My knowledge assets, aka kjar here, are deployed into kie base (Maven repository, org.guvnor.m2repo.dir and deploymentstore table) programmatically at the kie-wb startup stage. I indeed don't want the Maven too, but once I call the deployment service, the Maven repository is required.

       

      So if I don't want the Git repository (org.uberfire.nio.git.dir) and Maven repository installed on the kie-wb server, is there a way to disable the Git and Maven?  And can anybody explain what the relationship between Git, Maven, and the kie folder? 

       

      Waiting for your reply and thanks in advance.

        • 1. Re: can I disable git-based VFS and Maven from kie-wb [jBPM6.2.0.Final]
          happyhippo

          Hi,

           

          we had a similar issue and we solved it as following:

           

          First, we tried to replace the DeploymentService with the VFSDeploymentService (Chapter 20. Integration):

          @Vfs - VFSDeploymentDService that allows to deploy assets directly from VFS (Virtual File System) that is provided by UberFire framework. Due to that fact VFSDeploymentService and VFSDeploymentUnit are not bundled with jbpm core modules but with jbpm-console-ng modules.

          Unfortunately this did not work, mainly because of some OSGI stuff :/

           

          So our second solution is that:

          Assuming you have the compiled KJAR from jbpm-console (or build the jar yourself with bpmn2-files from filesystem, donf forget the kmodule.xml, kie-deployment-descriptor.xml etc) saved in a filesystem / some server, you have to create your own modified version of Deploymentservice.

          We basically copied the existing one and replaced the Maven loader with our own:

          // MavenRepository repository = getMavenRepository();
          // repository.resolveArtifact(releaseId.toExternalForm());
             loadProcessDefinitionsFromJar(ks);

          In this method you just have to add your KJar to the internal repository like so:

          URL url = new URL("file:///somepathOrUrl");

          URLConnection urlConnection = null;

          urlConnection = url.openConnection();

          urlConnection.setConnectTimeout(10);

          InputStream processDefinitions = urlConnection.getInputStream();

          ...


          Resource res = ks.getResources().newInputStreamResource(processDefinitions);

          ks.getRepository().addKieModule(res);

          Instead of using Inputstreams, one also can use newFileSystemResource, newUrlResource or whatever you like.


          hth,

          dan

          • 2. Re: can I disable git-based VFS and Maven from kie-wb [jBPM6.2.0.Final]
            stevenhu

            Thank your very much, Dan. It is very helpful.

             

            So in runtime, the Git repository is not necessary if you don't use the kie-wb to draw the diagram, correct?

             

            Thanks again,

             

            Steven

            • 3. Re: can I disable git-based VFS and Maven from kie-wb [jBPM6.2.0.Final]
              happyhippo

              Hi,

               

              It is possible not to use neither the git repo nor the jbpm-console at runtime, as long as you get your bpmn2-file's content somehow.

               

              dan