3 Replies Latest reply on Jun 22, 2006 4:27 AM by Koen Aers

    Process Deployment Issue

    kazam Newbie

      I am having a really tough time, trying to deploy my process with action classes and assignmentHandlers onto JBPM Starters Kit.
      There are a few similar posts already on the forum, and I have tried to follow them but no luck. Please, kindly take a look and through me some pointers.

      System: Windows Xp, jbpm-starters-kit-3.1.1

      Using Eclipse
      I have tried to deploy websale process using eclipse and that works.
      However, my own process with AssignmentHandler and Action classes is not being deployed correctly, the classes are not found.

      Using ANT Script
      I tried using the ant task and although the build succeeds it fails to show up on the http://locahost:8080/jbpm application. The ant script output says that it is storing everything in the inmemory db, but nothing goes in.
      I am using the following ant script:

      <target name="deploy.process" depends="build.process">
       <record name="deploy.txt" loglevel="verbose" action="start"/>
       <taskdef name="deployprocess" classname="org.jbpm.ant.DeployProcessTask">
       <classpath refid="classpath.ant" />
       <deployprocess cfg="${basedir}/jbpm/src/config.files/hibernate.cfg.xml" >
       <fileset dir="build" includes="*.process"/>
       <record name="deploy.txt" loglevel="verbose" action="stop"/>

      The resulting archive file has the following structure:
      * process.par
      *classes--> has my classes

      Using Deploy Servlet
      Lastly, I looked up the forums and used the deploy servlet to do the deployment of the above myProcess.process file. It successfully deploys but I cannot access my class files.

      I went into the jbpm.sar dir in the deploy directory and tweaked the jbpm.cfg.xml to add files.dir in there and also placed my classes in a .jar in the jbpm.sar and deploy directory but no luck.

      Please, kindly point me as to where I am going wrong thanks.

        • 1. Re: Process Deployment Issue
          Koen Aers Master


          Are you sure that in addition to every action handler every custom class that your action handler uses is available on the classpath (i.e. on the system classpath, the jboss server classpath, the webapp classpath or your process archive)?


          • 2. Re: Process Deployment Issue
            kazam Newbie

            Thanks very much Koen, it did work.

            I placed my classes.jar in the JBOSS_HOME/bin directory[could have been anywhere I suppose] and put the jar file in the CLASSPATH for JBOSS Application Server.

            However, is this the way it is supposed to be. Shouldn't the classes be just part of the archive. The documentation Chapter 16, 16.1.2 and 16.2

            , describe about placing the custom classes under classes directory in the process archive.

            ANT SCRIPT
            Lastly, my ant script seemed to go through but deployed nothing. It generated however, the following warnings

             10:01:23,375 [main] WARN EhCacheProvider : Could not find configuration [org.jbpm.graph.def.Node]; using defaults.
             10:01:23,609 [main] WARN EhCacheProvider : Could not find configuration [org.jbpm.instantiation.Delegation]; using defaults.
             10:01:24,046 [main] WARN EhCacheProvider : Could not find configuration [org.jbpm.taskmgmt.def.Task]; using defaults.
             10:01:24,375 [main] WARN EhCacheProvider : Could not find configuration [org.jbpm.graph.def.ProcessDefinition]; using defaults
            ............... more similar warnings

            About Jbpm.cfg.xml
            I also tried to configure the jbpm.cfg.xml using the jbpm.files.dir, but I probably wasn't using it correctly. This property isn't documented anywhere for the jbpm.cfg.xml. What extra benefits will it give over not storing the process archive in the database.

            Thanks, again for a fast reply.

            • 3. Re: Process Deployment Issue
              Koen Aers Master

              The recommended approach is indeed storing the classes in your processarchive. This is one of the options I suggested above, but maybe I should have put it first. You shouldn't use the jbpm.files.dir property anymore, it is a legacy property used before for database that were not able to handle binary objects easily. These issues have been resolved in the meantime.