[jBPM Users] - Custom task in jbpm 4.1?
by Josh86
Hi,
i am not so familiar with jbpm, and especially with jbpm 4. i have a question regarding custom tasks in jbpm 4.1.
my problem is that before a task shoud be completed (taskService.completeTask ... ), another action should be done. For example a user task is signing a document, thus in this case a signature must be generated by user's private key and has to be saved in an external database, but this is out of scope of jbpm. But the thing is, before completion this taks, the signature must be saved. first idea was to to inherit from TaskImpl class and to override the complete method, but i think this would not work, because i cannot create my own Task Object and pass it to the jbpm api. But is there any good solution, which matchs the jbpm architecture and is a good object oriented design?
Thanks for your answers,
Josh
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4253717#4253717
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4253717
15 years, 4 months
[jBPM Users] - NullPointer Exception when starting a process whith Tomcat/S
by hidman78
Hi,
I'm using :
Tomcat 6.0
JBPM 4.1
Mysql
I have a NullPointer exception when starting a process when executing this code in my DAO :
ProcessEngine processEngine = new Configuration().setResource("jbpm.cfg.xml").buildProcessEngine();
| ExecutionService executionService = processEngine.getExecutionService();
| IdentityService identityService = processEngine.getIdentityService();
|
| ProcessInstance processinstance = executionService.startProcessInstanceByKey("taskformExample");
My hibernate config file :
<?xml version="1.0" encoding="utf-8"?>
| <!DOCTYPE hibernate-configuration
| PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"
| "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
|
| <hibernate-configuration>
| <session-factory>
| <!-- Enable Hibernate's automatic session context management -->
|
| <property name="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>
| <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
| <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/jbpmdb</property>
| <property name="hibernate.connection.username">root</property>
| <property name="hibernate.connection.password"></property>
| <property name="hibernate.format_sql">true</property>
| <property name="current_session_context_class">thread</property>
|
| <mapping resource="javaclass.beans.Bill.hbm.xml"/>
| <mapping resource="javaclass.beans.Test.hbm.xml" />
| <mapping resource="javaclass.beans.User.hbm.xml" />
| <mapping resource="jbpm.repository.hbm.xml" />
| <mapping resource="jbpm.execution.hbm.xml" />
| <mapping resource="jbpm.history.hbm.xml" />
| <mapping resource="jbpm.task.hbm.xml" />
| <mapping resource="jbpm.identity.hbm.xml" />
| <mapping resource="jbpm.identity.hbm.xml" />
| </session-factory>
| </hibernate-configuration>
jbpm.cfg
<?xml version="1.0" encoding="UTF-8"?>
|
| <jbpm-configuration>
|
| <import resource="jbpm.default.cfg.xml" />
| <import resource="jbpm.hibernate.cfg.xml" />
| <import resource="jbpm.jpdl.cfg.xml" />
| <import resource="jbpm.identity.cfg.xml" />
| <import resource="jbpm.businesscalendar.cfg.xml" />
| <!-- <import resource="jbpm.jobexecutor.cfg.xml" /> -->
|
| </jbpm-configuration>
web.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
| <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xmlns="http://java.sun.com/xml/ns/javaee"
| xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
| xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
| id="WebApp_ID" version="2.5">
|
| <display-name>MonApplication</display-name>
|
| <!-- Configuration de l'action servlet -->
| <servlet>
| <servlet-name>action</servlet-name>
| <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
| <init-param>
| <param-name>config</param-name>
| <param-value>/WEB-INF/struts-config.xml</param-value>
| </init-param>
| <load-on-startup>1</load-on-startup>
| </servlet>
| <servlet-mapping>
| <servlet-name>action</servlet-name>
| <url-pattern>*.do</url-pattern>
| </servlet-mapping>
| </web-app>
stack variables:
processEngine JbpmConfiguration (id=77)
| authenticatedUserIdThreadLocal ThreadLocal<T> (id=481)
| impl null
| isConfigured true
| processEngineWireContext WireContext (id=484)
| transactionWireDefinition WireDefinition (id=489)
| userCommandService null
| userProvidedEnvironmentObjectsThreadLocal ThreadLocal<T> (id=492)
executionService ExecutionServiceImpl (id=80)
| commandService null
I think it come from commandService that is null but I don't know why it is null.
Thx
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4253716#4253716
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4253716
15 years, 4 months
[jBPM Users] - Re: deploy examples error, classcastexception
by nystony
java.lang.ClassCastException: org.jbpm.jpdl.internal.model.JpdlProcessDefinition cannot be cast to java.util.List
org.jbpm.pvm.internal.repository.ProcessDeployer.deploy(ProcessDeployer.java:64)
org.jbpm.pvm.internal.repository.DeployerManager.deploy(DeployerManager.java:46)
org.jbpm.pvm.internal.repository.RepositorySessionImpl.getObject(RepositorySessionImpl.java:120)
org.jbpm.pvm.internal.query.ProcessDefinitionQueryImpl.execute(ProcessDefinitionQueryImpl.java:72)
org.jbpm.pvm.internal.query.AbstractQuery.execute(AbstractQuery.java:81)
org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)
org.jbpm.pvm.internal.tx.jta.JtaTransactionInterceptor.executeInNewTx(JtaTransactionInterceptor.java:79)
org.jbpm.pvm.internal.tx.jta.JtaTransactionInterceptor.execute(JtaTransactionInterceptor.java:61)
org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)
org.jbpm.pvm.internal.tx.jta.JtaRetryInterceptor.executeWithRetry(JtaRetryInterceptor.java:52)
org.jbpm.pvm.internal.tx.jta.JtaRetryInterceptor.execute(JtaRetryInterceptor.java:45)
org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:46)
org.jbpm.pvm.internal.query.AbstractQuery.untypedList(AbstractQuery.java:62)
org.jbpm.pvm.internal.query.ProcessDefinitionQueryImpl.list(ProcessDefinitionQueryImpl.java:141)
org.jbpm.integration.console.ProcessManagementImpl.getProcessDefinitions(ProcessManagementImpl.java:61)
org.jboss.bpm.console.server.ProcessMgmtFacade.getDefinitionsJSON(ProcessMgmtFacade.java:107)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:117)
org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:260)
org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:232)
org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:166)
org.jboss.resteasy.core.DispatcherUtilities.getJaxrsResponse(DispatcherUtilities.java:142)
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:173)
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:93)
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:68)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4253701#4253701
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4253701
15 years, 4 months