[jBPM] New message: "Re: Exception handling in JBPM4 ?"
by Ronald van Kuijk
User development,
A new message was posted in the thread "Exception handling in JBPM4 ?":
http://community.jboss.org/message/529484#529484
Author : Ronald van Kuijk
Profile : http://community.jboss.org/people/kukeltje
Message:
--------------------------------------------------------------
Compliments, great example and just how it was intended.
Would be nice if someone could extend it this way and make e.g. a real custom node like:
<myNode errorTransition="trans1">
<transition name="trans1"/>
<transition name="trans2"/>
</myNode>
Hints:
- make a binding class
- create e.g. a jbpm.user.jpdl.bindings.xml and add the binding class to that
- import this file in jbpm.cfg.xml
- ...
Oh, and if someone would want to create a wiki page out of this would be great, of even a chapter in the dev guide.
Cheers,
Ronald
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/529484#529484
16 years, 1 month
[JBoss Microcontainer Development] New message: "Re: ClassLoadingAdmin"
by Ales Justin
User development,
A new message was posted in the thread "ClassLoadingAdmin":
http://community.jboss.org/message/529482#529482
Author : Ales Justin
Profile : http://community.jboss.org/people/alesj
Message:
--------------------------------------------------------------
Found a potential NPE -- see Module class:
public static boolean resolveModules(Module... modules) throws Exception
{
if (modules == null || modules.length == 0)
return true;
LifeCycle[] lifeCycles = new LifeCycle[modules.length];
for (int i = 0; i < modules.length; ++i)
{
Module module = modules[i];
if (module == null)
throw new IllegalArgumentException("Null module");
LifeCycle lifeCycle = module.getLifeCycle();
if (lifeCycle == null)
log.warn(module + " has no lifecycle, don't know how to resolve it.");
lifeCycles[i] = lifeCycle; // HERE -- we allow null
}
lifeCycles[0].resolve(lifeCycles); // NPE #1
for (LifeCycle lifeCycle : lifeCycles)
{
if (lifeCycle.isResolved() == false) // NPE#2
return false;
}
return true;
}
And the code in #1 and #2 looks a lot the same -- could be made into one?
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/529482#529482
16 years, 1 month
[JBoss Tools] New message: "Re: JBossTools-3.0.3.GA On Eclipse Ganymede"
by Salim OFLAZ
User development,
A new message was posted in the thread "JBossTools-3.0.3.GA On Eclipse Ganymede":
http://community.jboss.org/message/529479#529479
Author : Salim OFLAZ
Profile : http://community.jboss.org/people/salimoflaz
Message:
--------------------------------------------------------------
Denis,
I tried using DTP interface at the beginning, I was able to create tables, edit,load data and so on. But my changes were lost after I close Eclipse, that means all my work had gone. So I decided not to use that interface and I don't know why. Nowadays I guess it was because the db was in memory mode, it was an in-process connection, and somehow my changes were lost. Today I tried to use hibernate schema export tool and it's very helpful, I had to learn some hibernate syntax of some configuration files, but it does worth. With the HSQLDatabase manager you still have to type SQL DDL, I guess, in fact it was not very helpful. Three years ago I was using eclipse with some IBM plugins and there was a beatiful graphical database design tool. I was not able to find any equivalents, I tried to install EMF package, but it does not install anything helpful in designing databases. And I would like to install some graphical design tools for UML, but I don't know how to address these installations. I couldn't find anything other than EMF. It was a huge package but I was not able to get Modelling Perspective in Eclipse Ganymede 3.4.2. Thanks for your Helpful answers.
Best Regards,
Salim OFLAZ
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/529479#529479
16 years, 1 month
[jBPM] New message: "Re: Console: host not found error"
by carlos mauricio jaramillo henao
User development,
A new message was posted in the thread "Console: host not found error":
http://community.jboss.org/message/529478#529478
Author : carlos mauricio jaramillo henao
Profile : http://community.jboss.org/people/cmjhingeniero
Message:
--------------------------------------------------------------
Thanks for the response. I change file jbpm.console.cfg.xml that is in the path (JBPM_HOME)/src/jbpm.console.cfg.xml
In the project examples I added the tag <import resource="jbpm.console.cfg.xml" /> in the file jbpm.cfg.xml
*jbpm.cfg.xml*
<jbpm-configuration>
<import resource="jbpm.default.cfg.xml" />
<import resource="jbpm.businesscalendar.cfg.xml" />
<import resource="jbpm.tx.hibernate.cfg.xml" />
<import resource="jbpm.jpdl.cfg.xml" />
<import resource="jbpm.bpmn.cfg.xml" />
<import resource="jbpm.identity.cfg.xml" />
*<import resource="jbpm.console.cfg.xml" />*
<import resource="jbpm.mail.templates.examples.xml" />
</ jbpm-configuration>
*jbpm.console.cfg.xml*
<jbpm-configuration>
<process-engine-context>
<string name="jbpm.console.server.host" value="10.1.1.175" /> //IP the server
<string name="jbpm.console.server.port" value="8080" />
</process-engine-context>
</jbpm-configuration>
When I connect from another machine by the browser I can not see the tasks
Thanks
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/529478#529478
16 years, 1 month
[jBPM] New message: "Re: Exception handling in JBPM4 ?"
by Hernan Rodriguez
User development,
A new message was posted in the thread "Exception handling in JBPM4 ?":
http://community.jboss.org/message/529477#529477
Author : Hernan Rodriguez
Profile : http://community.jboss.org/people/HernanRodriguez
Message:
--------------------------------------------------------------
My solution for the problem is:
Define a abstract class, implementing ExternalActivityBehaviour.
package cl.pred.cmh.bpm.events.controller;
import java.util.Map;
import org.jbpm.api.activity.ActivityExecution;
import org.jbpm.api.activity.ExternalActivityBehaviour;
public abstract class ControllerAbstract implements ExternalActivityBehaviour {
@Override
public void signal(ActivityExecution activityExecution, String arg1, Map<String, ?> arg2)
throws Exception {
execute(activityExecution);
}
@Override
public void execute(ActivityExecution activityExecution) throws Exception {
try {
procesar();
activityExecution.takeDefaultTransition();
} catch (Exception e) {
activityExecution.waitForSignal();
}
}
protected abstract void procesar() throws Exception;
}
Then, define a Controller Class extending the abstract class.
public class Controller extends ControllerAbstract {
@Override
protected void procesar() throws Exception {
BusinessHelper.doSomething();
}
}
I defined three custom nodes in my model. These nodes were associated to the Controller Class.
<?xml version="1.0" encoding="UTF-8"?>
<process name="test" xmlns="http://jbpm.org/4.2/jpdl">
<start name="start1" g="28,32,48,48">
<transition name="to custom1" to="custom1" g="-10,-27"/>
</start>
<custom name="custom1" g="84,104,92,52" class="cl.pred.cmh.bpm.events.controller.TraspasoController" >
<transition name="to custom2" to="custom2" g="9,-16"/>
</custom>
<custom name="custom2" g="166,176,92,52" class="cl.pred.cmh.bpm.events.controller.TraspasoController">
<transition name="to custom3" to="custom3" g="-3,-25"/>
</custom>
<custom name="custom3" g="258,258,92,52" class="cl.pred.cmh.bpm.events.controller.TraspasoController">
<transition name="to end1" to="end1" g="30,-36"/>
</custom>
<end name="end1" g="354,325,48,48"/>
</process>
For example, if BusinessHelper.doSomething() throw an Exception in custom 2 node, the "activityExecution.waitForSignal()" method will be invoked. This method commit the transaction and stops the execution.
Then, if we need resume the process, we can use the "executionService.signalExecutionById(processKey)" method from a Web Service, Servlet, EJB, Helper, Timer or whatever.
This example, with some variations, works for me ... and very good.
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/529477#529477
16 years, 1 month
[jBPM] New message: "Task duedate jbpm4.3"
by Jas Lam
User development,
A new message was posted in the thread "Task duedate jbpm4.3":
http://community.jboss.org/message/529476#529476
Author : Jas Lam
Profile : http://community.jboss.org/people/lamj1
Message:
--------------------------------------------------------------
the following is a segment of my process definition
When i start this process, the task due date remain null in the DB. Am I missing something?
I have search the forum and didn't find anything that address this? Has anyone successfully have duedate set this way?
<task assignee="ssoa" duedate="2 business days" form="tasks/downloadData.htm" g="155,11,123,60" name="DownloadData">
<notification/>
<transition g="-44,20" name="to ExtractDataset" to="ExtractDataset"/>
</task>
Thanks
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/529476#529476
16 years, 1 month