[jBPM] - jbpm 5.3 not complete the task
by Jonathan Albornoz
Jonathan Albornoz [https://community.jboss.org/people/betoflint] created the discussion
"jbpm 5.3 not complete the task"
To view the discussion, visit: https://community.jboss.org/message/775433#775433
--------------------------------------------------------------
hi! i have a problem and i want to know if any of you can tell me what to do!
thanks!
Enviroment:
-Windows 7 x64
-jBPM 5.3 Final Release
-Jboss 7.1.1
-H2 Database
-Web application in java
-Jdk 1.6
The application is about the insert of many request of the people…this activate a workflow….just instance when the request is inserted…
Then a person associated with a group has the responsibility to accept the request that in the workflow means that the process is started…then completed…
The problem is that when I insterted an instance of a process… (ksession.startProcess("com.sample.humantask", params) this is saved in h2 in the task table and then I close the connection…when I want complete this task…i make the connection again…complete my task…but don’t start automaticly the next node of my process…I imagine that this happen because I put ksession.dispose after the instance of my process….
How I can save my ksession and the use it to my propose….i will put the code that I use…and sorry for my English…is not native! Thanks…..
This is part of the method that I use to instance my process….
Map<String, Object> parametros = *new* HashMap<String, Object>();
Proceso procMotorWF = *new* Proceso();
procMotorWF.crearConexion();//create the connection
parametros = procMotorWF.definirSolicitud(usuario_solicitud);
procMotorWF.instanciarProceso(parametros);
List<String> grupo = *new* ArrayList<String>();
grupo.add("sales");
List<TaskSummary> listaTareas = procMotorWF.obtenerPosibles(usuario, grupo);
Object object = listaTareas.get(listaTareas.size()-1);
TaskSummary ultimaInstancia = (TaskSummary)object;
Integer idProceso = *new* Integer((*int*)ultimaInstancia.getId());
//System.out.println("La ultima instancia generada contiene el id"+ultimaInstancia.getId());
procMotorWF.cerrarConexion();
There is the open and close connection
*public* *void* crearConexion(){ //open connection
*if* (kbase == *null*){
*try* {
kbase = +readKnowledgeBase+();
} *catch* (Exception e) {
// *TODO* Auto-generated catch block
e.printStackTrace();
}
}
*if* (ksession==*null*){
ksession = kbase.newStatefulKnowledgeSession();
}
*if* (logger==*null* && ksession!=*null*){
logger = KnowledgeRuntimeLoggerFactory.+newThreadedFileLogger+(ksession, "test", 1000);
}
*if*(hornetQHTWorkItemHandler==*null* && ksession!=*null*){
hornetQHTWorkItemHandler = *new* HornetQHTWorkItemHandler(ksession);
}
*if*(ksession!=*null*){
ksession.getWorkItemManager().registerWorkItemHandler("Human Task", hornetQHTWorkItemHandler);
}
*if*(taskClient==*null*){
taskClient = *new* SyncTaskServiceWrapper(*new* AsyncHornetQTaskClient("HumanTaskExample-testClient"));
taskClient.connect("127.0.0.1", 5445);
SystemEventListenerFactory.+setSystemEventListener+(*new* SystemEventListener());
}
}
*public* *void* cerrarConexion(){ //close connection
*try* {
taskClient.disconnect();
hornetQHTWorkItemHandler.dispose();
} *catch* (Exception e) {
// *TODO* Auto-generated catch block
e.printStackTrace();
}
ksession.dispose();
logger.close();
taskClient = *null*;
hornetQHTWorkItemHandler = *null*;
ksession=*null*;
logger = *null*;
}
Any idea what i have to do in this case…????
Very thanks to all of you!! Nad again sorry for my English….
If you need mor information…just tell me!
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/775433#775433]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 5 months
[JNDI and Naming] - [AS7.1.1] EJB JNDI Lookup confusion: remote vs local
by Philipp Nanz
Philipp Nanz [https://community.jboss.org/people/philippn] created the discussion
"[AS7.1.1] EJB JNDI Lookup confusion: remote vs local"
To view the discussion, visit: https://community.jboss.org/message/775116#775116
--------------------------------------------------------------
Hi all,
I have read the docs regarding remote JNDI lookup, but somehow it doesn't seem to match my first-hand experiences. I hope someone can clear this up for me.
My application basically looks like this:
Business.ear
-- service.jar (EJB JAR)
-- web.war
Additionally, there is an remote client talking the app using EJB remoting...
1) Local JNDI lookup (used inside the JAR and partially in the WAR):
JNDI name: java:global/Business/service/FooEJB!foo.bar.ServiceLocal
This works nicely, always.
2) Remote JNDI lookup, from within the WAR:
+InitialContext is basically empty in this scenario.+
JNDI name: ejb:Business/service/FooEJB!foo.bar.Service
This works as well, but there are two strange(?) differences compared to the local lookup:
The prefix must be 'ejb:', 'java:' doesn't work. Also it doesn't work with 'global/' (or any other scope). Ok, I admit, this may be a remote thing, but still I'm wondering...
3) Remote JNDI lookup, from external application:
+InitialContext:+
java.naming.factory.initial=org.jboss.naming.remote.client.InitialContextFactory
java.naming.provider.url=remote://somehost:4447
jboss.naming.client.ejb.context=true
JNDI name: java:Business/service/FooEJB!foo.bar.Service
Now it's getting crazy. This works as well, but as you see I need to use 'java:' prefix. With 'ejb:' prefix I get the dreaded NameNotFoundException :(
Can anyone make any sense of this?!
Thanks in advance!
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/775116#775116]
Start a new discussion in JNDI and Naming at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 5 months
[jBPM] - JbpmException: StartState(Start ProcessName) has no default transition
by Andy Peer
Andy Peer [https://community.jboss.org/people/Andy00] created the discussion
"JbpmException: StartState(Start ProcessName) has no default transition"
To view the discussion, visit: https://community.jboss.org/message/775376#775376
--------------------------------------------------------------
Hi, we have a strange behavior in our evironement, aparently wothout any reasons, one day we got this exception: JbpmException: StartState(Start ProcessName) has no default transition.
We did not change anything of the process.
This is the process definition:
<?xml version="1.0" encoding="UTF-8"?>
<process-definition
xmlns="urn:jbpm.org:jpdl-3.2"
name="Event">
<start-state name="Start Process Event">
<transition to="getEvent"></transition>
</start-state>
<node name="getEvent" async="true">
<action class="com.test.handler.SubscribersEventHandler"></action>
<transition to="nextTransition"></transition>
</node>
....
....
</process-definition>
This is how we start the process:
.....
ProcessInstance processInstance = ctx.getJbpmContext().newProcessInstance(EventProcessConstants.BPM_PROCESS_NAME);
processInstance.getContextInstance().setVariable(EventProcessConstants.BPM_BUSINESSOBJECT_VARIABLE_NAME,event);
processInstance.signal();
.....
What could be the problem?
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/775376#775376]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 5 months