[JBoss jBPM] - How you know when the process is waiting for a Task ?
by francis1970
Hello, I need a little help with Task List.
I have a Servlet which I use as front-end for a JBPM process.
Here's one simple:
<?xml version="1.0" encoding="UTF-8"?>
|
| <process-definition
| xmlns="urn:jbpm.org:jpdl-3.2"
| name="simple3">
| <start-state name="StatoIniz">
| <transition name="" to="state1"></transition>
| </start-state>
|
| <state name="state1">
| <transition name="" to="state2"></transition>
| </state>
|
| <state name="state2">
| <transition name="" to="Task1"></transition>
| </state>
|
| <task-node name="Task1">
| <task name="Task1">
| <assignment class='com.sample.action.SimpleAssignmentHandler' />
| </task>
| <transition name="" to="end1"></transition>
| </task-node>
|
| <end-state name="end1"></end-state>
|
| </process-definition>
I want that when the user reaches "Task1" process stops and the Servlet prints "User you have Task1 in charge".
I'm using "getTaskList" for this purpose....
List taskInstances = jbpmContext.getTaskList("user");
|
| TaskInstance taskInstance = (TaskInstance) taskInstances.get(0);
| taskInstanceId = taskInstance.getId();
| String taskName = taskInstance.getTask().getName();
| out.println("You have in your TaskList "+taskName);
The problem is getTaskList() returns the taskInstance Task1 also when the user is in state1 or state2. Why ?
I only want this when the process has stopped and waiting for Task completion.
Should I use a different Api for this purpose ?
Thanks a lot
Francesco
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4121888#4121888
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4121888
18 years, 6 months
[Installation, Configuration & DEPLOYMENT] - Re: Problems migrating from 4.0.4 to 5.0.0B3
by NickDeGraeve
We did some more testing and we found out that the problem is caused by Hibernate. If we remove all Hibernate POJOs from the archive it deploys.
Even with a simple POJO it fails. We have no clue as to why. Do you?
Thanks.
POJO:Entity
| @Table(name = "allowed_locales")
| public class AllowedLocale implements Serializable {
|
| /** Primary key. */
| private Integer allowedLocaleId;
|
| private String allowedLocale;
|
| private Boolean usedForLogging;
|
| public AllowedLocale() {
| }
|
| @Id @GeneratedValue
| public Integer getAllowedLocaleId() {
| return allowedLocaleId;
| }
|
| public void setAllowedLocaleId(Integer allowedLocaleId) {
| this.allowedLocaleId = allowedLocaleId;
| }
|
| @Column(updatable = true, name = "allowedLocale", nullable = true, length = 5)
| public String getAllowedLocale() {
| return allowedLocale;
| }
|
| public void setAllowedLocale(String allowedLocale) {
| this.allowedLocale = allowedLocale;
| }
|
| @Column(updatable = true, name = "usedForLogging", nullable = true, length = 1)
| public Boolean getUsedForLogging() {
| return usedForLogging;
| }
|
| public void setUsedForLogging(Boolean usedForLogging) {
| this.usedForLogging = usedForLogging;
| }
|
| }Hibernate config:<?xml version="1.0" encoding="utf-8"?>
| <!DOCTYPE hibernate-configuration PUBLIC
| "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
| "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
| <hibernate-configuration>
| <session-factory>
| <property name="hibernate.connection.datasource">java:/NokeosCoreDS</property>
| <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
| <property name="transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
| <property name="dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>
| <property name="show_sql">false</property>
| <property name="jdbc.batch_size">0</property>
| <mapping class="com.fpc.nokeos.core.common.beans.persistent.AllowedLocale" />
| </session-factory>
| </hibernate-configuration>
PS. Should I start a new thread here in the Hibernate section or on the Hibernate forum?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4121882#4121882
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4121882
18 years, 6 months