[jBPM] - Re: Unable to complete a task when running the task in a separate thread
by Dino Antonelli
Dino Antonelli [https://community.jboss.org/people/dino.antonelli] created the discussion
"Re: Unable to complete a task when running the task in a separate thread"
To view the discussion, visit: https://community.jboss.org/message/739390#739390
--------------------------------------------------------------
Hi Kris,
I've the same problem as Connie. I've a different thread that is running the handler and I'm also experiencing the above NullPointerException during the its execution. I've passed, as you suggested, the ksession to the handler so I call "ksession.getWorkItemManager().completeWorkItem" to complete the execution. Anyway I'm getting the exception very frequently. I've read that there must be a transaction to have a successful complete but it seems that the thread that makes the call always run inside a transaction; below my snippet of code:
TransactionManager tm = TransactionManagerLocator.getInstance().locate();
boolean transactionStarted = false;
if(tm.getStatus() == Status.STATUS_NO_TRANSACTION) {
transactionStarted = true;
tm.begin();
}
this.ksession.getWorkItemManager().completeWorkItem(wi.getId(), inputParameters);
if(transactionStarted) {
tm.commit();
}
It seems that I've never execute the begin because thre's always an active transaction.
Have you any idea?
thnks in advance
Dino
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/739390#739390]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 10 months
[Beginner's Corner] - Regex expression in context.xml
by Carlos Oliva
Carlos Oliva [https://community.jboss.org/people/ramboid] created the discussion
"Regex expression in context.xml"
To view the discussion, visit: https://community.jboss.org/message/739360#739360
--------------------------------------------------------------
How should one escape the expression \d{1,3} in a context.xml file for limiting access to a context? I am thinking that I should escape more than one character in the expression, or I am missing something from the example in https://community.jboss.org/docs/DOC-11257 https://community.jboss.org/wiki/LimitAccessToCertainClients. The expression seems to fail whether I escape the \d or not; the expression .* works fine. I add a context.xml file to the WEB-INF folder and insert the tomcat valve as described. Whenever I add the expression <some number>\.\d{1,3}\.\d{1,3}\.\d{1,3} to an accept attribute, JBoss rejects all requests. The same happens with \d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/739360#739360]
Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 10 months
[jBPM] - jBPM 5.3 - TaskClient error
by jena74
jena74 [https://community.jboss.org/people/jena74] created the discussion
"jBPM 5.3 - TaskClient error"
To view the discussion, visit: https://community.jboss.org/message/739095#739095
--------------------------------------------------------------
Hello,
I use the TaskClient Java API to connect to the HornetQ human task service started on my laptop.
But, each time, at the exit time of my Java code, I have a strange exception:
Exception in thread "Thread-1" java.lang.RuntimeException: Client Exception with class class org.jbpm.task.service.hornetq.HornetQTaskClientConnector$1 using port 6666
at org.jbpm.task.service.hornetq.HornetQTaskClientConnector$1.run(HornetQTaskClientConnector.java:127)
at java.lang.Thread.run(Thread.java:662)
Caused by: HornetQException[errorCode=102 message=Consumer is closed]
at org.hornetq.core.client.impl.ClientConsumerImpl.checkClosed(ClientConsumerImpl.java:911)
at org.hornetq.core.client.impl.ClientConsumerImpl.receive(ClientConsumerImpl.java:184)
at org.hornetq.core.client.impl.ClientConsumerImpl.receive(ClientConsumerImpl.java:401)
at org.jbpm.task.service.hornetq.HornetQTaskClientConnector$1.run(HornetQTaskClientConnector.java:118)
... 1 more
I can not explain what happen, but if I run my test several times, at the end I am no more able to connect to my human task server.
I join the code of my client in attachment.
Does-it mean something for you please?
Thank you.
Jena
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/739095#739095]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 10 months