[jBPM] - Trouble getting human task from task service
by TC ONG
TC ONG [https://community.jboss.org/people/devilkazuya99] created the discussion
"Trouble getting human task from task service"
To view the discussion, visit: https://community.jboss.org/message/734663#734663
--------------------------------------------------------------
Hi All,
I have a process that has multiple human tasks in it. I am using Human Task Service. I have problem getting the human task in 2 scenarios.
1> Greb human task right after process start.
...
knowledgeSession.startProcess(process, processVariables); // start process
...
BlockingTaskSummaryResponseHandler taskSummaryHandler = new BlockingTaskSummaryResponseHandler();
taskClient.getTasksAssignedAsPotentialOwner(actor, "en-UK", taskSummaryHandler);
int taskSize = taskSummaryHandler.getResults().size();
logger.debug("Found " + taskSize + " task(s) from the Human Task Service.");
...
It gives me 0 results.
But if I go the database, the task was created.
Then I try Thread.sleep() for a while.
...
knowledgeSession.startProcess(process, processVariables); // start process
try {
logger.debug("Wait for 2 sec.");
Thread.sleep(2000);
} catch (InterruptedException e) {
e.printStackTrace();
}
...
BlockingTaskSummaryResponseHandler taskSummaryHandler = new BlockingTaskSummaryResponseHandler();
taskClient.getTasksAssignedAsPotentialOwner(actor, "en-UK", taskSummaryHandler);
int taskSize = taskSummaryHandler.getResults().size();
logger.debug("Found " + taskSize + " task(s) from the Human Task Service.");
...
and this time I got the result.
Can I say that when I look for the human task, it is not created in the task service yet.
Obviously what I am doing is stupid and there is a better way to implement it.
Can anyone enlighten me a little bit?
2> Second case is when I try to get the next task after completing one.
...
BlockingTaskOperationResponseHandler taskOperationHandler = new BlockingTaskOperationResponseHandler();
taskClient.complete(task1.getId(), actor, contentData, taskOperationHandler);
taskOperationHandler.waitTillDone(5000);
...
BlockingTaskSummaryResponseHandler taskSummaryHandler = new BlockingTaskSummaryResponseHandler();
taskClient.getTasksAssignedAsPotentialOwner(actor, "en-UK", taskSummaryHandler);
int taskSize = taskSummaryHandler.getResults().size();
logger.debug("Found " + taskSize + " task(s) from the Human Task Service.");
...
Again, anyone, someone, i need your great knowledge.. (ToT)
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/734663#734663]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 7 months
[Beginner's Corner] - Can not deploy ear app Jboss 6.1 , Eclipse Indigo with jboss tools 3.3
by Meena Rajnai
Meena Rajnai [https://community.jboss.org/people/usydrajani] created the discussion
"Can not deploy ear app Jboss 6.1 , Eclipse Indigo with jboss tools 3.3"
To view the discussion, visit: https://community.jboss.org/message/734997#734997
--------------------------------------------------------------
Hi I have an ear application which when I am deploying in +defalut+ mode in local host of jboss 6.1 is working fine. But when I want to give my own host IP address or when I want to deply it in +all+ (cluster mode) with the IP addess 129.78.110.72 of the machine it does not deply my application .
I am getting following error in server.log
Error adding deployment folder to deployment scanner
javax.naming.CommunicationException: Could not obtain connection to any of these urls: 129.78.110.72:1099 and discovery failed with error: java.lang.ClassCastException: java.lang.Boolean cannot be cast to java.lang.String
at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1522)
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1761)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:695)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:688)
at javax.naming.InitialContext.lookup(Unknown Source)
at org.jboss.ide.eclipse.as.jmx.integration.JMXSafeRunner.run(JMXSafeRunner.java:67)
at org.jboss.ide.eclipse.as.jmx.integration.JMXSafeRunner.run(JMXSafeRunner.java:52)
at org.jboss.ide.eclipse.as.jmx.integration.JBossServerConnection.run(JBossServerConnection.java:97)
at org.jboss.ide.eclipse.as.jmx.integration.JBossServerConnectionProvider.run(JBossServerConnectionProvider.java:58)
at org.jboss.ide.eclipse.as.jmx.integration.JMXServerLifecycleListener.doDeploymentAddition(JMXServerLifecycleListener.java:69)
at org.jboss.ide.eclipse.as.jmx.integration.JMXServerLifecycleListener.serverChanged(JMXServerLifecycleListener.java:55)
at org.jboss.ide.eclipse.as.core.server.UnitedServerListenerManager.serverChanged(UnitedServerListenerManager.java:128)
at org.eclipse.wst.server.core.internal.ServerNotificationManager.broadcastChange(ServerNotificationManager.java:125)
at org.eclipse.wst.server.core.internal.Server.fireServerStateChangeEvent(Server.java:735)
at org.eclipse.wst.server.core.internal.Server.setServerState(Server.java:643)
at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.setServerState(ServerBehaviourDelegate.java:143)
at org.jboss.ide.eclipse.as.core.server.internal.DeployableServerBehavior.setServerStarted(DeployableServerBehavior.java:194)
at org.jboss.ide.eclipse.as.core.server.internal.DelegatingServerBehavior.setServerStarted(DelegatingServerBehavior.java:91)
at org.jboss.ide.eclipse.as.core.server.internal.AbstractJBossBehaviourDelegate.setServerStarted(AbstractJBossBehaviourDelegate.java:128)
at org.jboss.ide.eclipse.as.core.server.internal.AbstractJBossBehaviourDelegate$1.stateAsserted(AbstractJBossBehaviourDelegate.java:102)
at org.jboss.ide.eclipse.as.core.server.internal.PollThread.alertListener(PollThread.java:231)
at org.jboss.ide.eclipse.as.core.server.internal.PollThread.handlePollerHasAnswer(PollThread.java:160)
at org.jboss.ide.eclipse.as.core.server.internal.PollThread.run(PollThread.java:148)
[Root exception is javax.naming.CommunicationException: Failed to connect to server /129.78.110.72:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server /129.78.110.72:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]]
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1780)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:695)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:688)
at javax.naming.InitialContext.lookup(Unknown Source)
at org.jboss.ide.eclipse.as.jmx.integration.JMXSafeRunner.run(JMXSafeRunner.java:67)
at org.jboss.ide.eclipse.as.jmx.integration.JMXSafeRunner.run(JMXSafeRunner.java:52)
at org.jboss.ide.eclipse.as.jmx.integration.JBossServerConnection.run(JBossServerConnection.java:97)
at org.jboss.ide.eclipse.as.jmx.integration.JBossServerConnectionProvider.run(JBossServerConnectionProvider.java:58)
at org.jboss.ide.eclipse.as.jmx.integration.JMXServerLifecycleListener.doDeploymentAddition(JMXServerLifecycleListener.java:69)
at org.jboss.ide.eclipse.as.jmx.integration.JMXServerLifecycleListener.serverChanged(JMXServerLifecycleListener.java:55)
at org.jboss.ide.eclipse.as.core.server.UnitedServerListenerManager.serverChanged(UnitedServerListenerManager.java:128)
at org.eclipse.wst.server.core.internal.ServerNotificationManager.broadcastChange(ServerNotificationManager.java:125)
at org.eclipse.wst.server.core.internal.Server.fireServerStateChangeEvent(Server.java:735)
at org.eclipse.wst.server.core.internal.Server.setServerState(Server.java:643)
at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.setServerState(ServerBehaviourDelegate.java:143)
at org.jboss.ide.eclipse.as.core.server.internal.DeployableServerBehavior.setServerStarted(DeployableServerBehavior.java:194)
at org.jboss.ide.eclipse.as.core.server.internal.DelegatingServerBehavior.setServerStarted(DelegatingServerBehavior.java:91)
at org.jboss.ide.eclipse.as.core.server.internal.AbstractJBossBehaviourDelegate.setServerStarted(AbstractJBossBehaviourDelegate.java:128)
at org.jboss.ide.eclipse.as.core.server.internal.AbstractJBossBehaviourDelegate$1.stateAsserted(AbstractJBossBehaviourDelegate.java:102)
at org.jboss.ide.eclipse.as.core.server.internal.PollThread.alertListener(PollThread.java:231)
at org.jboss.ide.eclipse.as.core.server.internal.PollThread.handlePollerHasAnswer(PollThread.java:160)
at org.jboss.ide.eclipse.as.core.server.internal.PollThread.run(PollThread.java:148)
Caused by: javax.naming.CommunicationException: Failed to connect to server /129.78.110.72:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server /129.78.110.72:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:337)
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1746)
... 21 more
Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server /129.78.110.72:1099 [Root exception is java.net.ConnectException: Connection refused: connect]
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:307)
... 22 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:97)
at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:82)
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:303)
... 22 more
I have tried to give
Also I am unable to see any of the EAR file in the deply director. Infact even when the deplyoment is successful I am not able to see that in default mode's deply directory.To see where my deplyed application is going I checked out profile.xml file's UserProfileFactory also which is <value>${jboss.server.home.url}deploy</value> But still can not see the app in deply dir.
Thanks
Meena
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/734997#734997]
Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 7 months
[JBoss Web Services] - JBossws-cxf with spring : JNDI lookup
by Damien Picard
Damien Picard [https://community.jboss.org/people/damienp] created the discussion
"JBossws-cxf with spring : JNDI lookup"
To view the discussion, visit: https://community.jboss.org/message/734966#734966
--------------------------------------------------------------
Hi,
I'm trying to deploy a web services web application using jbossws-cxf and Spring managed beans. To do that, I've installed the Spring module using snowdrop, in order to bind my web services implementor to Spring managed beans.
The jboss-cxf.xml :
<import resource="classpath:prevoyance-wsfront.xml" />
...
<jaxws:endpoint id="ispAccesEndPoint" implementor="#oteli" address="/prevoyance">
<jaxws:invoker>
<bean class='org.jboss.wsf.stack.cxf.InvokerJSE' />
</jaxws:invoker>
</jaxws:endpoint>
The implementor bean is defined in prevoyance-wsfront.xml and is rightly injected by Spring. So all things work fine ; except that I need for some beans to retrieve values from JNDI lookup.
In web.xml, I define an env-entry :
<env-entry>
<env-entry-name>sourceoWsdlUrl</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>http://...</env-entry-value>
</env-entry>
And in prevoyance-wsfront.xml, I want to retrieve the associated value via a JNDI lookup :
<bean id="invokerTarget" class="Invoker">
<constructor-arg>
<bean id="wsdlUrl" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName" value="java:comp/env/sourceoWsdlUrl" />
</bean>
</constructor-arg>
</bean>
But Spring is not able to find this entry :
nested exception is javax.naming.NameNotFoundException: java:comp/env/sourceoWsdlUrl
I think that when JBossws instantiate the web services, using Spring, the web.xml hasn't been parsed so JNDI entries don't exist. And i'm looking for another way to define such entries, or a manier to parse the web.xml before JBossws instantiate web services implementors.
Thank you.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/734966#734966]
Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 7 months
JBoss 6 Class Loading
by Jan Algermissen
Hi,
I am struggling with JBoss6 class loading. I am simply trying to achieve full isolation between two WARs that happen to include the same JAR.
For both WARs I am using
<?xml version="1.0" encoding="UTF-8"?>
<jboss-web>
<class-loading>
<loader-repository>de.stuff.foo:loader=war1.war
<loader-repository-config>java2ParentDelegation=false</loader-repository-config>
</loader-repository>
</class-loading>
</jboss-web>
and
<?xml version="1.0" encoding="UTF-8"?>
<jboss-web>
<class-loading>
<loader-repository>de.stuff.foo:loader=war2.war
<loader-repository-config>java2ParentDelegation=false</loader-repository-config>
</loader-repository>
</class-loading>
</jboss-web>
de.stuff.foo being the real top level package of the stuff I write.
Can someone explain what else I need to do to achieve complete isolation between the deployed WARs?
Is there a reference documentation for how the <class-loading> XML can be used? E.g. I fail to understand what the difference between
de.stuff.foo:loader=war2.war
and
de.stuff.foo:archive=war2.war
is among other things. All I can find are examples what one could do. but no docs.
Jan
12 years, 7 months