(to view the issues, click the links or point your browser to http://jira.jboss.com/jira/browse/JBPM-{ISSUE-NUMBER}
This part will guide you through the most important changes that might affect compatibility when upgrading from jBPM 3.0.x to jBPM 3.1
The jbpm.properties
file is replaced by a file called
jbpm.cfg.xml
. The easiest way to upgrade jBPM is to start with a copy of the file
src/config.files/jbpm.cfg.xml
and migrate your customizations to it.
The biggest change is the deprecation of the JbpmSessionFactory and JbpmSession. The introduction of a complete services configuration framework replaced the persistence-only API. The JbpmSessionFactory and JbpmSession still should work, but you won't be able to use any of the new features like asynchronous messaging.
The old persistence blocks that look like this:
JbpmSession jbpmSession = jbpmSessionFactory.openJbpmSession(); try { jbpmSession.beginTransaction(); ... jbpmSession.getGraphSession().saveProcessInstance(processInstance); jbpmSession.commitTransaction(); } finally { jbpmSession.close(); }
Should be replaced with something like this:
JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext(); try { ... jbpmContext.save(processInstance); } finally { jbpmContext.close(); }
More information on the new configuration framework can be found in the user guide.
BACKWARDS INCOMPATIBLE CHANGE: refactored the decision expressions. the expression inside a condition element <condition>expression</condition> has changed from a beanshell script to a JSF-like expression. Another change is that first all the conditions are evaluated, and if none of the conditions are met, the default transition is taken. Previously, a decision looped over all the transitions and took the first transition for which the condition was met or that didn't have a condition. The difference is that the default (else-branch) transition now has to be moved up as the first transition.
Here are the database changes from jBPM 3.0.x to jBPM 3.1. More information on how to run the schema update for your database, see the users guide, section '8.2. Database upgrades'
# New JBPM_MESSAGE table create table JBPM_MESSAGE ( ID_ bigint generated by default as identity (start with 1), CLASS_ char(1) not null, DESTINATION_ varchar(255), EXCEPTION_ varchar(255), ISSUSPENDED_ bit, TOKEN_ bigint, TEXT_ varchar(255), ACTION_ bigint, NODE_ bigint, TRANSITIONNAME_ varchar(255), TASKINSTANCE_ bigint, primary key (ID_) ); # Added columns alter table JBPM_ACTION add column ACTIONEXPRESSION_ varchar(255); alter table JBPM_ACTION add column ISASYNC_ bit; alter table JBPM_COMMENT add column VERSION_ integer; alter table JBPM_ID_GROUP add column PARENT_ bigint; alter table JBPM_NODE add column ISASYNC_ bit; alter table JBPM_NODE add column DECISIONEXPRESSION_ varchar(255); alter table JBPM_NODE add column ENDTASKS_ bit; alter table JBPM_PROCESSINSTANCE add column VERSION_ integer; alter table JBPM_PROCESSINSTANCE add column ISSUSPENDED_ bit; alter table JBPM_RUNTIMEACTION add column VERSION_ integer; alter table JBPM_SWIMLANE add column ACTORIDEXPRESSION_ varchar(255); alter table JBPM_SWIMLANE add column POOLEDACTORSEXPRESSION_ varchar(255); alter table JBPM_TASK add column ISSIGNALLING_ bit; alter table JBPM_TASK add column ACTORIDEXPRESSION_ varchar(255); alter table JBPM_TASK add column POOLEDACTORSEXPRESSION_ varchar(255); alter table JBPM_TASKINSTANCE add column CLASS_ char(1); alter table JBPM_TASKINSTANCE add column ISSUSPENDED_ bit; alter table JBPM_TASKINSTANCE add column ISOPEN_ bit; alter table JBPM_TIMER add column ISSUSPENDED_ bit; alter table JBPM_TOKEN add column VERSION_ integer; alter table JBPM_TOKEN add column ISSUSPENDED_ bit; alter table JBPM_TOKEN add column SUBPROCESSINSTANCE_ bigint; alter table JBPM_VARIABLEINSTANCE add column TASKINSTANCE_ bigint; # Added constraints alter table JBPM_ID_GROUP add constraint FK_ID_GRP_PARENT foreign key (PARENT_) references JBPM_ID_GROUP; alter table JBPM_MESSAGE add constraint FK_MSG_TOKEN foreign key (TOKEN_) references JBPM_TOKEN; alter table JBPM_MESSAGE add constraint FK_CMD_NODE foreign key (NODE_) references JBPM_NODE; alter table JBPM_MESSAGE add constraint FK_CMD_ACTION foreign key (ACTION_) references JBPM_ACTION; alter table JBPM_MESSAGE add constraint FK_CMD_TASKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE; alter table JBPM_TOKEN add constraint FK_TOKEN_SUBPI foreign key (SUBPROCESSINSTANCE_) references JBPM_PROCESSINSTANCE; alter table JBPM_VARIABLEINSTANCE add constraint FK_VAR_TSKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE;