[jBPM] - Re: Human Task Assignment -- restrict based on process variables
by jemmerling
jemmerling [https://community.jboss.org/people/jemmerling] created the discussion
"Re: Human Task Assignment -- restrict based on process variables"
To view the discussion, visit: https://community.jboss.org/message/645998#645998
--------------------------------------------------------------
OK,
I believe I have at least partially answered this question for myself.
>From looking at code, it appears to me that most logic associated with with "task assignment" is in org.jbpm.task.service.TaskServiceSession.
So it appears that the method executeTaskAddRules has the purpose of allowing the developer (or analyst?) to define any rule he or she wants using any content they have defined. So, for example, if you have a process consisting of two approval steps, and you want to define a rule that states that an the actor that completed the first approval step may not be assigned the second approval step (even if both actors, in general, are eligible to perform that step) you would simply keep track of whatever actor approved the first step then define a rule that prevents that actor from being assigned to the second step.
Note that this method is one of the few in jBPM5 that I have encountered so far which has any JavaDoc, so I am guessing it's an important method to understand.
Taking note of the fact that this method throws an exception when a rule is violated, I need to investigate further to determine how to leverage this functionality in such a way that the routine application of a rule does not case a user to experience an error message.
If somebody can confirm that this is the correct general approach, please reply and I will update this thread to "Answered". Also if you know of any example for implementing such a rule, please point me to it, if you don't mind, thanks!
--JE
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/645998#645998]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
14 years, 2 months
[Beginner's Corner] - JBoss Clustering 5.1 (Discovery Interrupt Failure)
by Sridhar Iyer
Sridhar Iyer [http://community.jboss.org/people/sri4jb4rel] created the discussion
"JBoss Clustering 5.1 (Discovery Interrupt Failure)"
To view the discussion, visit: http://community.jboss.org/message/645886#645886
--------------------------------------------------------------
I am planning to do a set up of JBoss Clustering using the community version 5.1.0. Followed the instructions mentioned in the link http://docs.jboss.org/jbossclustering/cluster_guide/5.1/html-single/index... http://docs.jboss.org/jbossclustering/cluster_guide/5.1/html-single/index.... But post deploying the 2 node cluster once in single machine and second try I did in two machines. In both the cases I am getting the below error continuously post the server are started. I am able to view the applications in stanalong httpURLs but due to the below error i m confused to understand if really my instances are part of the cluster
Moreover i never find in the logs of the server that my custoem cluster has two nodes participated
My question remains
1) Has the cluster formed properly?
2) How to check if an instance is part of a customised cluster and its member nodes? Is there any way in JMX console
3) How to verify if Muticast is working properly or not?
*Error in both server log is*
##########################################################################################################################
2012-01-11 11:52:25,370 ERROR [org.jgroups.protocols.MPING] (Timer-2,10.185.254.80:7901) failed sending discovery request
java.io.InterruptedIOException: operation interrupted
at java.net.PlainDatagramSocketImpl.send(Native Method)
at java.net.DatagramSocket.send(DatagramSocket.java:625)
at org.jgroups.protocols.MPING.sendMcastDiscoveryRequest(MPING.java:341)
at org.jgroups.protocols.PING.sendGetMembersRequest(PING.java:259)
at org.jgroups.protocols.Discovery$PingSenderTask$1.run(Discovery.java:407)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:280)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:135)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:65)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:146)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:170)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:651)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:676)
at java.lang.Thread.run(Thread.java:637)
##########################################################################################################################
*When verified what is port and IP combination i found its not related to my cluster.* Please check the GSM below its of Messaging
##########################################################################################################################
---------------------------------------------------------
GMS: address is 10.185.254.80:7901 (cluster=MessagingPostOffice-DATA)
---------------------------------------------------------
2012-01-11 11:16:08,061 INFO [org.jboss.jms.server.connectionfactory.ConnectionFactory] (main) Connector bisocket://10.185.254.80:4557 has le
asing enabled, lease period 10000 milliseconds
2012-01-11 11:16:08,061 INFO [org.jboss.jms.server.connectionfactory.ConnectionFactory] (main) org.jboss.jms.server.connectionfactory.Connect
http://community.jboss.org/mailto:ionFactory@15d8350 ionFactory@15d8350 started
2012-01-11 11:16:08,072 INFO [org.jboss.jms.server.connectionfactory.ConnectionFactory] (main) Connector bisocket://10.185.254.80:4557 has le
asing enabled, lease period 10000 milliseconds
##########################################################################################################################
*Wrt to my Cluster 'DEVCLUST' I dont find differnt nodes participating*. Please find its Related Logs below
##########################################################################################################################
"2012-01-11 11:15:26,436 INFO [org.jboss.mail.MailService] (main) Mail Service bound to java:/Mail
2012-01-11 11:15:28,692 INFO [org.jboss.jmx.adaptor.snmp.agent.SnmpAgentService] (main) SNMP agent going active
2012-01-11 11:15:35,855 INFO [org.jboss.ha.framework.interfaces.HAPartition.DEVCLUST] (main) Initializing partition DEVCLUST
2012-01-11 11:15:35,966 INFO [STDOUT] (JBoss System Threads(1)-3)
---------------------------------------------------------
GMS: address is 10.185.254.80:58862 (cluster=DEVCLUST)
---------------------------------------------------------
2012-01-11 11:15:36,335 INFO [org.jboss.cache.jmx.PlatformMBeanServerRegistration] (main) JBossCache MBeans were successfully registered to t
he platform mbean server.
2012-01-11 11:15:36,502 INFO [STDOUT] (main)
---------------------------------------------------------
GMS: address is 10.185.254.80:58862 (cluster=DEVCLUST-HAPartitionCache)
---------------------------------------------------------
2012-01-11 11:15:38,065 INFO [org.jboss.ha.framework.interfaces.HAPartition.DEVCLUST] (JBoss System Threads(1)-3) Number of cluster members:
1
2012-01-11 11:15:38,065 INFO [org.jboss.ha.framework.interfaces.HAPartition.DEVCLUST] (JBoss System Threads(1)-3) Other members: 0
2012-01-11 11:15:38,513 INFO [org.jboss.cache.RPCManagerImpl] (main) Received new cluster view: [10.185.254.80:58862|0] [10.185.254.80:58862]
2012-01-11 11:15:38,521 INFO [org.jboss.cache.RPCManagerImpl] (main) Cache local address is 10.185.254.80:58862
2012-01-11 11:15:38,529 INFO [org.jboss.cache.RPCManagerImpl] (main) state was retrieved successfully (in 2.02 seconds)
2012-01-11 11:15:38,625 INFO [org.jboss.cache.factories.ComponentRegistry] (main) JBoss Cache version: JBossCache 'Cascabel' 3.1.0.GA
2012-01-11 11:15:38,529 INFO [org.jboss.cache.RPCManagerImpl] (main) state was retrieved successfully (in 2.02 seconds)
2012-01-11 11:15:38,625 INFO [org.jboss.cache.factories.ComponentRegistry] (main) JBoss Cache version: JBossCache 'Cascabel' 3.1.0.GA
2012-01-11 11:15:38,626 INFO [org.jboss.ha.framework.interfaces.HAPartition.DEVCLUST] (main) Fetching serviceState (will wait for 30000 milli
seconds):
2012-01-11 11:15:38,631 INFO [org.jboss.ha.framework.interfaces.HAPartition.DEVCLUST] (main) State could not be retrieved (we are the first m
ember in group)
2012-01-11 11:15:38,796 INFO [org.jboss.ha.jndi.HANamingService] (main) Started HAJNDI bootstrap; jnpPort=1200, backlog=50, bindAddress=/10.1
85.254.80
2012-01-11 11:15:38,816 INFO [org.jboss.ha.jndi.DetachedHANamingService$AutomaticDiscovery] (main) Listening on /10.185.254.80:1102, group=23
9.255.100.101, HA-JNDI address=10.185.254.80:1200
2012-01-11 11:15:42,220 INFO [org.jboss.invocation.unified.server.UnifiedInvokerHA] (main) Service name is jboss:service=invoker,type=unified
ha
2012-01-11 11:15:45,498 WARN [org.jboss.jms.server.jbosssx.JBossASSecurityMetadataStore] (main) WARNING! POTENTIAL SECURITY RISK. It has been
detected that the MessageSucker component which sucks messages from one node to another has not had its password changed from the installatio
n default. Please see the JBoss Messaging user guide for instructions on how to do this.
2012-01-11 11:15:45,575 WARN [org.jboss.annotation.factory.AnnotationCreator] (main) No ClassLoader provided, using TCCL: org.jboss.managed.a
pi.annotation.ManagementComponent
2012-01-11 11:15:46,041 WARN [org.jboss.annotation.factory.AnnotationCreator] (main) No ClassLoader provided, using TCCL: org.jboss.managed.a
pi.annotation.ManagementComponent
2012-01-11 11:15:46,246 INFO [com.arjuna.ats.jbossatx.jta.TransactionManagerService] (main) JBossTS Transaction Service (JTA version - tag:JB
OSSTS_4_6_1_GA) - JBoss Inc.
2012-01-11 11:15:46,247 INFO [com.arjuna.ats.jbossatx.jta.TransactionManagerService] (main) Setting up property manager MBean and JMX layer
2012-01-11 11:15:46,966 INFO [com.arjuna.ats.jbossatx.jta.TransactionManagerService] (main) Initializing recovery manager
2012-01-11 11:15:47,352 INFO [com.arjuna.ats.jbossatx.jta.TransactionManagerService] (main) Recovery manager configured
2012-01-11 11:15:47,353 INFO [com.arjuna.ats.jbossatx.jta.TransactionManagerService] (main) Binding TransactionManager JNDI Reference
2012-01-11 11:15:47,463 INFO [com.arjuna.ats.jbossatx.jta.TransactionManagerService] (main) Starting transaction recovery manager"
##########################################################################################################################
This is how i started in single instance mode
./run_a.sh -c MYCLUSTER -g DEVCLUST -u 239.255.100.100 -b 10.185.254.80 -Djboss.messaging.ServerPeerID=1 -
Djboss.service.binding.set=ports-default &
./run_b.sh -c MYCLUSTER2 -g DEVCLUST -u 239.255.100.101 -b 10.185.254.80 -Djboss.messaging.ServerPeerID=2 -Djboss.service.binding.set=ports-01
&
In different machine set up i avoided the -Djboss.service.binding.set attibutes.
*Configuration I Changed*
1) ../server/<node1>/deploy/messaging/messaging-service.xml
Set the ServerPeerID to what used in run.sh command line
2) ../server/<node1>/deploy/jbossweb.sar/service.xml
In the Engine XML element specified the jvmRoute="MYCLUSTER"
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/645886#645886]
Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 2 months
[jBPM] - Console crashes on opening Process Overview (fresh jBPM5.2 installation)
by hamsterdancer
hamsterdancer [http://community.jboss.org/people/hamsterdancer] created the discussion
"Console crashes on opening Process Overview (fresh jBPM5.2 installation)"
To view the discussion, visit: http://community.jboss.org/message/642936#642936
--------------------------------------------------------------
Hi there,
I've just downloaded and installed jBPM5.2 with the installer and started the demo. Then I log me in to the console ( http://localhost:8080/jbpm-console http://localhost:8080/jbpm-console) with krisv (or any other user name) and click Processes -> Process Overview. The console crashes with the following less helpful Exception.
Maybe I forgot to configure something to configure. But I was relying on my experiences with jBPM5.0 and 5.1 where it was not needed to configure jBPM or the console in any way for the first start.
Any good ideas or advices? Thanks :)
Stacktrace:
18:24:27,443 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/gwt-console-server].[Resteasy]] (http-localhost-127.0.0.1-8080-6) Servlet.service() for servlet Resteasy threw exception: org.jboss.resteasy.spi.UnhandledException: java.lang.RuntimeException: Could not initialize stateful knowledge session: org.apache.commons.codec.binary.Base64.encodeBase64String([B)Ljava/lang/String;
at org.jboss.resteasy.core.SynchronousDispatcher.unwrapException(SynchronousDispatcher.java:345) [resteasy-jaxrs-2.2.1.GA.jar:]
at org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:321) [resteasy-jaxrs-2.2.1.GA.jar:]
at org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:214) [resteasy-jaxrs-2.2.1.GA.jar:]
at org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:190) [resteasy-jaxrs-2.2.1.GA.jar:]
at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:534) [resteasy-jaxrs-2.2.1.GA.jar:]
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:496) [resteasy-jaxrs-2.2.1.GA.jar:]
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119) [resteasy-jaxrs-2.2.1.GA.jar:]
at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208) [resteasy-jaxrs-2.2.1.GA.jar:]
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55) [resteasy-jaxrs-2.2.1.GA.jar:]
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50) [resteasy-jaxrs-2.2.1.GA.jar:]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59) [classes:]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:139) [jboss-as-web-7.0.2.Final.jar:7.0.2.Final]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:480) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.jboss.as.web.NamingValve.invoke(NamingValve.java:57) [jboss-as-web-7.0.2.Final.jar:7.0.2.Final]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:154) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:667) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:952) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at java.lang.Thread.run(Thread.java:722) [:1.7.0]
Caused by: java.lang.RuntimeException: Could not initialize stateful knowledge session: org.apache.commons.codec.binary.Base64.encodeBase64String([B)Ljava/lang/String;
at org.jbpm.integration.console.CommandDelegate.newStatefulKnowledgeSession(CommandDelegate.java:244) [jbpm-gwt-core-5.2.0.Final.jar:]
at org.jbpm.integration.console.CommandDelegate.getSession(CommandDelegate.java:252) [jbpm-gwt-core-5.2.0.Final.jar:]
at org.jbpm.integration.console.CommandDelegate.<init>(CommandDelegate.java:92) [jbpm-gwt-core-5.2.0.Final.jar:]
at org.jbpm.integration.console.ProcessManagement.<init>(ProcessManagement.java:35) [jbpm-gwt-core-5.2.0.Final.jar:]
at org.jbpm.integration.console.ManagementFactory.createProcessManagement(ManagementFactory.java:22) [jbpm-gwt-core-5.2.0.Final.jar:]
at org.jbpm.integration.console.ManagementFactory.createProcessManagement(ManagementFactory.java:19) [jbpm-gwt-core-5.2.0.Final.jar:]
at org.jboss.bpm.console.server.ProcessMgmtFacade.getProcessManagement(ProcessMgmtFacade.java:86) [classes:]
at org.jboss.bpm.console.server.ProcessMgmtFacade.getDefinitionsJSON(ProcessMgmtFacade.java:122) [classes:]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.7.0]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [:1.7.0]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [:1.7.0]
at java.lang.reflect.Method.invoke(Method.java:601) [:1.7.0]
at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:140) [resteasy-jaxrs-2.2.1.GA.jar:]
at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:255) [resteasy-jaxrs-2.2.1.GA.jar:]
at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:220) [resteasy-jaxrs-2.2.1.GA.jar:]
at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:209) [resteasy-jaxrs-2.2.1.GA.jar:]
at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:519) [resteasy-jaxrs-2.2.1.GA.jar:]
... 24 more
Caused by: java.lang.NoSuchMethodError: org.apache.commons.codec.binary.Base64.encodeBase64String([B)Ljava/lang/String;
at org.jbpm.integration.console.shared.GuvnorConnectionUtils.applyAuth(GuvnorConnectionUtils.java:391) [jbpm-gwt-shared-5.2.0.Final.jar:]
at org.jbpm.integration.console.shared.GuvnorConnectionUtils.guvnorExists(GuvnorConnectionUtils.java:484) [jbpm-gwt-shared-5.2.0.Final.jar:]
at org.jbpm.integration.console.CommandDelegate.newStatefulKnowledgeSession(CommandDelegate.java:105) [jbpm-gwt-core-5.2.0.Final.jar:]
... 40 more
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/642936#642936]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 2 months
[jBPM] - Removing Human Tasks
by Fernando Ribeiro
Fernando Ribeiro [http://community.jboss.org/people/fribeiro1] created the discussion
"Removing Human Tasks"
To view the discussion, visit: http://community.jboss.org/message/645931#645931
--------------------------------------------------------------
I'm currently getting "java.lang.RuntimeException: Couldn't remove user krisv since it isn't a notification recipient" when trying to remove a task created with the following code:
{code}final BlockingAddTaskResponseHandler handler = new BlockingAddTaskResponseHandler();
final Task task = new Task();
final PeopleAssignments peopleAssignments = new PeopleAssignments();
final List<OrganizationalEntity> potentialOwners = new ArrayList<OrganizationalEntity>();
potentialOwners.add(new User("krisv"));
peopleAssignments.setPotentialOwners(potentialOwners);
task.setPeopleAssignments(peopleAssignments);
task.setTaskData(new TaskData());
client.addTask(task, null, handler);
System.out.println(handler.getTaskId());
client.disconnect();{code}
Does a task need to be in a certain status for being removed with TaskClient.remove?
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/645931#645931]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 2 months