[jBPM] - abortProcessInstance causes an exception
by jnorris
jnorris [https://community.jboss.org/people/jnorris] created the discussion
"abortProcessInstance causes an exception"
To view the discussion, visit: https://community.jboss.org/message/783357#783357
--------------------------------------------------------------
When the ksession.abortProcessInstance( pID ) is invoked a Hibernate exception is being thrown:
Caused by: java.lang.IllegalArgumentException: org.hibernate.QueryParameterException: could not locate named parameter [processInstanceId]
at org.hibernate.ejb.QueryImpl.setParameter(QueryImpl.java:206)
at org.jbpm.task.service.persistence.TaskPersistenceManager.queryWithParameters(TaskPersistenceManager.java:346)
at org.jbpm.task.service.persistence.TaskPersistenceManager.queryWithParametersInTransaction(TaskPersistenceManager.java:295)
... 72 more
Caused by: org.hibernate.QueryParameterException: could not locate named parameter [processInstanceId]
at org.hibernate.engine.query.ParameterMetadata.getNamedParameterDescriptor(ParameterMetadata.java:99)
at org.hibernate.engine.query.ParameterMetadata.getNamedParameterExpectedType(ParameterMetadata.java:105)
at org.hibernate.impl.AbstractQueryImpl.determineType(AbstractQueryImpl.java:437)
at org.hibernate.impl.AbstractQueryImpl.setParameter(AbstractQueryImpl.java:407)
at org.hibernate.ejb.QueryImpl.setParameter(QueryImpl.java:201)
This occurs with the jbpm-5.4.0/drools-5.5.0 runtime jars.
Has anyone else run into this issue?
Thanks,
Jim
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/783357#783357]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 10 months
[jBPM] - No process or session info in database table
by Rafael Soledade
Rafael Soledade [https://community.jboss.org/people/rafaelsoledadem] created the discussion
"No process or session info in database table"
To view the discussion, visit: https://community.jboss.org/message/787027#787027
--------------------------------------------------------------
Hi,
I'm developing a business process flow using jBPM, and so far I've created the BPMN and configured the persistence to work with my database. I've noticed a class mapping in the persistence.xml file for the tables SessionInfo, WorkItemInfo and ProcessInstanceInfo, and they are indeed successfully created in my MySQL schema. The problem is, once I start a new knowledge session and run my process instance, nothing is written in those tables, so I can't really restore sessions (not having persistence, then). What am I doing wrong here? Any help would be appreciated!
Here's my code so far:
.java main
// Load up the events knowledge base
KnowledgeBase eventKbase = readEventKnowledgeBase();
StatefulKnowledgeSession eventKsession = eventKbase
.newStatefulKnowledgeSession();
// Load up the knowledge base
KnowledgeBase kbase = readKnowledgeBase();
StatefulKnowledgeSession ksession = null;
// Settings up JPA persistence
EntityManagerFactory emf = Persistence
.createEntityManagerFactory("test");
Environment env = KnowledgeBaseFactory.newEnvironment();
env.set(EnvironmentName.ENTITY_MANAGER_FACTORY, emf);
env.set(EnvironmentName.TRANSACTION_MANAGER,
TransactionManagerServices.getTransactionManager());
// create a new knowledge session that uses JPA to store the runtime
// state
ksession = JPAKnowledgeService.newStatefulKnowledgeSession(kbase, null,
env);
// this session id - will have to be stored for recovery of session
int sessionId = ksession.getId();
System.out.printf("\n-----> Session ID: %d\n", sessionId);
// loads up the session with sessionId - not sure how to use this yet
// ksession =
// JPAKnowledgeService.loadStatefulKnowledgeSession(sessionId, kbase,
// null, env);
// uses custom process event listener
ksession.addEventListener(new CustomProcessEventListener(eventKsession));
// register work items
ksession.getWorkItemManager().registerWorkItemHandler("Notification",
new MyWorkItemHandler(ksession));
// start transaction
UserTransaction transaction = (UserTransaction) new InitialContext()
.lookup("java:comp/UserTransaction");
transaction.begin();
// Create the process instance
ProcessInstance processInstance = ksession.createProcessInstance(
"com.sample.bpmn.hello", null);
System.out.println("\n-----> Starting new Business process "
+ processInstance.getProcessId() + " <ID:" + sessionId + ">\n");
// Start the BPM process
ksession.startProcessInstance(processInstance.getId());
transaction.commit();
// Did the process instance complete successfully ?
if (processInstance.getState() == ProcessInstance.STATE_COMPLETED) {
System.out.printf("\n-----> Business process "
+ processInstance.getProcessId() + " <ID:" + sessionId
+ "> successfully completed\n");
}
// free resources and end session
emf.close();
ksession.dispose();
Custom Work Item Handler:
public class MyWorkItemHandler implements WorkItemHandler {
private KnowledgeRuntime session;
public MyWorkItemHandler() {
}
public MyWorkItemHandler(KnowledgeRuntime session) {
this();
this.session = session;
}
public void executeWorkItem(WorkItem workItem, WorkItemManager manager) {
/**
// extract parameters
String from = (String) workItem.getParameter("From");
String to = (String) workItem.getParameter("To");
String message = (String) workItem.getParameter("Message");
String priority = (String) workItem.getParameter("Priority");
// Artificial wait
try {
Thread.sleep(5000);
}
catch (Exception ex) {
}
System.out.println("###work item handler operations###");
session.getWorkItemManager().completeWorkItem(workItem.getId(), null);
//manager.completeWorkItem(workItem.getId(), null);
}
persistence.xml:
<persistence-unit name="test" transaction-type="JTA">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<class>org.jbpm.persistence.processinstance.ProcessInstanceInfo</class>
<class>org.drools.persistence.info.SessionInfo</class>
<class>org.drools.persistence.info.WorkItemInfo</class>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect" />
<property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver" />
<property name="hibernate.connection.url" value="jdbc:mysql://localhost:3306/test" />
<property name="hibernate.connection.username" value="root" />
<property name="hibernate.connection.password" value="12345" />
<property name="hibernate.connection.autocommit" value="false" />
<property name="hibernate.max_fetch_depth" value="3" />
<property name="hibernate.hbm2ddl.auto" value="create" />
<property name="hibernate.show_sql" value="false" />
<property name="hibernate.transaction.manager_lookup_class"
value="org.hibernate.transaction.BTMTransactionManagerLookup" />
</properties>
</persistence-unit>
</persistence>
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/787027#787027]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 10 months
[Snowdrop] - Re: Class loader issues
by Holger L
Holger L [https://community.jboss.org/people/holger.lierse] created the discussion
"Re: Class loader issues"
To view the discussion, visit: https://community.jboss.org/message/786998#786998
--------------------------------------------------------------
Hello,
Does the snowdrop module also look at the EAR lib directory of an application and includes its classpath? I've got an EAR app which uses the old fashion Hibernate3 (org.springframework.orm.hibernate3.LocalSessionFactoryBean). The deployment fails on a ClassNotFoundException:
Caused by: java.lang.NoClassDefFoundError
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.class$(LocalSessionFactoryBean.java:174)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.<init>(LocalSessionFactoryBean.java:174)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [rt.jar:1.6.0_31]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) [rt.jar:1.6.0_31]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) [rt.jar:1.6.0_31]
at java.lang.reflect.Constructor.newInstance(Constructor.java:513) [rt.jar:1.6.0_31]
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:100)
... 24 more
Caused by: java.lang.ClassNotFoundException: org.hibernate.cfg.Configuration from [Module "org.springframework.spring:snowdrop" from local module loader @7f56b6b9]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
The EAR/lib dire contains the hibernate-core (which contains org.hibernate.cfg.Configuration) and I've added the org.hibernate exclusion to the deployment structure.
Any help would be appreciated.
Thanks
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/786998#786998]
Start a new discussion in Snowdrop at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 10 months
[jBPM] - Dance Moms Season 3 Episode 1 The Beginning Of The End S3e1 Free
by Jhonny Plerss
Jhonny Plerss [https://community.jboss.org/people/koplaksss] created the discussion
"Dance Moms Season 3 Episode 1 The Beginning Of The End S3e1 Free"
To view the discussion, visit: https://community.jboss.org/message/786986#786986
--------------------------------------------------------------
Watch Dance Moms Season 3 Episode 1 The Beginning Of The End Free Online, Dance Moms 3×1, Dance Moms S3 Eps 1, Dance Moms s3e1, Dance Moms Season 3 Episode 1 online
http://migre.me/cCWRL http://i1184.photobucket.com/albums/z329/kithul1/Watch-now.png
Summary this episode : The third season begins with a new dancer and mom joining the group, much to everyone's dismay. Later, the girls compete in Denver.
Set in Pittsburgh's renowned Abby Lee Dance Company, owned and operated by notoriously demanding and passionate instructor Abby Lee Miller, the series follows children's early steps on the road to stardom, and their doting mothers who are there for every rehearsal, performance and bow... all under the discerning eye of Miller. Seeing the highs and lows surrounding competition season delivers an intriguing and dramatic look at the cast's frantic pursuit of the ultimate National Dance title.
.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/786986#786986]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 10 months
[jBPM] - Parenthood Season 4 Episode 12 Keep On Rowing S4e12
by Jhonny Plerss
Jhonny Plerss [https://community.jboss.org/people/koplaksss] created the discussion
"Parenthood Season 4 Episode 12 Keep On Rowing S4e12"
To view the discussion, visit: https://community.jboss.org/message/786985#786985
--------------------------------------------------------------
Watch Parenthood Season 4 Episode 12 Keep on Rowing Free Online, Parenthood 4×12, Parenthood S4 Eps 12, Parenthood s4e12, Parenthood Season 4 Episode 12 online
http://migre.me/cCWPB http://i1184.photobucket.com/albums/z329/kithul1/Watch-now.png
Summary this episode : Jasmine and Crosby help a family member who is experiencing money problems. Kristina surprises Adam with a new look and a spontaneous night on the town. Sarah and Hank experience an interesting evening together. Meanwhile, Victor is disappointed after Julia gives him news about his mother.
Parenthood is a one-hour drama inspired by the box office hit of the same name; it follows the trials and tribulations of the very large, very colorful and imperfect Braverman family. Sarah Braverman (Lauren Graham) is a financially strapped single mother trying to raise two teenaged kids, the bright but rebellious Amber (Mae Whitman), and sullen and sensitive Drew (Miles Heizer). On the home front, Sarah and her kids live with Sarah's larger-than-life, headstrong father, Zeek (Craig T. Nelson), and pillar-of-strength mother Camille (Bonnie Bedelia), who are dealing with their own marital issues. Meanwhile, Sarah's sister and complete antithesis, Julia (Erika Christensen) is a successful corporate attorney trying to juggle work and motherhood, alongside her loving but increasingly restless stay-at-home husband, Joel (Sam Jaeger). Commitment-phobe Crosby (Dax Shepard), Sarah's younger brother, is helping raise a five-year-old son he had out of wedlock with former flame Jasmine (Joy Bryant). However, it's Adam (Peter Krause), the oldest Braverman sibling, who has had to relinquish his expectations about what constitutes a "normal" family, as he, his quietly forceful wife Kristina (Monica Potter) and independent-minded teenage daughter Haddie (Sarah Ramos), struggle to cope with their eccentric son and Haddie's little brother Max (Max Burkholder), who has Asperger's Syndrome. Although each sibling and family has its own share of everyday challenges to grapple with, they still manage to be there for each other in their hours of need.
.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/786985#786985]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 10 months