Discussion:
[jboss-user] [jBPM] - Re: Startup of task service
roxy1987
2013-03-07 23:45:23 UTC
Permalink
roxy1987 [https://community.jboss.org/people/roxy1987] created the discussion

"Re: Startup of task service"

To view the discussion, visit: https://community.jboss.org/message/801459#801459

--------------------------------------------------------------
Your task service is not getting started because your roles.properties file link. Just look for the following code snippet in your build.xml

<java classname="org.jbpm.DemoTaskService" fork="true">        
      <classpath>
            <pathelement path="${install.home}/task-service/target"/>
            <path refid="classpath.human.task" />
      </classpath>
    </java>


And add the line *<sysproperty key="jbpm.user.group.mapping" value="file:///<+path of your jboss server+>/jboss-as-7.1.1.Final/standalone/configuration/roles.properties"/>  like this :*


<sysproperty key="jbpm.user.group.mapping" value="file:///<+path of your jboss server+>/jboss-as-7.1.1.Final/standalone/configuration/roles.properties"/>

      <classpath>
            <pathelement path="${install.home}/task-service/target"/>
            <path refid="classpath.human.task" />
      </classpath>
    </java>

<java classname="org.jbpm.DemoTaskService" fork="true">        
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/801459#801459]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
David Harris
2013-03-08 01:42:55 UTC
Permalink
David Harris [https://community.jboss.org/people/dmwpepper] created the discussion

"Re: Startup of task service"

To view the discussion, visit: https://community.jboss.org/message/801465#801465

--------------------------------------------------------------
Hi, technically would this work since <java classname="org.jbpm.DemoTaskService" fork="true">  comes at the end?  That would leave </java> appearing before.  So, I did this


  <target name="start.human.task">

      <mkdir dir="${install.home}/task-service/target"/>
      <javac srcdir="${install.home}/task-service/src" destdir="${install.home}/task-service/target" classpathref="classpath.human.task">
          <compilerarg value="-Xlint:unchecked"/>
     </javac>
    <copy todir="${install.home}/task-service/target">
         <fileset dir="${install.home}/task-service/resources"/>
    </copy>

    <sysproperty key="jbpm.user.group.mapping" value="${install.home}/jboss-as-7.1.1.Final/standalone/configuration/roles.properties"/>
    <java classname="org.jbpm.DemoTaskService" fork="true"> 
         <classpath>
            <pathelement path="${install.home}/task-service/target"/>
            <path refid="classpath.human.task" />
         </classpath>
    </java>


  </target>

However, it didn't work.  I got the following response:

C:\jbpm>ant start.human.task
Buildfile: C:\jbpm\build.xml
start.human.task:
    [javac] C:\jbpm\build.xml:864: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
BUILD FAILED
C:\jbpm\build.xml:870: Problem: failed to create task or type sysproperty
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.

Total time: 0 seconds
C:\jbpm>

What's next?

--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/801465#801465]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
roxy1987
2013-03-08 12:22:57 UTC
Permalink
roxy1987 [https://community.jboss.org/people/roxy1987] created the discussion

"Re: Startup of task service"

To view the discussion, visit: https://community.jboss.org/message/801539#801539

--------------------------------------------------------------
That was a typo, I am sorry. What I meant is :

**
<java classname="org.jbpm.DemoTaskService" fork="true">

<sysproperty key="jbpm.user.group.mapping" value="file:///<+path of your jboss server+>/jboss-as-7.1.1.Final/standalone/configuration/roles.properties"/>

<classpath>
<pathelement path="${install.home}/task-service/target"/>
<path refid="classpath.human.task" />
</classpath>
</java>

--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/801539#801539]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
David Harris
2013-03-08 14:54:57 UTC
Permalink
David Harris [https://community.jboss.org/people/dmwpepper] created the discussion

"Re: Startup of task service"

To view the discussion, visit: https://community.jboss.org/message/801577#801577

--------------------------------------------------------------
Ok, this seems to solve the problem in it finding the properties file and starting up.  Is the following what you expected?:

C:\jbpm>ant start.human.task
Buildfile: C:\jbpm\build.xml
start.human.task:
    [javac] C:\jbpm\build.xml:864: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
     [echo] before classname
     [java] Task service registered usergroup callback ...
     [java] Task service started correctly!
     [java] Task service running ...

Also, the process still runs in the foreground.  When I install the demo application, and use "ant start.demo", all processes run in the background, including the human task service.  Is there a way to get the task service to run in the background when it's started by itself (which install.html says you can do). 
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/801577#801577]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
roxy1987
2013-03-08 15:39:02 UTC
Permalink
roxy1987 [https://community.jboss.org/people/roxy1987] created the discussion

"Re: Startup of task service"

To view the discussion, visit: https://community.jboss.org/message/801593#801593

--------------------------------------------------------------
I am not sure if I understand your question correctly.

When you start jboss server, it deploy all the war files, including the human task war. The human task war contains a servlet which is loaded on startup. And it has the logic to fire up HornetQ task server by default. So you dont need to start up the task server, just deploying the war file starts it up.
If you are looking to create a web application of some sort then you have 2 options to use the human task service :
a) Either you use the Servlet in your project and load it on start up.
b) Or you use the human task war directly and modify the persistence.xml inside for data sources and a few other modifications.

If you wanna use the human task war then you can follow https://community.jboss.org/people/roxy1987/blog/2013/02/19/web-application-with-human-task-war https://community.jboss.org/people/roxy1987/blog/2013/02/19/web-application-with-human-task-war for modification.

Lemme know if that answers your query.
Regards.



--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/801593#801593]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
David Harris
2013-03-08 15:50:02 UTC
Permalink
David Harris [https://community.jboss.org/people/dmwpepper] created the discussion

"Re: Startup of task service"

To view the discussion, visit: https://community.jboss.org/message/801601#801601

--------------------------------------------------------------
Hi, my question about starting up the human task service is based on the following snippet out of the install.html doc. :

h3. Starting
Startup database:
+ant start.h2+
Startup JBoss AS:
+ant start.jboss+
Startup task service:
+ant start.human.task+
Startup eclipse:
+ant start.eclipse+


Notice that is says you can start up the task service by typing in "ant start.human.task".  However, I've found that the application doesn't work correctly when it's started by itself with ant. I know what you're saying about using the .war, but I'm wondering why then install.html says you can start it this way. Is that a mistake? 
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/801601#801601]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
roxy1987
2013-03-08 16:00:56 UTC
Permalink
roxy1987 [https://community.jboss.org/people/roxy1987] created the discussion

"Re: Startup of task service"

To view the discussion, visit: https://community.jboss.org/message/801605#801605

--------------------------------------------------------------
Well to start up human task using ant, all you need to run is start.h2 before it. Or the target data base server should be runnning in case you have migrated it to another db.
If you run the ant scripts in the sequence

+ant start.h2+
+ant start.jboss+
+ant start.human.task+
+ant start.eclipse+


Then I believe you will get a conflict with the address:port usage as the script +ant start.jboss+  has already started task service. I dont remember correctly but If I am not wrong, in the very first draft of jbpm 5, task service was required to start up this way. STarting up jboss did not start human task service with that version. And quite a lot of documentation has not been modified with the upgrades. I am not sure about it though.

Well All you need to do is

+ant start.h2+
+ant start.human.task+

+Regards.+
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/801605#801605]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
roxy1987
2013-03-08 16:18:05 UTC
Permalink
roxy1987 [https://community.jboss.org/people/roxy1987] created the discussion

"Re: Startup of task service"

To view the discussion, visit: https://community.jboss.org/message/801611#801611

--------------------------------------------------------------
Well to start up human task using ant, all you need to run is start.h2 before it. Or the target data base server should be runnning in case you have migrated it to another db.
If you run the ant scripts in the sequence

+ant start.h2+
+ant start.jboss+
+ant start.human.task+
+ant start.eclipse+


Then I believe you will get a conflict with the address:port usage as the script +ant start.jboss+  has already started task service. I dont remember correctly but If I am not wrong, in the very first draft of jbpm 5, task service was required to start up this way. STarting up jboss did not start human task service with that version. And quite a lot of documentation has not been modified with the upgrades. I am not sure about it though.

Well All you need to do is

+ant start.h2+
+ant start.human.task+

+Regards.+

--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/801611#801611]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Loading...