[JBoss jBPM] - hibernate.queries.hbm.xml
by maxip
Hi,
want to use the persistance of jBPM, but i get this error:
anonymous wrote : 10:57:17,796 [main] INFO Configuration : Configured SessionFactory: null
| 10:57:17,796 [main] INFO Configuration : Reading mappings from resource: hibernate.queries.hbm.xml
| 10:57:17,843 [main] DEBUG JbpmContext : closing JbpmContext
| Exception in thread "main" org.hibernate.MappingException: Could not read mappings from resource: hibernate.queries.hbm.xml
| at org.hibernate.cfg.Configuration.addResource(Configuration.java:485)
| at org.jbpm.persistence.db.DbPersistenceServiceFactory.getConfiguration(DbPersistenceServiceFactory.java:71)
| at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSchemaExport(DbPersistenceServiceFactory.java:79)
| at org.jbpm.persistence.db.DbPersistenceServiceFactory.createSchema(DbPersistenceServiceFactory.java:110)
| at org.jbpm.JbpmConfiguration.createSchema(JbpmConfiguration.java:383)
| at org.jbpm.JbpmConfiguration.createSchema(JbpmConfiguration.java:375)
| at de.fhkl.bda.Test001.main(Test001.java:27)
| Caused by: org.hibernate.DuplicateMappingException: Duplicate query mapping GraphSession.findLatestProcessDefinitionQuery
| at org.hibernate.cfg.Mappings.checkQueryExist(Mappings.java:270)
| at org.hibernate.cfg.Mappings.addQuery(Mappings.java:259)
| at org.hibernate.cfg.HbmBinder.bindNamedQuery(HbmBinder.java:2555)
| at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:180)
| at org.hibernate.cfg.Configuration.add(Configuration.java:386)
| at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:427)
| at org.hibernate.cfg.Configuration.addResource(Configuration.java:482)
| ... 6 more
I had to manually update the config file and to insert a linkt to the hibernate.query-file
what goes wrong ? i have absolutely no idea, i am on to this problem for now abot 10hours and i cant find any solution :/
the file exists, is be found (without the file there comes a file not found excepption) but the content cant be read ?
Thats my code:
import java.util.ArrayList;
| import java.util.List;
|
| import org.jbpm.JbpmConfiguration;
| import org.jbpm.JbpmContext;
| import org.jbpm.graph.def.ProcessDefinition;
| import org.jbpm.graph.exe.ProcessInstance;
|
|
| import org.jbpm.JbpmConfiguration;
| import org.jbpm.JbpmContext;
| import org.jbpm.db.GraphSession;
| import org.jbpm.graph.def.ProcessDefinition;
| import org.jbpm.graph.exe.ProcessInstance;
| import org.jbpm.graph.exe.Token;
|
|
|
| public class Test001 {
| /**
| * @param args
| */
| public static void main(String[] args) {
| JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance();
| jbpmConfiguration.createSchema();
| JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
| try {
| ProcessInstance processInstance =
| jbpmContext.newProcessInstanceForUpdate("SimpleDefinition1");
| } finally {
| jbpmContext.close();
| }
| }
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3961219#3961219
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3961219
19 years, 9 months
[JBoss jBPM] - Re: missing
by mgommeringer
Here is my scenario:
I have three computers in a network. The first 'computer1' initiates the workflow. The other two (computer2 and computer3) have different specific tasks which have to be executed at a specific node in the workflow (by the CommandExecutor). After these nodes were executed asynchronously (on computer2 and computer3), the CommandExecutor will give control back to computer1 which does the further processing.
(I did not find out how to upload an image to the forum pages, so I will write down the sequence of workflow steps as text here):
| 1. computer1: initialize workflow
| 2. computer1 <sends message to> computer2: execute specific node on computer2
| 3. computer2 <sends message to> computer1: process results on computer1
| 4. computer1 <sends message to> computer3: execute other specific node on computer3
| 5. computer3 <sends message to> computer1: process results again on computer1
| 6. computer1 does the further processing up to the end state
|
| <?xml version="1.0" encoding="UTF-8"?>
|
| <process-definition xmlns="" name="example">
| <!-- Initiate the workflow on computer1 -->
| <start-state name="start">
| <transition name="" to="node-external-computer2"></transition>
| </start-state>
| <!-- This node will be executed by the CommandExecutor on computer2 -->
| <node name="node-external-computer2" async="true" destination="computer2">
| <transition name="" to="process-result1"></transition>
| </node>
| <!-- This node will be executed on computer1 (the 'main-processor') -->
| <node name="process-result1" async="true" destination="computer1">
| <transition name="" to="node-external-computer3"></transition>
| </node>
| <!-- This node will be executed by the CommandExecutor on computer3 -->
| <node name="node-external-computer3" async="true" destination="computer3">
| <transition name="" to="process-result2"></transition>
| </node>
| <!-- This node will be executed on computer1 again -->
| <node name="process-result2" async="true" destination="computer1">
| <transition name="" to="end"></transition>
| </node>
| <end-state name="end"></end-state>
| </process-definition>
|
Conceptually, i thought that all three computers have a CommandExecutor running with their specific destination.
In the current implementation of the asynchronous continuation, it is supposed that every node can be executed by an arbitrary CommandExecutor (if a clustered CommandExecutor would be implemented). In a distributed system, there are several external systems/services that only can execute the task they are made for (e.g. "get forecast for San Francisco"). So I think, that it should be possible to address a specific destination from the workflow so that only adequate CommandExecutors will receive the message.
It seems to be related to the jBPM Task, assigning different actors for every external computer. Only the way back from the external services to the "computer1" is not clear for me. Could I implement it on that way?
Thanks and regards,
Matthias
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3961215#3961215
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3961215
19 years, 9 months