[jBPM] - Problem with jBPM5.3 and (needed) activated jpa in standalone.xml
by hamsterdancer
hamsterdancer [https://community.jboss.org/people/hamsterdancer] created the discussion
"Problem with jBPM5.3 and (needed) activated jpa in standalone.xml"
To view the discussion, visit: https://community.jboss.org/message/742051#742051
--------------------------------------------------------------
Hi there.
I'm running jBoss 7.1.1 with jBPM5.3 and postgresSQL and some other applications.
I've seen, the jpa part in the standalone.xml is commented out and everything works fine. Some of our other allpications are using jpa and are depended on the outcommented lines.
> <subsystem xmlns="urn:jboss:domain:jpa:.0">
> <jpa default-datasource=""/>
> </subsystem>
The point is, with these lines, our other applications are running perfectly but the jbpm console server and the human task service is not running. Without these lines the jpbm stuff works fine but the other applications do not.
Any ideas or workarounds what I could do except for not using jpa in my other applications running on the same server (which is not an option :-/ ) ?
Thanks.
(btw. I'm still missing the catecory jBPM 5.3 on creating a new topic^^)
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/742051#742051]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 2 months
[jBPM] - How to define result mapping or exit action that saves task owner
by jemmerling
jemmerling [https://community.jboss.org/people/jemmerling] created the discussion
"How to define result mapping or exit action that saves task owner"
To view the discussion, visit: https://community.jboss.org/message/648536#648536
--------------------------------------------------------------
Hi,
This should be simple for any non-novice, it was suggested before however without an example.
So I have a process variable and I want a particular task to store its owner into that variable (say its name is "task2owner"). Is there an expression for that, for example:
task2owner=#{taskOwner}
So if there is a standard expression for the task owner (the above is just a guess at what it might be) then this result mapping would allow subsequent tasks to determine who owned (and completed) task2.
Failing that, I could try defining an on exit action, using kcontext I can get the node instance which I think has a one-to-one correspondence to the task, however the node instance does not seem to have an attribute that explicitly identifies the owner. Perhaps the owner is a variable?
Any suggestion would be greatly appreciated.
Thanks!
--JE
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/648536#648536]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 2 months
[JBoss Messaging] - How to list or monitor messages in a Queue which is already under use
by Aneesh Sebastian
Aneesh Sebastian [https://community.jboss.org/people/aneeshsebastian] created the discussion
"How to list or monitor messages in a Queue which is already under use"
To view the discussion, visit: https://community.jboss.org/message/720125#720125
--------------------------------------------------------------
I have a requirement to monitor a JBoss messaging queue, where users should be able to delete posted messages dynamically. The application has a MDPOJO registered and is up and running at server start up.
My requirement is, users should be able to delete a posted message any time he wishes. I tried below proto codes :
*Option1*
public void listAllJMS_Messages()
{
try {
ObjectName objectName=new ObjectName("jboss.messaging.destination:name=XXX,service=Queue");
List ls = (List) server.invoke(objectName, "listMessages" , null, null);
List<javax.jms.Message> messages=(List<javax.jms.Message>)server.invoke(objectName, "listAllMessages" , null, null);
int count=0;
for(javax.jms.Message msg : messages) {
System.out.println((++count)+"t"+msg.getJMSMessageID());
if(msg.getJMSType() != null && msg.getJMSType().equalsIgnoreCase("Text")) {
TextMessage text = (TextMessage)msg;
System.out.println(text.getText());
}
}
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
// System.out.println((++count)+"t"+msg.getText());
}
*Option2*
public void listMsg() {
String destinationName = "queue/XXX";
Context ic = null;
ConnectionFactory cf = null;
Connection connection = null;
try {
ic = getInitialContext();
cf = (ConnectionFactory)ic.lookup("/ConnectionFactory");
Queue queue = (Queue)ic.lookup(destinationName);
connection = cf.createConnection();
Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
QueueBrowser qbrowser = session.createBrowser(queue);
Enumeration<?> qamsgs = qbrowser.getEnumeration();
while (qamsgs.hasMoreElements()){
Message msg = (Message)qamsgs.nextElement();
}
connection.start();
}
catch(Exception e)
{
System.out.println(e);
}
finally
{
if(ic != null)
{
try
{
ic.close();
}
catch(Exception e1)
{
System.out.println(e1);
}
}
}
}
In both the options,messages are getting listed in case of no message consumers at present.If have a live message consumer MDB, then list is returned as null.
I defintely need MDB consumer up and running.But still need to monitor messages.I should be able to do below :
1. List messages]
2. Delete a particular message
3. Change priority
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/720125#720125]
Start a new discussion in JBoss Messaging at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 2 months
[jBPM] - Commit transaction after each service task?
by Richard Evans
Richard Evans [https://community.jboss.org/people/r3vans] created the discussion
"Commit transaction after each service task?"
To view the discussion, visit: https://community.jboss.org/message/742450#742450
--------------------------------------------------------------
Hello there,
JBPM 5.1 on Tomcat, persistence configured in Spring
I have a number of processes, each with a series of service tasks punctuated by timers.
I would like to persist process data after every service task to be confident that it is recoverable on catastrophic failure. I find, though, that data is committed only at timers and end of process. Is it possible to take control of transactions at a more granular level to get jbpm to commit more regularly?
My config..
<bean class="org.springframework.orm.jpa.JpaTransactionManager"
id="transactionManager">
<property name="entityManagerFactory" ref="entityManagerFactory" />
</bean>
<tx:annotation-driven mode="aspectj"
transaction-manager="transactionManager" />
<bean class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"
id="entityManagerFactory">
<property name="persistenceUnitName" value="persistenceUnit" />
<property name="dataSource" ref="dataSource" />
</bean>
<bean class="org.springframework.orm.jpa.JpaTransactionManager"
id="transactionManager">
<property name="entityManagerFactory" ref="entityManagerFactory" />
</bean>
<drools:jpa-persistence>
<drools:transaction-manager ref="transactionManager" />
<drools:entity-manager-factory ref="entityManagerFactory" />
</drools:jpa-persistence>
Thanks,
Richard
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/742450#742450]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 3 months
[JBoss Web Services] - java.lang.Error: Undefined operation name <x>, when <x> was removed from interface (wsdl)
by Barry Schader
Barry Schader [https://community.jboss.org/people/barryaz1] created the discussion
"java.lang.Error: Undefined operation name <x>, when <x> was removed from interface (wsdl)"
To view the discussion, visit: https://community.jboss.org/message/742537#742537
--------------------------------------------------------------
What I did:
* Removed two completely unused methods from a class that represents a web service interface (we had a sloppy contractor who left his trash in the interface code...)
* Updated the WSDL file to remove the methods
* Committed those changes into our local SVN
* Ran a complete regression test (using Hudson, JUnit) -> PASSED
But when I attempt to run any of the *same JUnit tests* within the JBoss Dev Studio environment, I get a stack trace that begins with:
junit.framework.AssertionFailedError: Exception in constructor: testFetchProduct_PRE001_01 (java.lang.Error: Undefined operation name checkDMAS
at com.sun.xml.ws.model.JavaMethodImpl.freeze(JavaMethodImpl.java:305)
at com.sun.xml.ws.model.AbstractSEIModelImpl.freeze(AbstractSEIModelImpl.java:73)
at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:230)
at com.sun.xml.ws.client.WSServiceDelegate.addSEI(WSServiceDelegate.java:588)
at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:291)
at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:274)
at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:267)
at javax.xml.ws.Service.getPort(Service.java:92)
at com.medtronic.mes.FacadeService_Service.getFacadeServicePort(FacadeService_Service.java:50)
I seem to be unable to make eclipse (or JBDS?) *forget* about the "checkDMAS" method. There are no references to it anywhere that I can find within the JUnit code, yet *every* JUnit test case causes the same stack trace. I have 'cleaned' the project in every way that I know how -- but I will admit that my experience with eclipse (and JBDS) is weak.
Thanks in advance for any help you can provide.
Barry Schader
Phoenix, AZ
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/742537#742537]
Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 3 months
[jBPM] - Re: Problem in deploying Process from guvnor to JBPM Console
by Guido Zerbinati
Guido Zerbinati [https://community.jboss.org/people/gzer] created the discussion
"Re: Problem in deploying Process from guvnor to JBPM Console"
To view the discussion, visit: https://community.jboss.org/message/736831#736831
--------------------------------------------------------------
Yes, I've seen. I've downloaded (hopefully ;-)) all the newest release (JBPM, Guvnor, etc) and the newest jbpmistaller project from GITHUB; found all the libraries and reinstall everything. Now jpbm console is version 2.3.2 SNAPSHOT, Drools is 5.4 and so on... Seems that all is working well... designing flows on guvnor and packaging them make them appears on jbpm console... Have to say that it'has been a a little too much difficult but I think I'm getting through it. So by now I can start seeing JBPM in action. By the way if someone wants the full ZIP package to install the demo with the latest version of all this stuff I can provide it (it's huge so you have to give me some kind of FTP access or so on)...
Thanks for support... Hope that now I can start doing more interesting questions..... ;-)!!!!
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/736831#736831]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 3 months
[jBPM] - Re: Loading processInstance/session via JPA, workItem executes before able to register workItems
by Marcus Portmann
Marcus Portmann [https://community.jboss.org/people/marcusportmann] created the discussion
"Re: Loading processInstance/session via JPA, workItem executes before able to register workItems"
To view the discussion, visit: https://community.jboss.org/message/736669#736669
--------------------------------------------------------------
Hi Ryan,
I encountered the same problem but am still working on finding a solution.
I believe that the problem is a result of a race condition where when a persistent knowledge session is unmarshalled as part of the call-chain for *JPAKnowledgeService.loadStatefulKnowledgeSession(...)* the "timer job" infrastructure is initialised and any pending "timer jobs" are immediatelly executed before the knowledge session is completely initialised. In my case what happens is that a TimerJobInstance executes before the following line is executed in the *initKsession* method for the *SingleSessionCommandService* class so the CommandService for my *TimerJobFactoryManager* instance is still null.
((AcceptsTimerJobFactoryManager) ((InternalKnowledgeRuntime) ksession).getTimerService()).getTimerJobFactoryManager().setCommandService( this );
The issue seems to be that timer job instances should not executed until the knowledge session is completely initialised. This initialisation should include things like registering the work item handlers which should solve your problem.
I believe that the knowledge session itself needs some sort of "resume" method so that it can be instructed when to resume once it has been completely initialised. This "resume" method would kick-off any timer jobs. Unfortunately I am not familiar enough with the Drools/JBPM code-base to suggest how this should be implemented.
Regards,
Marcus
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/736669#736669]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 3 months