Hi All,
Trying to deploy a process from the Java API instead of the ant task-Java tells me that
the process has deployed, and I get an ID back, but nothing shows up in the GWT-console
app, and there's nothing in the database. What am I missing?
public class ProcessDeployer { ProcessEngine processEngine = new
Configuration().buildProcessEngine(); RepositoryService repositoryService =
processEngine.getRepositoryService(); public ProcessDeployer (String filePath) {
File deployment = new File(filePath); String deploymentDbid =
repositoryService.createDeployment().addResourceFromFile(deployment).deploy();
System.out.println("DeploymentID is: " +deploymentDbid); }
public ArrayList<Deployment> getDeployments() { DeploymentQuery query =
repositoryService.createDeploymentQuery(); return (ArrayList<Deployment>)
query.list(); } }
public class TestDeployer { /** * @param args */ public static void
main(String[] args) { ProcessDeployer pd = new
ProcessDeployer("/Users/emiller/jbpm-4.0/examples/src/org/jbpm/examples/task/variables/process.jpdl.xml");
ArrayList <Deployment> deployments = pd.getDeployments(); for (int
i=0; i< deployments.size(); i++) { Deployment deploy =
(Deployment)deployments.get(i); System.out.println(deploy.getState());
}
Here's my output:
14:52:30,482 INF | [Environment] Hibernate 3.3.1.GA 14:52:30,486 INF | [Environment]
hibernate.properties not found 14:52:30,487 INF | [Environment] Bytecode provider name :
javassist 14:52:30,491 INF | [Environment] using JDK 1.4 java.sql.Timestamp handling
14:52:30,531 INF | [Configuration] configuring from resource: jbpm.hibernate.cfg.xml
14:52:30,531 INF | [Configuration] Configuration resource: jbpm.hibernate.cfg.xml
14:52:30,591 INF | [Configuration] Reading mappings from resource :
jbpm.repository.hbm.xml 14:52:30,722 INF | [Configuration] Reading mappings from resource
: jbpm.execution.hbm.xml 14:52:30,867 INF | [Configuration] Reading mappings from resource
: jbpm.history.hbm.xml 14:52:30,921 INF | [Configuration] Reading mappings from resource :
jbpm.task.hbm.xml 14:52:30,952 INF | [Configuration] Reading mappings from resource :
jbpm.identity.hbm.xml 14:52:31,002 INF | [Configuration] Configured SessionFactory: null
14:52:31,019 INF | [DriverManagerConnectionProvider] Using Hibernate built-in connection
pool (not for production use!) 14:52:31,019 INF | [DriverManagerConnectionProvider]
Hibernate connection pool size: 20 14:52:31,019 INF | [DriverManagerConnectionProvider]
autocommit mode: false14:52:31,021 INF | [DriverManagerConnectionProvider] using driver:
org.hsqldb.jdbcDriver at URL: jdbc:hsqldb:mem:. 14:52:31,021 INF |
[DriverManagerConnectionProvider] connection properties: {user=sa, password=****}
14:52:31,211 INF | [Dialect] Using dialect: org.hibernate.dialect.HSQLDialect 14:52:31,216
INF | [TransactionFactoryFactory] Using default transaction strategy (direct JDBC
transactions) 14:52:31,221 INF | [TransactionManagerLookupFactory] No
TransactionManagerLookup configured (in JTA environment, use of read-write or
transactional second-level cache is not recommended) 14:52:31,225 INF |
[ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory 14:52:31,286 INF |
[SessionFactoryImpl] building session factory 14:52:32,050 INF |
[SessionFactoryObjectFactory] Not binding factory to JNDI, no JNDI name configured
14:52:32,063 INF | [SchemaExport] Running hbm2ddl schema export 14:52:32,064 INF |
[SchemaExport] exporting generated schema to database 14:52:32,100 INF | [SchemaExport]
schema export complete DeploymentID is: 1 active
Thanks,
Erin