[jboss-user] [JBoss Seam] - Re: jbpm do not auto create database schema.
SunFire
do-not-reply at jboss.com
Mon Jan 14 05:29:18 EST 2008
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.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4119560#4119560
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4119560
More information about the jboss-user
mailing list