[jBPM] - How to create Adhoc Task using jbpm-human-task-war.war that comes with jbpm5.3 full installer?
by Thomas Setiabudi
Thomas Setiabudi [https://community.jboss.org/people/thomas.setiabudi] created the discussion
"How to create Adhoc Task using jbpm-human-task-war.war that comes with jbpm5.3 full installer?"
To view the discussion, visit: https://community.jboss.org/message/777335#777335
--------------------------------------------------------------
Hi,
We use jbpm5.3 full installer and changed its configuration to use MS SQL Server 2008. And Everything works fine. All tasks are persisted in the database.
We have been using jbpm as a service, we do activities like start process, claim group task, complete task using JBPM-Console's REST API.
Now, we have a requirement to create adhoc task (create a human task without any process definition).
Since there is no REST API on JBPM-Console to do this, we plan to create a small application to create task and communicate directly with jbpm-human-task-war.war that comes with jbpm5.3 full installer.
We want to do this since we need all of our task to be persisted in the database.
Is it true by doing it this way, all task created by jbpm-human-task-war.war will be persisted to the database?
Is there any sample code on how to do this? (create a small application to create task and communicate directly with jbpm-human-task-war.war) ?
Any Help is Appreciated.
Regards,
Thomas Setiabudi
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/777335#777335]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 4 months
[jBPM] - Could not find datasource: java:jboss/datasources/jbpmDS
by Yogesh Garg
Yogesh Garg [https://community.jboss.org/people/nsit_yogesh] created the discussion
"Could not find datasource: java:jboss/datasources/jbpmDS"
To view the discussion, visit: https://community.jboss.org/message/774783#774783
--------------------------------------------------------------
Hi all,
I am receiving following error. I am using jBPM5.3 and JBOSS AS 5.x. Please let me know what am I missing.
> 16 05/11 16:40:32,344[main] ERROR hibernate.connection.DatasourceConnectionProvider.configure - Could not find datasource: java:jboss/datasources/jbpmDS
> javax.naming.NameNotFoundException: unable to find a bound object at name 'java:jboss/datasources/jbpmDS'
> at bitronix.tm.jndi.BitronixContext.lookup(BitronixContext.java:83)
> at javax.naming.InitialContext.lookup(InitialContext.java:392)
> at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:75)
> at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:137)
> at org.hibernate.ejb.InjectionSettingsFactory.createConnectionProvider(InjectionSettingsFactory.java:29)
> at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:89)
> at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2119)
> at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2115)
> at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1339)
> at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867)
> at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:669)
> at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:126)
> at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:52)
> at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:34)
> at com.sample.ProcessMain.startTaskService(ProcessMain.java:219)
> at com.sample.ProcessMain.main(ProcessMain.java:50)
> Exception in thread "main" javax.persistence.PersistenceException: [PersistenceUnit: org.jbpm.persistence.jpa] Unable to build EntityManagerFactory
> at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:677)
> at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:126)
> at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:52)
> at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:34)
> at com.sample.ProcessMain.startTaskService(ProcessMain.java:219)
> at com.sample.ProcessMain.main(ProcessMain.java:50)
> Caused by: org.hibernate.HibernateException: Could not find datasource
> at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:79)
> at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:137)
> at org.hibernate.ejb.InjectionSettingsFactory.createConnectionProvider(InjectionSettingsFactory.java:29)
> at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:89)
> at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2119)
> at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2115)
> at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1339)
> at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867)
> at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:669)
> ... 5 more
> Caused by: javax.naming.NameNotFoundException: unable to find a bound object at name 'java:jboss/datasources/jbpmDS'
> at bitronix.tm.jndi.BitronixContext.lookup(BitronixContext.java:83)
> at javax.naming.InitialContext.lookup(InitialContext.java:392)
> at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:75)
> ... 13 more
*I am using the following persistence.xml*
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <persistence
> version="1.0"
> xsi:schemaLocation=
> " http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence
> http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd
> http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm
> http://java.sun.com/xml/ns/persistence/orm_1_0.xsd http://java.sun.com/xml/ns/persistence/orm_1_0.xsd"
> xmlns:orm=" http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm"
> xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance http://www.w3.org/2001/XMLSchema-instance"
> xmlns=" http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence">
>
> <persistence-unit name="org.jbpm.persistence.jpa" transaction-type="RESOURCE_LOCAL">
> <provider>org.hibernate.ejb.HibernatePersistence</provider>
> <non-jta-data-source>java:jboss/datasources/jbpmDS</non-jta-data-source>
> <mapping-file>META-INF/Taskorm.xml</mapping-file>
> <class>org.jbpm.task.Attachment</class>
> <class>org.jbpm.task.Content</class>
> <class>org.jbpm.task.BooleanExpression</class>
> <class>org.jbpm.task.Comment</class>
> <class>org.jbpm.task.Deadline</class>
> <class>org.jbpm.task.Comment</class>
> <class>org.jbpm.task.Deadline</class>
> <class>org.jbpm.task.Delegation</class>
> <class>org.jbpm.task.Escalation</class>
> <class>org.jbpm.task.Group</class>
> <class>org.jbpm.task.I18NText</class>
> <class>org.jbpm.task.Notification</class>
> <class>org.jbpm.task.EmailNotification</class>
> <class>org.jbpm.task.EmailNotificationHeader</class>
> <class>org.jbpm.task.Reassignment</class>
> <class>org.jbpm.task.Status</class>
> <class>org.jbpm.task.Task</class>
> <class>org.jbpm.task.TaskData</class>
> <class>org.jbpm.task.SubTasksStrategy</class>
> <class>org.jbpm.task.OnParentAbortAllSubTasksEndStrategy</class>
> <class>org.jbpm.task.OnAllSubTasksEndParentEndStrategy</class>
> <class>org.jbpm.task.User</class>
>
>
> <properties>
> <property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect"/>
> <property name="hibernate.connection.driver_class" value="org.h2.Driver"/>
> <property name="hibernate.connection.url" value="jdbc:h2:~/test" />
> <property name="hibernate.connection.username" value="sa"/>
> <property name="hibernate.connection.password" value=""/>
> <property name="hibernate.connection.autocommit" value="true" />
> <property name="hibernate.max_fetch_depth" value="3"/>
> <property name="hibernate.hbm2ddl.auto" value="create" />
> <property name="hibernate.show_sql" value="true" />
> </properties>
> </persistence-unit>
> </persistence>
>
Regards,
Yogesh Garg
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/774783#774783]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 4 months
[JBoss Remoting] - Getting Remote Channel Error
by Yougal Bisht
Yougal Bisht [https://community.jboss.org/people/yougal.bisht] created the discussion
"Getting Remote Channel Error"
To view the discussion, visit: https://community.jboss.org/message/777301#777301
--------------------------------------------------------------
Hello
I have recently started using JBOSS AS7.1.1, Here is what my requirement is:
I have two jboss installation in Amazon Cloud on with say IP1 and other say IP2 both machines haves JBOSS installed.
Now on one machine I puch JMS messages in JBOSS-1 and the other JBOSS-2 server acts as a client of JBOSS-1.
Both server start But I am able to puch message in JBOSS-1 but not read from remote factory of JBOSS-2. port 4447,8080,5445 in open on all IP's in AMAZON. Also I have made <interface name="public"> as <any-address>.
I have jboss-client.jar in my web-app web-inf/lib folder.
One thing more, When the JBOSS-2 starts it connects to JBOSS-1 Remote Connection JNDI as when I change it to some other name it give namming exception
Please let me know what extra need to be done or what am I doing wrong.
Regards,
Yougal.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/777301#777301]
Start a new discussion in JBoss Remoting at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 4 months
[jBPM] - Re: persistence JBPM5.3 on tomcat with mysql
by Ted Pan
Ted Pan [https://community.jboss.org/people/ted.pan] created the discussion
"Re: persistence JBPM5.3 on tomcat with mysql"
To view the discussion, visit: https://community.jboss.org/message/777283#777283
--------------------------------------------------------------
hi Kehua,
there are some issues with your code
1. since you have declared the datasource in web.xm, in persistence.xml, you can use java:comp/env/jdbc/jbpm-ds, instead of jdbc/jbpm-ds, and you don't need to define the connection parameters( driver_class, username and so on) in the persistence.xml, since you are using data source from container.
please see the attached persistence.xml for detailed information.
2. you can pre-create the database with schema for the persistence unit, org.jbpm.persistence.jpa. But if you want to create it or update it when the persistence unit is created at the first time( see persistence.xml for <property name="hibernate.hbm2ddl.auto" value="update" />), you need to disable the transaction in your TaskProcessServlet's init(), please see the attached TaskProcessServlet.java file.
3. you do not need to manually initial the dateasource, please see the TaskProcessServlet.java from line 71 to 86. those lines could be commentted out.
4. the default's port for Mina server is 9123, you use MinaTaskServer server = new MinaTaskServer(taskService); to create the mina server, then you should use the port 9123 in your JbpmAPIUtil.java. please see the attached JbpmAPIUtil.java
in case if I did not list all the issues, I attached the whole server1 with libraries for you. you can do a comparison with your server1.
Ted
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/777283#777283]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 4 months
[Javassist] - Does Javassist 3.17.0-GA have to be used with Java 1.7?
by Ngoc Dao
Ngoc Dao [https://community.jboss.org/people/ngocdaothanh] created the discussion
"Does Javassist 3.17.0-GA have to be used with Java 1.7?"
To view the discussion, visit: https://community.jboss.org/message/777279#777279
--------------------------------------------------------------
Does Javassist 3.17.0-GA have to be used with Java 1.7? Is it intentional?
I have the below error. You can reproduce with Java 1.6 and this:
git clone git://github.com/ngocdaothanh/xitrum-new.git
cd xitrum-new
git checkout 1.9.9
sbt/sbt run
java.lang.UnsupportedClassVersionError: javassist/ClassPath : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method) ~[na:1.6.0_37]
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) ~[na:1.6.0_37]
at java.lang.ClassLoader.defineClass(ClassLoader.java:615) ~[na:1.6.0_37]
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) ~[na:1.6.0_37]
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) ~[na:1.6.0_37]
at java.net.URLClassLoader.access$000(URLClassLoader.java:58) ~[na:1.6.0_37]
at java.net.URLClassLoader$1.run(URLClassLoader.java:197) ~[na:1.6.0_37]
at java.security.AccessController.doPrivileged(Native Method) ~[na:1.6.0_37]
at java.net.URLClassLoader.findClass(URLClassLoader.java:190) ~[na:1.6.0_37]
at java.lang.ClassLoader.loadClass(ClassLoader.java:306) ~[na:1.6.0_37]
at java.lang.ClassLoader.loadClass(ClassLoader.java:247) ~[na:1.6.0_37]
at xitrum.routing.Routes$.fromCacheFileOrRecollectReal(Routes.scala:195) [xitrum_2.9.2.jar:1.9.10-SNAPSHOT]
at xitrum.routing.Routes$.fromCacheFileOrRecollectWithRetry(Routes.scala:170) [xitrum_2.9.2.jar:1.9.10-SNAPSHOT]
at xitrum.routing.Routes$.fromCacheFileOrRecollect(Routes.scala:156) [xitrum_2.9.2.jar:1.9.10-SNAPSHOT]
at xitrum.handler.Server$.start(Server.scala:18) [xitrum_2.9.2.jar:1.9.10-SNAPSHOT]
at demos.Boot$.main(Boot.scala:12) [classes/:na]
at demos.Boot.main(Boot.scala) [classes/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_37]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[na:1.6.0_37]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_37]
at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_37]
at sbt.Run.invokeMain(Run.scala:68) [run-0.12.0.jar:0.12.0]
at sbt.Run.run0(Run.scala:61) [run-0.12.0.jar:0.12.0]
at sbt.Run.execute$1(Run.scala:50) [run-0.12.0.jar:0.12.0]
at sbt.Run$$anonfun$run$1.apply$mcV$sp(Run.scala:54) [run-0.12.0.jar:0.12.0]
at sbt.TrapExit$.executeMain$1(TrapExit.scala:33) [run-0.12.0.jar:0.12.0]
at sbt.TrapExit$$anon$1.run(TrapExit.scala:42) [run-0.12.0.jar:0.12.0]
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/777279#777279]
Start a new discussion in Javassist at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 4 months
[jBPM] - Any WorkflowProcessInstanceUpgrader working example
by tmag
tmag [https://community.jboss.org/people/tmag] created the discussion
"Any WorkflowProcessInstanceUpgrader working example"
To view the discussion, visit: https://community.jboss.org/message/775187#775187
--------------------------------------------------------------
Anyone have a working example on WorkflowProcessInstanceUpgrader ?
As per jBPM 5.3 documentation - when we tried +upgradeProcessInstance() -+
+
+
* + without a user transaction - its giving NullPointerException+
*Exception in thread "main" java.lang.NullPointerException*
* at org.jbpm.process.instance.impl.ProcessInstanceImpl.getProcess(ProcessInstanceImpl.java:68)*
* at org.jbpm.workflow.instance.WorkflowProcessInstanceUpgrader.upgradeProcessInstance(WorkflowProcessInstanceUpgrader.java:57)*
* Within a user transaction - its giving ClassCastException
*java.lang.ClassCastException: org.drools.command.impl.CommandBasedStatefulKnowledgeSession cannot be cast to org.drools.common.InternalKnowledgeRuntime*
* at org.jbpm.workflow.instance.WorkflowProcessInstanceUpgrader.upgradeProcessInstance(WorkflowProcessInstanceUpgrader.java:61)*
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/775187#775187]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 4 months