-
1. Re: jbpm Interface
kukeltje May 4, 2006 4:03 AM (in response to medjbpm)If it does not work, are there errors?
-
2. Re: jbpm Interface
medjbpm May 4, 2006 4:14 AM (in response to medjbpm)the error is
Erreur de validation -
-
4. Re: jbpm Interface
medjbpm May 4, 2006 7:56 AM (in response to medjbpm)Great!
please try to do this changement
and you will appreciate
thanks -
-
6. Re: jbpm Interface
medjbpm May 4, 2006 10:49 AM (in response to medjbpm)i see this link
i think that you have not understand me
i am trying to resolv these problem by i don't arrive
that whay i demand your help
i you have not
not problem
just don't replay
thank you -
7. Re: jbpm Interface
medjbpm May 8, 2006 8:02 AM (in response to medjbpm)my userBean.java:
/*
* JBoss, Home of Professional Open Source
* Copyright 2005, JBoss Inc., and individual contributors as indicated
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jbpm.webapp.bean;
/*import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;*/
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import javax.faces.model.SelectItem;
//import org.hibernate.Query;
import org.hibernate.Session;
import org.jbpm.JbpmContext;
//import org.jbpm.db.JbpmSession;
import org.jbpm.identity.User;
import org.jbpm.identity.hibernate.IdentitySession;
public class UserBean {
String userName;
String pwd;
public String getUserName() {
return userName;
}
public void setUserName(String name) {
this.userName = name;
}
public String getPwd() {
return pwd;
}
public void setPwd(String pwd) {
this.pwd= pwd;
}
/* public String login() {
JbpmContext.getCurrentJbpmContext().setActorId(userName);
return "home";
}*/
public String login() {
Session session = JbpmContext.getCurrentJbpmContext().getSession();
IdentitySession identitySession = new IdentitySession(session);
Object found =identitySession.verify(userName,pwd);
System.out.print("" + userName) ;
if(found != null && userName.compareTo("Agent_Acceuil")==0) {
System.out.print("1") ;
JbpmContext.getCurrentJbpmContext().setActorId(userName);
return "home";
}
else if(found!=null && userName.compareTo("Agent_Acceuil")!=0) {
System.out.print("2") ;
JbpmContext.getCurrentJbpmContext().setActorId(userName);
return "homeresp";
}
else
return "login";
}
public List getUsers() {
Session session = JbpmContext.getCurrentJbpmContext().getSession();
IdentitySession identitySession = new IdentitySession(session);
return identitySession.getUsers();
}
public List getUserSelectItems() {
List userSelectItems = new ArrayList();
Iterator iter = getUsers().iterator();
while (iter.hasNext()) {
User user = (User) iter.next();
userSelectItems.add(new UserSelectItem(user));
}
return userSelectItems;
}
public static class UserSelectItem extends SelectItem {
private static final long serialVersionUID = 1L;
public UserSelectItem(User user) {
setValue(user.getName());
setLabel(user.getName());
}
}
}
My login.jsp
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<f:view>
<jsp:include page="Bienvenu.jsp" />
<h:messages/>
Identification
<h:form id="login" >
<!-- Login           :
<h:selectOneMenu id="username" required="true" value="#{userBean.userName}">
<f:selectItems value="#{userBean.userSelectItems}" />
</h:selectOneMenu>
-->
Login           :
<h:inputText id="userName" value="#{userBean.userName}"/>
Mot de Passe : <h:inputSecret id="pwd" value="#{userBean.pwd}"/>
<h:commandButton action="#{userBean.login}" value="Connection" />
</h:form>
<jsp:include page="footer.jsp" />
</f:view>
i get the following error
.Erreur de validation
Can any one give me help
thanks
[img][/img][img][/img][img][/img] -
8. Re: jbpm Interface
medjbpm May 8, 2006 8:04 AM (in response to medjbpm)"medjbpm" wrote:
my userBean.java:
/*
* JBoss, Home of Professional Open Source
* Copyright 2005, JBoss Inc., and individual contributors as indicated
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jbpm.webapp.bean;
/*import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;*/
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import javax.faces.model.SelectItem;
//import org.hibernate.Query;
import org.hibernate.Session;
import org.jbpm.JbpmContext;
//import org.jbpm.db.JbpmSession;
import org.jbpm.identity.User;
import org.jbpm.identity.hibernate.IdentitySession;
public class UserBean {
String userName;
String pwd;
public String getUserName() {
return userName;
}
public void setUserName(String name) {
this.userName = name;
}
public String getPwd() {
return pwd;
}
public void setPwd(String pwd) {
this.pwd= pwd;
}
/* public String login() {
JbpmContext.getCurrentJbpmContext().setActorId(userName);
return "home";
}*/
public String login() {
Session session = JbpmContext.getCurrentJbpmContext().getSession();
IdentitySession identitySession = new IdentitySession(session);
Object found =identitySession.verify(userName,pwd);
System.out.print("" + userName) ;
if(found != null && userName.compareTo("Agent_Acceuil")==0) {
System.out.print("1") ;
JbpmContext.getCurrentJbpmContext().setActorId(userName);
return "home";
}
else if(found!=null && userName.compareTo("Agent_Acceuil")!=0) {
System.out.print("2") ;
JbpmContext.getCurrentJbpmContext().setActorId(userName);
return "homeresp";
}
else
return "login";
}
public List getUsers() {
Session session = JbpmContext.getCurrentJbpmContext().getSession();
IdentitySession identitySession = new IdentitySession(session);
return identitySession.getUsers();
}
public List getUserSelectItems() {
List userSelectItems = new ArrayList();
Iterator iter = getUsers().iterator();
while (iter.hasNext()) {
User user = (User) iter.next();
userSelectItems.add(new UserSelectItem(user));
}
return userSelectItems;
}
public static class UserSelectItem extends SelectItem {
private static final long serialVersionUID = 1L;
public UserSelectItem(User user) {
setValue(user.getName());
setLabel(user.getName());
}
}
}
My login.jsp
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<f:view>
<jsp:include page="Bienvenu.jsp" />
<br>
<b><h:messages/></b>
<table><tr><td width="50%"></td><td width="45%">
<fieldset>
<legend>Identification</legend>
<label>
<h:form id="login" >
<br />
<!-- Login           :
<h:selectOneMenu id="username" required="true" value="#{userBean.userName}">
<f:selectItems value="#{userBean.userSelectItems}" />
</h:selectOneMenu>
-->
Login :
<h:inputText id="userName" value="#{userBean.userName}"/>
<br>
Mot de Passe : <h:inputSecret id="pwd" value="#{userBean.pwd}"/>
<br><br>
<center><h:commandButton action="#{userBean.login}" value="Connection" /></center>
</h:form>
</label>
</fieldset>
</td><td width="5%"></td>
</tr></table>
<jsp:include page="footer.jsp" />
</f:view>
i get the following error
.Erreur de validation
Can any one give me help
thanks -
9. Re: jbpm Interface
mohan514 May 9, 2006 12:54 AM (in response to medjbpm)hi,
i have seen the following in one article to invoke the Business Process which is running on another JVM other than the client JVM.
The jBPM service archive:
The deploy directory contains a service archive that creates a JbpmSessionFactory at startup of the server and puts it in JNDI. To make use of this JbpmSessionFactory, you have to specify the property jbpm.session.factory.jndi.name=java:/jbpm/JbpmSessionFactory in your jBPM configuration (e.g. in the jbpm.properties in your WEB-INF/classes in your web application).
here my evironment is:
1) iam running JBPM on the stater kit of the JBoss JBPM ,
2) i have my standalone client application on the WSAD 5.1.2
using the standalone application how can i invoke the JBOss JBPM form the WSAD .
In the standalone application iam trying to retrieve the Task list of the business process by giving the actor ID.
please help me to resolve this problem(or confusion of invoking the business process using remote client)
"Any help regarding this will be appriciated".
Regards,
Mohan Chokkakula