[JBoss jBPM] - Re: Autostart process on JBoss start
by Candersen
Hello,
thanks for the answer, it works, but not to the extent I like it to work. I wrote a class that should start my process, it looks like this:
| package myPackage.process;
|
| import java.io.IOException;
|
| import javax.servlet.Servlet;
| import javax.servlet.ServletConfig;
| import javax.servlet.ServletException;
| import javax.servlet.ServletRequest;
| import javax.servlet.ServletResponse;
|
| import org.jbpm.JbpmConfiguration;
| import org.jbpm.JbpmContext;
|
| public class ProzessStarter implements Servlet {
|
| public void init(ServletConfig config) throws ServletException {
|
| JbpmConfiguration jc = JbpmConfiguration.getInstance();
| JbpmContext jcx = jc.createJbpmContext();
| jc.startJobExecutor();
| jcx.newProcessInstance("MyProcess").signal();
| }
|
| public void destroy() {
| }
|
| public ServletConfig getServletConfig() {
| // TODO Auto-generated method stub
| return null;
| }
|
| public String getServletInfo() {
| // TODO Auto-generated method stub
| return null;
| }
|
| public void service(ServletRequest arg0, ServletResponse arg1)
| throws ServletException, IOException {
| // TODO Auto-generated method stub
|
| }
| }
|
I added the servlet to the web.xml of the jbpm-console.war:
| <servlet>
| <servlet-name>ZKSStartupServlet</servlet-name>
| <servlet-class>dev.zksabfall.service.prozess.ProzessStarter</ servlet-class>
| <load-on-startup>2</load-on-startup>
| </servlet>
|
It starts the process on startup of the server, but I have a timer in the first state the process goes into. The problem is now: The timer isn't fired, the process waits in the state.
Am I missing something in the code of the servlet?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4114931#4114931
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4114931
18 years, 4 months
[JBoss Tools (users)] - Bug with Seam-Wizard created project
by Newlukai
For months I've been using JBoss IDE Tools 1.6 to develop my Seam application. This week I try to migrate to Eclipse Europa with JBoss Tools. Pretty nice work.
To migrate I created a Seam project with the "Seam Web Project"-wizard. We have some defaults regarding directory structure. And since we want to separate the "Eclipse-project-specific" files from the "source", I "linked" some directories like "WebContent" to directories outside Eclipse's workspace.
Perhaps you can imagine what happened. The EAR-project contained two directories "EarContent" and "resources". I deleted them and created two linked folders "EarContent" and "resources". "EarContent" contains jboss-seam.jar, application.xml and jboss-app.xml. "resources" contains the datasource xml file. Since I deleted and recreated those two folders it's impossible to include e.g. jboss-seam.jar to the other projects. As soon as I click on "J2EE Module Dependencies" on the Seam or the EJB project I get an error: "The currently displayed page contains invalid values."
Is it a bug? Is there a workaround? Without the possibility to include the ear project's modules to the other projects I will not be able to build my app.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4114928#4114928
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4114928
18 years, 4 months
[JBoss jBPM] - Re: Re-routing Tokens
by dleerob
Thanks Olivier for the detailed reply.
Instead of re-routing by calling node.leave(), I will use node.enter() on the new node instead. I don't want any leave node actions to be called when leaving the old node, because most of them are reliant on entering info on the task instance, which wouldn't neccessarily of happened yet. Also, calling node.enter() on my new node creates all the task instances and timers for that node.
I like your idea of simply ending the task instances from the old node, and not displaying them in the users list. I am now using a similair approach, seeing that we dont seem able to remove a task instance. I end the task instance and set the actor id to something arb, so it wont be displayed in anyones completed tasks list. I also set signalling to false before ending. I don't want the node to be signalled, for the same reason as not using node.leave() above.
Eg:
| taskInstance.setActorId("rerouted");
| taskInstance.setSignalling(false);
| taskInstance.end();
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4114925#4114925
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4114925
18 years, 4 months