[JBoss jBPM] - Re: next task/node name in processInstance
by cheets
sorry for not being more clear, but my scenario is like this.. A user performs some action to finish a task on one webpage. In the java side, I capture what action the user performed, modify the task accordingly (set variables, etc), end it and close the context.
now, to decide which page to show next, i need to know what the next task is going to be. I retrieve the same processInstance from the tables, and find out the current unfinished tasks, but it gives me the same previous task as unfinished when i use jbpmtemplate.findProcessInstance(processId), although the database has been updated with the new task status.
I resolved this problem by using jbpmcontext.loadProcessInstance(processId), which gives me an updated data set from the database.
(why did this happen, is this expected behavior?)
I realize now that getting the next task is not possible as such, because a task may end and then fork into multiple tasks, or go into wait for join, in both cases, something like task.nextTask is not possible to retrieve. am i right?
thanks for all the replies!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4078212#4078212
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4078212
18Â years, 8Â months
[Security & JAAS/JBoss] - Accessing a secured bean deployed in one JBOSS from other Jb
by satheeskumar
Hi,
The senario: The UserManagerBean is deployed in a JBOSS and this bean
is used to login to the application. As a stand alone java class (Client)
using the following code I could call the login() on the remote of that Bean.
System.setProperty("java.security.auth.login.config",Constants.AUTH_CONF_FILE_PATH);
props.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY,"org.jboss.naming.NamingContextFactory");
props.setProperty("java.naming.factory.url.pkgs","org.jboss.naming:org.jnp.interfaces");
props.put(javax.naming.Context.PROVIDER_URL, "jnp://Anton:10099");
props.put("java.naming.factory.initial","org.jboss.security.jndi.LoginInitialContextFactory");
props.put(javax.naming.Context.SECURITY_PRINCIPAL, user);
props.put(javax.naming.Context.SECURITY_CREDENTIALS, password);
props.put(javax.naming.Context.SECURITY_CREDENTIALS, JCrypt.crypt(user,password));
ic = new InitialContext(props);userHome=(EJBHome)
PortableRemoteObject.narrow(ic.lookup(name), home);
userRemote = userHome . create(); .<= error
userRemote.login();
userRemote.getCurrentUser(),........
and If I deployed this class into a another JBOSS in war file and and tried
to login() on userRemote , Unfortunately I got the error when I create
the userRemote from the home
*both JBOSS are running in 2 different machine
Could you please advice on this Issue ?
the error is ...
11:32:33,698 INFO [STDOUT] : java.rmi.AccessException: SecurityException; nested ex
ception is: javax.security.auth.login.LoginException: An error occured during login: java.lang.NullPoint
erException
11:32:33,698 ERROR [STDERR] java.rmi.AccessException: SecurityException; nested exception is:
javax.security.auth.login.LoginException: An error occured during login: java.lang.NullPoint
erException
11:32:33,698 ERROR [STDERR] at org.jboss.ejb.plugins.LogInterceptor.handleException(LogIntercept
or.java:370)
11:32:33,698 ERROR [STDERR] at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.ja
va:125)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4078211#4078211
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4078211
18Â years, 8Â months