[jBPM] - userGroupCallback : getGroupTaskList
by Sandra Renaud
Sandra Renaud [https://community.jboss.org/people/joploya] created the discussion
"userGroupCallback : getGroupTaskList"
To view the discussion, visit: https://community.jboss.org/message/797693#797693
--------------------------------------------------------------
Hello,
I encounter problem while retrieving group tasks list. Indeed their is a unique method call for user and group task in LocalTaskService. But when I pass a group id in argument to the function
it call this method in TAskServiceSession :
@SuppressWarnings("unchecked")
public List<TaskSummary> getTasksAssignedAsPotentialOwnerByStatus(String userId, List<Status> status, String language) {
doCallbackUserOperation(userId);
List<String> groupIds = doUserGroupCallbackOperation(userId, null);
HashMap<String, Object> params = addParametersToMap(
"userId", userId,
"groupIds", groupIds,
"language", language,
"status", status);
return (List<TaskSummary>) tpm.queryWithParametersInTransaction("TasksAssignedAsPotentialOwnerByStatusWithGroups", params);
}
Because userId parameter is actually a groupId, the second call return an empty List.
So query failed because it miss an argument:
where t.archived = 0
and ( potentialOwners.id = :userId
or potentialOwners.id in () )
I don't figure out what is wrong in my implementation.
Thankyou very much to help me.
Regards,
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/797693#797693]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years
[jBPM] - Re: Jbpm 5.3 JPA2 Jboss 7.1.1 table "dbo.OrganizationalEntity", column 'id'.
by Ted Pan
Ted Pan [https://community.jboss.org/people/ted.pan] created the discussion
"Re: Jbpm 5.3 JPA2 Jboss 7.1.1 table "dbo.OrganizationalEntity", column 'id'."
To view the discussion, visit: https://community.jboss.org/message/774673#774673
--------------------------------------------------------------
you need to add the user to takservice by using the following code
|
|
|
| Properties userGroups = new Properties(); |
|
|
|
| userGroups.setProperty("john", "user"); |
|
|
|
| UserGroupCallbackManager manager = UserGroupCallbackManager.getInstance(); |
|
|
|
| manager.setCallback(new DefaultUserGroupCallbackImpl(userGroups)); |
*or* implement a an UserGroupCallback. Then
UserGroupCallbackManager manager = UserGroupCallbackManager
.getInstance();
if (!manager.existsCallback()) {
UserGroupCallback userGroupCallback = new JBPMUserGroupCallback();
manager.setCallback(userGroupCallback);
}
this is the callback implementation:
public class JBPMUserGroupCallback implements UserGroupCallback {
@Override
public boolean existsGroup(String groupId) {
return true;
}
@Override
public boolean existsUser(String userId) {
return true;
}
@Override
public List<String> getGroupsForUser(String userId, List<String> groupIds,
List<String> allExistingGroupIds) {
if(groupIds != null) {
List<String> retList = new ArrayList<String>(groupIds);
// merge all groups
if(allExistingGroupIds != null) {
for(String grp : allExistingGroupIds) {
if(!retList.contains(grp)) {
retList.add(grp);
}
}
}
return retList;
} else {
//
// return empty list by default
//please note: there are different return value for different version of jPBM
//List<String> retList = new ArrayList<String>();
//retList.add("user");
//return retList;
//return new ArrayList<String>(); //for jBPM5.3.0.Final
return null; //for jBPM5.4.0.CR1
}
}
}
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/774673#774673]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 1 month
[IronJacamar] - JCA Spec violation using resource-adapter in JBoss 7?
by jleinawe
jleinawe [https://community.jboss.org/people/jleinawe] created the discussion
"JCA Spec violation using resource-adapter in JBoss 7?"
To view the discussion, visit: https://community.jboss.org/message/799730#799730
--------------------------------------------------------------
JBoss AS 7.1.1.Final-SNAPSHOT
JBoss IronJacamar 1.0.8.Final
Testing a JMS resource-adapter deployed to JBoss which will use WebLogic as the JMS provider. In a transacted MDB test, this error appears in the JBoss log (which is attached) when the MDB tries to send and outbound reply message
11:18:24,023 ERROR [stderr] (default-short-running-threads-threads - 1) javax.transaction.xa.XAException: J2EE GJRA-01501: cause = Attempt to start a transaction while in an active (global or local) transaction.; action = Complete current transaction before starting another
By analysis our RA's own tracing, this looks like a JCA spec violation. xaResourceWrapper2 (the XAResource for managedConnectionImpl0) is being enlisted with xid3. Then without delisting xaResourceWrapper2, jboss is doing a managedConnectionImpl0.cleanup() call (which is a JCA spec violation). Then later when it tries to enlist xaResourceWrapper2 with xid5, that fails because xaResourceWrapper2 is still enlisted with xid3. (That enlistment attempt is not even getting to WebLogic JMS because the RA is detecting the XA protocol violation.)
Excerpts from log:
out:MessageEndpoint.beforeDelivery(public abstract void javax.jms.MessageListener.onMessage(javax.jms.Message)) #4 @1361560688075..1361560688295
in:xaResourceWrapper0.setTransactionTimeout(300) -> true #4 @1361560688102..1361560688173
out:XAResource.setTransactionTimeout(300) -> true #4 @1361560688126..1361560688155
in:xaResourceWrapper0.start(xid3,0) #4 @1361560688191..1361560688277 [TMNOFLAGS]
out:XAResource.start(xid3,0) #4 @1361560688223..1361560688260 [TMNOFLAGS]
[...]
out:MessageListener.onMessage(genericStreamMessage0) #1 @1361560697008..1361560702586
in:wlxaQueueConnectionFactory0.createConnection() -> wlConnection0 #1 @1361560698037..1361560700740
out:ConnectionManager.allocateConnection(wlManagedXAQueueConnectionFactory0,connectionRequestInfoImpl0) -> wlConnection0 #1 @1361560698093..1361560700687
[...]
*in:managedConnectionImpl0.getXAResource() -> xaResourceWrapper2* #1 @1361560699619..1361560699675
[...]
*in:xaResourceWrapper2.start(xid3,2097152)* #6 @1361560700092..1361560700275 [TMJOIN]
out:XAResource.start(xid3,2097152) #6 @1361560700157..1361560700226 [TMJOIN]
[...]
out:MessageEndpoint.afterDelivery() #4 @1361560702595..1361560702930
in:xaResourceWrapper0.end(xid3,67108864) #4 @1361560702612..1361560702709 [TMSUCCESS]
out:XAResource.end(xid3,67108864) #5 @1361560702649..1361560702688 [TMSUCCESS]
in:xaResourceWrapper0.commit(xid3,true) #4 @1361560702729..1361560702851
out:XAResource.commit(xid3,true) #4 @1361560702766..1361560702830
i*n:managedConnectionImpl0.cleanup()* #1 @1361560702871..1361560702904 [JCA spec violation]
out:MessageEndpoint.beforeDelivery(public abstract void javax.jms.MessageListener.onMessage(javax.jms.Message)) #6 @1361560702938..1361560703159
[...]
out:MessageConsumer.receive(15000) -> TextMessage[ID:<384827.1361560696991.0>, null] #6 @1361560703168..1361560703201
out:MessageListener.onMessage(genericTextMessage0) #2 @1361560703226..1361560704964
in:wlxaQueueConnectionFactory0.createConnection() threw #2 @1361560703250..1361560704672
out:ConnectionManager.allocateConnection(wlManagedXAQueueConnectionFactory0,connectionRequestInfoImpl0) threw #2 @1361560703307..1361560704447
[...]
i*n:xaResourceWrapper2.start(xid5,2097152) threw* #8 @1361560703786..1361560703871 [TMJOIN]
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/799730#799730]
Start a new discussion in IronJacamar at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 1 month
[Beginner's Corner] - Problem with connection factories
by kevin allan
kevin allan [https://community.jboss.org/people/keallan] created the discussion
"Problem with connection factories"
To view the discussion, visit: https://community.jboss.org/message/799991#799991
--------------------------------------------------------------
Hi All-
Newbie here. I've run into a situation while running jBoss 5.1. Not even sure where to start. I can't seem to resolve a connection issue. I get errors for both Tx connection factory component (jms-ds.xml) and errors pertaining to the messaging component (connection-factories-service.xml). I did a search for both and can access them. In going to the jBoss AS Admin Console, it shows under "connection factories" that the "jmsXA" connection factory is "down" and unavailable". Also that JMS destination queues are "down" and "unavailable". I suspect the latter is a result of the former. I've been trying to run this down for weeks and need some help.
Many thanks for contructive input.
Here is an error log from the connection factories:
1. java.lang.reflect.UndeclaredThrowableException: Failed to invoke method 'listStatistics' on component 'jboss.jca:name=JmsXA,service=ManagedConnectionPool' with parameters [].
at org.jboss.profileservice.management.KernelBusRuntimeComponentDispatcher.invoke(KernelBusRuntimeComponentDispatcher.java:201)
at org.jboss.profileservice.management.DelegatingComponentDispatcherImpl.invoke(DelegatingComponentDispatcherImpl.java:69)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:121)
at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
at org.jboss.profileservice.remoting.ProfileServiceInvocationHandler.invoke(ProfileServiceInvocationHandler.java:97)
at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:891)
at org.jboss.remoting.transport.local.LocalClientInvoker.invoke(LocalClientInvoker.java:106)
at org.jboss.remoting.Client.invoke(Client.java:1724)
at org.jboss.remoting.Client.invoke(Client.java:629)
at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:60)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.aspects.remoting.MergeMetaDataInterceptor.invoke(MergeMetaDataInterceptor.java:74)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:65)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.aop.generatedproxies.AOPProxy$0.invoke(AOPProxy$0.java)
at org.jboss.profileservice.management.ManagedOperationDelegate.invoke(ManagedOperationDelegate.java:64)
at org.rhq.plugins.jbossas5.ManagedComponentComponent.invokeOperation(ManagedComponentComponent.java:159)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:482)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.IllegalArgumentException: No such context: jboss.jca:name=JmsXA,service=ManagedConnectionPool
at org.jboss.kernel.plugins.registry.basic.BasicKernelBus.execute(BasicKernelBus.java:51)
at org.jboss.kernel.plugins.registry.basic.BasicKernelBus.invoke(BasicKernelBus.java:92)
at org.jboss.profileservice.management.KernelBusRuntimeComponentDispatcher.invoke(KernelBusRuntimeComponentDispatcher.java:186)
at org.jboss.profileservice.management.DelegatingComponentDispatcherImpl.invoke(DelegatingComponentDispatcherImpl.java:69)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:121)
at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
at org.jboss.profileservice.remoting.ProfileServiceInvocationHandler.invoke(ProfileServiceInvocationHandler.java:97)
at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:891)
at org.jboss.remoting.transport.local.LocalClientInvoker.invoke(LocalClientInvoker.java:106)
at org.jboss.remoting.Client.invoke(Client.java:1724)
at org.jboss.remoting.Client.invoke(Client.java:629)
at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:60)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.aspects.remoting.MergeMetaDataInterceptor.invoke(MergeMetaDataInterceptor.java:74)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:65)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.aop.generatedproxies.AOPProxy$0.invoke(AOPProxy$0.java)
at org.jboss.profileservice.management.ManagedOperationDelegate.invoke(ManagedOperationDelegate.java:64)
at org.rhq.plugins.jbossas5.ManagedComponentComponent.invokeOperation(ManagedComponentComponent.java:159)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:482)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:72)
... 18 more
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/799991#799991]
Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 1 month