Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 40

Thread: jbpm getting started

  1. #11

    Default progress w/jbpm and spring

    Here's how I am incorporating jBPM 3.1 into an existing Hibernate3/Spring app. My goal is to have a single SessionFactory for jBPM and the rest of my app, so everything participates in the same Spring declarative transactions.

    - add jbpm-3.1.1.jar to WEB-INF/lib.
    - in applicationContext.xml, I created a bean for JbpmConfiguration

    <bean id="jbpmConfig"
    class="org.springmodules.workflow.jbpm31.LocalJbpm ConfigurationFactoryBean">
    <!-- pass in existing sessionFactory -->
    <property name="sessionFactory" ref="sessionFactory"/>
    <property name="configuration" value="WEB-INF/jbpm.cfg.xml"/>
    <property name="processDefinitions">
    <list>
    <ref local="process1"/>
    </list>
    </property>
    </bean>

    <bean id="process1" class="org.springmodules.workflow.jbpm31.definitio n.ProcessDefinitionFactoryBean">
    <property name="definitionLocation" value="WEB-INF/process1.xml"/>
    </bean>

    - sessionFactory/hibernate configuration has to incorporate all of the jBPM org.jbpm.....hbm.xml mappings *and*your own.

    - jbpm.cfg.xml copy-pasted from jBPM docs, but I took out reference to hibernate.cfg.xml since the SessionFactory is being provided via Spring.

    - process defs (process1.xml etc.) are normal.

    - you have to create the DB tables yourself somehow.

    Only problem: it seems like this is causing a new version of each process to be redeployed to the jbpm_processdefinition table every time the app is restarted. This seems a little odd, and may make the Spring-based process deployment less useful.

  2. #12
    Join Date
    Jan 2005
    Location
    Bucharest, Romania
    Posts
    5,403

    Default

    Only problem: it seems like this is causing a new version of each process to be redeployed to the jbpm_processdefinition table every time the app is restarted. This seems a little odd, and may make the Spring-based process deployment less useful.
    Do you have any idea what causes this redeployment? Is it caused by Spring integration? Can you please raise an issue on jira so I can take a look at it and fix it on our next Spring Modules release?
    Thanks.
    Costin Leau
    SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
    http://twitter.com/costinl
    Please use [ c o d e ] [ / c o d e ] tags

  3. #13

    Default

    Quote Originally Posted by Costin Leau
    Do you have any idea what causes this redeployment? Is it caused by Spring integration? Can you please raise an issue on jira so I can take a look at it and fix it on our next Spring Modules release?
    Thanks.
    Wow, thanks for the quick reply. now that's service!

    Honestly, I have no idea why this is happening. I'm new to jBPM, and right now focused on just getting the basic configuration and db connection/tx mgmt right.

    I'm not sure what ProcessDefinitionFactoryBean does. Here's my process1.xml in case there's something unusual here:
    Code:
    <process-definition name="process1">
      <start-state>
        <transition to='s' />
      </start-state>
      <state name='s'>
        <transition to='end'/>
      </state>
      <end-state name='end' />
    </process-definition>
    Bill Schneider

  4. #14
    Join Date
    Jan 2005
    Location
    Bucharest, Romania
    Posts
    5,403

    Default

    Your process seems to be just fine. What jbpm version are you using? Lately I've been a bit swamped in work and I didn't have much time to do the jbpm documentation but it's high on my Spring Modules priority list (you can actually vote the jira issue).
    I'll try to reproduce your problem though from my tests I haven't had such a problem.
    Costin Leau
    SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
    http://twitter.com/costinl
    Please use [ c o d e ] [ / c o d e ] tags

  5. #15

    Default

    Quote Originally Posted by Costin Leau
    Your process seems to be just fine. What jbpm version are you using? Lately I've been a bit swamped in work and I didn't have much time to do the jbpm documentation but it's high on my Spring Modules priority list (you can actually vote the jira issue).
    I'll try to reproduce your problem though from my tests I haven't had such a problem.
    I'm using jbpm 3.1.1.
    Bill Schneider

  6. #16
    Join Date
    Jan 2005
    Location
    Bucharest, Romania
    Posts
    5,403

    Default

    I have tested only with jbpm 3.1.0. I'll let you know if I find anything.
    Costin Leau
    SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
    http://twitter.com/costinl
    Please use [ c o d e ] [ / c o d e ] tags

  7. #17
    Join Date
    Jan 2005
    Location
    Bucharest, Romania
    Posts
    5,403

    Default

    FYI, I've created an issue on JIRA: http://opensource.atlassian.com/proj...browse/MOD-136
    Costin Leau
    SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
    http://twitter.com/costinl
    Please use [ c o d e ] [ / c o d e ] tags

  8. #18
    Join Date
    Nov 2005
    Location
    London, UK
    Posts
    68

    Default

    sorry if this is off topic now, but im following up on my post refering to the test folder earlier.

    I have had a look in the zip distribution & at the online cvs repository, but i cant find the testing folder with the example applicationContext.xml file.

    specifically, i am having trouble defining the hibernateConfiguration property of my org.springmodules.workflow.jbpm30.LocalJbpmSession FactoryBean bean (im using jbpm 3.0.2). I already have a org.springframework.orm.hibernate3.LocalSessionFac toryBean defined in my applicationContext.xml and i would like to use the configuration from this session factory. can you point me in the right direction regarding this?

    My bean def so far:

    Code:
    <bean id="hibernateSessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
      <property name="mappingResources">
        <list>
          <value>...</value>
        </list>
      </property>
      <property name="hibernateProperties">
        <props>...</props>
      </property>
      <property name="dataSource">
        <ref bean="..."/>
      </property>
    </bean>
    
    <bean id="jbpmSessionFactoryBean" class="org.springmodules.workflow.jbpm30.LocalJbpmSessionFactoryBean">
    	<property name="hibernateSessionFactory" ref="hibernateSessionFactory"/>
    </bean>
    Thanks for any assistance forthcoming

    - tobes

  9. #19
    Join Date
    Jan 2005
    Location
    Bucharest, Romania
    Posts
    5,403

    Default

    See this link from CVS: https://springmodules.dev.java.net/s...rkflow/jbpm30/
    I'll put up some documentation so it will be part of the next release. Clearly there is a need for it.
    Costin Leau
    SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
    http://twitter.com/costinl
    Please use [ c o d e ] [ / c o d e ] tags

  10. #20
    Join Date
    Jun 2006
    Location
    Edinburgh, Scotland
    Posts
    4

    Default New versions for process definitions

    Hi,

    I have also seen the problem with new versions of processes being created, this is due to the fact that the deployProcessDefinition method of GraphSession in JBPM 3.1.1 ensures that a new process definition with an updated version is saved if the process name already exists.

    I think I just need to come up with a method of flagging whether or not to deploy process definitions in the spring config file as currently my process definitions are specified in the Spring config file and as such are continuially re-deployed every time the server starts.

    Any useful suggestions would be most welcome

    Regards

    Scott

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •