[JBoss jBPM] - Re: JBPM Process Ending Events
by jeremiah.lumontod
when you design a process, that's the point that you assign the code for an event. but when you check the process, its an xml file. it means upon deployment the framework will check any class attached to a certain event. in my idea, they are implementing dependency injection here and it means it is dynamic. so maybe somewhere in the code you can access instance of whatever class is this then inject your class.
i havent read the source code though, i am currently trying to understand how to make jbpm-console functional as i am not javaserver faces expert, just a nood in this area and this implementation combines hibernate, jaas, jboss administration skills to make this work (just my understanding though).
i hope its a small help to you!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4199160#4199160
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4199160
15 years, 5 months
[JBoss jBPM] - cannot login in jbpm-console using jbpm-3.3.0 mysql jboss4.2
by jeremiah.lumontod
I can deploy the process (since i can see it in mysql database) but i cannot login at jbpm-console. it seems that something is missing in javaserver faces configuration
my web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" >
<!--
* Force initialization of the hibernate sessions in jbpm.
* This will create the DB tables on new installations.
* If that's not needed the listener can be removed.
-->
<listener-class>
org.jbpm.web.BootstrapListener
</listener-class>
Enable the JSF servlet. See faces-config.xml for Faces-specific configuration
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
<!-- Mapping for all plain pages. -->
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<!-- This mapping is for the process images. -->
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/sa/pi/*</url-pattern>
</servlet-mapping>
<context-param>
Use Documents Saved as *.xhtml
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>
<context-param>
Facelets debug output
<param-name>facelets.DEVELOPMENT</param-name>
<param-value>true</param-value>
</context-param>
<!-- Facelets tag libraries (semi-colon separated) -->
<context-param>
<param-name>facelets.LIBRARIES</param-name>
<param-value>/WEB-INF/jbpm.taglib.xml;/WEB-INF/jbpm-tf.taglib.xml</param-value>
</context-param>
<!-- Custom Facelets resource resolver to handle the task form fetching from the process definition files -->
<context-param>
<param-name>facelets.RESOURCE_RESOLVER</param-name>
<param-value>org.jbpm.webapp.taskforms.TaskFormsResourceResolver</param-value>
</context-param>
<!-- Work around a bug in JSF 1.2_03 -->
<context-param>
<param-name>com.sun.faces.disableVersionTracking</param-name>
<param-value>true</param-value>
</context-param>
<!-- A simple JSP to redirect to the basic search page. -->
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
This is the GDP's deployer servlet
<servlet-name>GDP Deployer Servlet</servlet-name>
<servlet-class>org.jbpm.web.ProcessUploadServlet</servlet-class>
<load-on-startup>1</load-on-startup>
<servlet-mapping>
<servlet-name>GDP Deployer Servlet</servlet-name>
<url-pattern>/upload/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>GDP Deployer Servlet</servlet-name>
<url-pattern>/uploadDefinition</url-pattern>
</servlet-mapping>
<!--
This role list should be changed to include all the relevant roles for your
environment.
-->
<security-role>
<role-name>admin</role-name>
</security-role>
<security-role>
<role-name>user</role-name>
</security-role>
<security-role>
<role-name>participant</role-name>
</security-role>
<security-role>
<role-name>manager</role-name>
</security-role>
<security-role>
<role-name>administrator</role-name>
</security-role>
<!--
Security constraints - optionally customize the role name to require
a login before access is allowed to the application.
Also, be sure to edit jboss-web.xml to configure the security domain if you are
deploying inside JBoss AS.
-->
<security-constraint>
<web-resource-collection>
<web-resource-name>Secure Area</web-resource-name>
<url-pattern>/sa/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>user</role-name>
</auth-constraint>
</security-constraint>
<security-constraint>
<web-resource-collection>
<web-resource-name>Common Pages</web-resource-name>
<url-pattern>/common/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>participant</role-name>
<role-name>manager</role-name>
<role-name>administrator</role-name>
</auth-constraint>
</security-constraint>
<security-constraint>
<web-resource-collection>
<web-resource-name>Participant Pages</web-resource-name>
<url-pattern>/main/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>participant</role-name>
</auth-constraint>
</security-constraint>
<security-constraint>
<web-resource-collection>
<web-resource-name>Search Pages</web-resource-name>
<url-pattern>/search/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>participant</role-name>
</auth-constraint>
</security-constraint>
<security-constraint>
<web-resource-collection>
<web-resource-name>Process Pages</web-resource-name>
<url-pattern>/process/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>participant</role-name>
</auth-constraint>
</security-constraint>
<security-constraint>
<web-resource-collection>
<web-resource-name>Task Pages</web-resource-name>
<url-pattern>/task/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>participant</role-name>
</auth-constraint>
</security-constraint>
<security-constraint>
<web-resource-collection>
<web-resource-name>Report Pages</web-resource-name>
<url-pattern>/report/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>participant</role-name>
</auth-constraint>
</security-constraint>
<!-- Example Login page - lists user names
<login-config>
<auth-method>FORM</auth-method>
<form-login-config>
<form-login-page>/ua/login-example.jsf</form-login-page>
<form-error-page>/ua/login-example.jsf?error=true</form-error-page>
</form-login-config>
</login-config>
-->
<!-- Login configuration option #1 - use the login page -->
<login-config>
<auth-method>FORM</auth-method>
<form-login-config>
<form-login-page>/ua/login.jsf</form-login-page>
<form-error-page>/ua/login.jsf?error=true</form-error-page>
</form-login-config>
</login-config>
<!-- Login configuration option #2 - use basic auth
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>jBPM Administration Console</realm-name>
</login-config>
-->
<!-- Job executor launcher ==>
Starts the job executor on servlet context initialization and stops it on
servlet context destruction.
<listener-class>org.jbpm.web.JobExecutorLauncher</listener-class>
<!== Job executor launcher -->
Closes the jBPM configuration on servlet context destruction, releasing
application resources. This listener should appear after the job executor
launcher to avoid reopening the configuration.
<listener-class>org.jbpm.web.JbpmConfigurationCloser</listener-class>
<!-- Job executor servlet ==>
This servlet has the purpose of executing pending jobs. Deprecated,
replaced by JobExecutorLauncher.
<servlet-name>JobExecutorServlet</servlet-name>
<servlet-class>org.jbpm.job.executor.JobExecutorServlet</servlet-class>
<load-on-startup>1</load-on-startup>
<servlet-mapping>
<servlet-name>JobExecutorServlet</servlet-name>
<url-pattern>/jobs</url-pattern>
</servlet-mapping>
<!== Job executor servlet -->
<!-- CloseJbpmConfigurationServlet BEGIN -->
<servlet-name>CloseJbpmConfigurationServlet</servlet-name>
<servlet-class>org.jbpm.web.CloseJbpmConfigurationServlet</servlet-class>
<load-on-startup>1</load-on-startup>
<resource-ref>
Logical name of the data source that provides connections to the persistence service.
Must match the hibernate.connection.datasource property in the Hibernate
configuration file.
<res-ref-name>jdbc/JbpmDataSource</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<resource-ref>
Logical name of the factory that provides JMS connections to the message service.
Required for processes that contain asynchronous continuations.
<res-ref-name>jms/JbpmConnectionFactory</res-ref-name>
<res-type>javax.jms.ConnectionFactory</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<ejb-local-ref>
Link to the local entity bean that implements the scheduler service. Required for
processes that contain timers.
<ejb-ref-name>ejb/TimerEntityBean</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<local-home>org.jbpm.ejb.LocalTimerEntityHome</local-home>
org.jbpm.ejb.LocalTimerEntity
<ejb-link>TimerEntityBean</ejb-link>
</ejb-local-ref>
<message-destination-ref>
The message service sends job messages to the queue referenced here. To ensure
this is the same queue from which the JobListenerBean receives messages, the
message-destination-link element points to a common logical destination, JobQueue.
<message-destination-ref-name>jms/JobQueue</message-destination-ref-name>
<message-destination-type>javax.jms.Queue</message-destination-type>
<message-destination-usage>Produces</message-destination-usage>
<message-destination-link>JobQueue</message-destination-link>
</message-destination-ref>
</web-app>
my faces-config.xml:
<?xml version='1.0' encoding='UTF-8'?>
<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
version="1.2">
<!-- Managed beans -->
<!-- global -->
<managed-bean>
<managed-bean-name>jbpmBean</managed-bean-name>
<managed-bean-class>org.jbpm.webapp.bean.JbpmBean</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<managed-bean>
<managed-bean-name>identityBean</managed-bean-name>
<managed-bean-class>org.jbpm.webapp.bean.IdentityBean</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
<managed-property>
<property-name>jbpmBean</property-name>
#{jbpmBean}
</managed-property>
</managed-bean>
<managed-bean>
<managed-bean-name>applicationBean</managed-bean-name>
<managed-bean-class>org.jbpm.webapp.bean.ApplicationBean</managed-bean-class>
<managed-bean-scope>application</managed-bean-scope>
</managed-bean>
<!-- Graph object beans -->
<managed-bean>
<managed-bean-name>taskInstanceBean</managed-bean-name>
<managed-bean-class>org.jbpm.webapp.bean.TaskInstanceBean</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
<managed-property>
<property-name>jbpmBean</property-name>
#{jbpmBean}
</managed-property>
<managed-property>
<property-name>pageBean</property-name>
#{pageBean}
</managed-property>
<managed-property>
<property-name>taskBean</property-name>
#{taskBean}
</managed-property>
<managed-property>
<property-name>processBean</property-name>
#{processBean}
</managed-property>
<managed-property>
<property-name>processInstanceBean</property-name>
#{processInstanceBean}
</managed-property>
<managed-property>
<property-name>applicationBean</property-name>
#{applicationBean}
</managed-property>
<managed-property>
<property-name>identityBean</property-name>
#{identityBean}
</managed-property>
</managed-bean>
<managed-bean>
<managed-bean-name>taskBean</managed-bean-name>
<managed-bean-class>org.jbpm.webapp.bean.TaskBean</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
<managed-property>
<property-name>pageBean</property-name>
#{pageBean}
</managed-property>
<managed-property>
<property-name>jbpmBean</property-name>
#{jbpmBean}
</managed-property>
<managed-property>
<property-name>applicationBean</property-name>
#{applicationBean}
</managed-property>
<managed-property>
<property-name>processBean</property-name>
#{processBean}
</managed-property>
</managed-bean>
<managed-bean>
<managed-bean-name>processInstanceBean</managed-bean-name>
<managed-bean-class>org.jbpm.webapp.bean.ProcessInstanceBean</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
<managed-property>
<property-name>pageBean</property-name>
#{pageBean}
</managed-property>
<managed-property>
<property-name>jbpmBean</property-name>
#{jbpmBean}
</managed-property>
<managed-property>
<property-name>processBean</property-name>
#{processBean}
</managed-property>
</managed-bean>
<managed-bean>
<managed-bean-name>processBean</managed-bean-name>
<managed-bean-class>org.jbpm.webapp.bean.ProcessBean</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
<managed-property>
<property-name>jbpmBean</property-name>
#{jbpmBean}
</managed-property>
<managed-property>
<property-name>pageBean</property-name>
#{pageBean}
</managed-property>
</managed-bean>
<managed-bean>
<managed-bean-name>pageBean</managed-bean-name>
<managed-bean-class>org.jbpm.webapp.bean.PageBean</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<locale-config>
<default-locale>en</default-locale>
</locale-config>
<!--
Use Facelets as the primary view handler. Since we have bookmarkable URLs,
add Gravel's query preserving view handler to the list.
-->
<view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
<view-handler>org.jboss.gravel.QueryPreservingViewHandler</view-handler>
<!--
Use Gravel's navigation model.
-->
<navigation-handler>org.jboss.gravel.navigation.GravelNavigationHandler</navigation-handler>
<!-- Converters -->
<converter-id>pooledActorsConverter</converter-id>
<converter-class>org.jbpm.webapp.converter.PooledActorsConverter</converter-class>
<converter-id>timeIntervalConverter</converter-id>
<converter-class>org.jbpm.webapp.converter.TimeIntervalConverter</converter-class>
<!-- jBPM tx phase listener handler -->
<phase-listener>org.jbpm.jsf.core.phase.JbpmPhaseListener</phase-listener>
</faces-config>
i think the problem comes from the configuration / setup of javaserver faces, but since its my first time using jbpm i have no clue.
if somebody who is an expert in this can guide me or give me some tips,
it would be a great help.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4199153#4199153
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4199153
15 years, 5 months