This content has been marked as final.
Show 4 replies
-
1. Re: jbpm do not auto create database schema.
thejavafreak Jan 13, 2008 10:04 PM (in response to rainhust)Of course, because there are no process definitions defined.
-
2. Re: jbpm do not auto create database schema.
sunfire Jan 14, 2008 5:29 AM (in response to rainhust)If you want to create the schema even without process definitions present you can use a component like this:
@BypassInterceptors @Name("org.jboss.seam.bpm.jbpm.init") @Startup(depends={"org.jboss.seam.bpm.jbpm"}) @Install(dependencies="org.jboss.seam.bpm.jbpm") public class JbpmInitializer extends Jbpm { private static final LogProvider log = Logging.getLogProvider(JbpmInitializer.class); public void startup() throws Exception { super.startup(); log.debug("Initializing jBPM Tables"); if(getProcessDefinitions() == null || getProcessDefinitions().length < 1 ) { try { getJbpmConfiguration().createJbpmContext().getContextSession(); } catch(Exception e) { log.error("jBPM Initialization Exception: " + e.getMessage()); e.printStackTrace(); } } } }
Works for Seam 2.0.1.CR1. -
4. Re: jbpm do not auto create database schema.
rainhust Jan 14, 2008 8:06 PM (in response to rainhust)thanks SunFire, i'm using seam 2.0 GA, but i will test the code later. and also thanks pete.
i also find , i put the jbpm deployer servlet in web.xml, also seam do not create the jbpm database schema , when i deploy the process through the GPD, the jbpm servlet will create the database schema.