[JBoss jBPM] - How Continue Process Execution Using Java (Without the jBPM
by Fornachari
Hello everybody!
I think that my doubt is a little confuse, I'll try to explain best possible.
I have a test process, created with jBPM 3.2.2, and I want to execute it without the jBPM console.
It's a very simple process, just to learn more about jBPM.
There are two Task-Nodes, the first node is assigned to the actor "user". The user make a requisition, typing his name in a field and typing his requisition in another field, then press the button "Submit". After that, the process go to the second task-node, assigned for the actor "admin". The admin read the user's name and the user's requisition. Then the admin type some information in a field called "Admin's Comment" and click in the button "OK", then the process go to the end state and finish.
I tested my process in the jBPM Console and everything works well, but I would like to run the process in my own JSP page, without the jBPM console.
I can start the process and execute the first task with java implementation, like below:
JbpmConfiguration jbpmConfiguration = JbpmConfiguration.parseResource("default.jbpm.cfg.xml");
| JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
| GraphSession gpSession = jbpmContext.getGraphSession();
|
| ProcessDefinition pdef = gpSession.findLatestProcessDefinition("MyProcessName");
| ProcessInstance instance = pdef.createProcessInstance();
|
| //set initial values
| instance.getContextInstance().setVariable("userName", "John");
| instance.getContextInstance().setVariable("requisition", "John's Requisition");
|
| Token token = instance.getRootToken();
| token.signal();
|
| jbpmContext.close();
The code above works well, I can start my process and execute the first task. But, what kind of java implementation I have to do to continue the execution, to execute the next task?
Any help, any idea?
Thank in advance!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4156741#4156741
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4156741
17 years, 10 months
[Security & JAAS/JBoss] - Simple JAAS authentication not working....
by j0llyr0g3r
Hey folks,
i am really becoming desperate with Jboss + JAAS.
I have a very simple RMI client which connects to a Stateless Session Bean running within a Jboss 4.2.
This scenario works perfectly well. Now i want to secure access to my EJB by allowing only authenticated clients to call the EJB's method.
Based on the official documentation: http://docs.jboss.org/jbossas/jboss4guide/r1/html/ch8.chapter.html
i started out with the most simple authentication possible using UsersRolesLoginModule as login module:
* Create the file users.properties in the ejb-jar subproject under the directory META-INF:
admin=secretadminpassword
| user=secretuserpassword
* Create the file roles.properties in the ejb-jar subproject under the directory META-INF:
| admin=adminRole
| user=userRole
* Add a ejb-jar.xml to the ejb-jar subproject under the directory META-INF:
| <ejb-jar>
| <assembly-descriptor>
| <security-role>
| <description>admin: only allowed users</description>
| <role-name>adminRole</role-name>
| </security-role>
| <security-role>
| <description>users: the rest</description>
| <role-name>userRole</role-name>
| </security-role>
| <method-permission>
| <role-name>admin</role-name>
| <method>
| <ejb-name>SendCommand</ejb-name>
| <method-name>*</method-name>
| </method>
| </method-permission>
| </assembly-descriptor>
| </ejb-jar>
* Add the file jboss.xml under the directory /$PROJECT-ROOT/META-INF
<jboss>
| <security-domain>java:/jaas/esf</security-domain>
| <enterprise-beans>
| <session>
| <ejb-name>SendCommand</ejb-name>
| <jndi-name>SendCommand</jndi-name>
| </session>
| </enterprise-beans>
| </jboss>
* Adjust the file login-config.xml under the directory $JBOSS_HOME/server/$PROFILE/conf/
<application-policy name = "esf">
| <authentication>
| <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule" flag = "required" />
| </authentication>
| </application-policy>
|
So far, so good....
If i rebuild my application and inspect the EAR's content, i see all the expected files there, meaning jboss.xml, user.properties etc....
But: I can still connect with my RMI-client to my EJB even without giving credentials at all!
No error messages, no exceptions....
Any ideas what went wrong here?
Is there a way to check what Jboss sees as a security domain?
P.S.: Jaas may be great due to its modularity, but it is horrible, unbelievably horrible to configure for a Jaas-beginner. This is an utter catastrophy, how long do i have to study Jaas to get a simple authentication working?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4156738#4156738
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4156738
17 years, 10 months
Delivery Status Notification (Failure)
by postmaster@lists.jboss.org
This is an automatically generated Delivery Status Notification.
Unable to deliver message to the following recipients, because the message was forwarded more than the maximum allowed times. This could indicate a mail loop.
rima.s(a)technodom.kz
17 years, 10 months