Merged BRANCHES/DEV/JBPM31UPGRADE to HEAD

14417: MOB-414 Upgrade to jBPM 3.3.1

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@14567 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
David Caruana
2009-06-05 17:04:57 +00:00
parent 34cae989d9
commit 1070ddd702
5 changed files with 51 additions and 15 deletions

View File

@@ -90,15 +90,6 @@ public class AlfrescoTimer extends Timer
public Boolean doWork() throws Exception
{
boolean deleteTimer = AlfrescoTimer.super.execute(jbpmContext);
// NOTE: there may be an issue in jBPM where a timer that causes a process to
// end is deleted twice (once via specific delete operation and once via
// delete DML statement) which causes a hibernate exception.
// Only delete timer if not at end of process
if (getProcessInstance().getEnd() != null)
{
deleteTimer = false;
}
return deleteTimer;
}
}, (username == null) ? "system" : username);

View File

@@ -100,6 +100,7 @@ public class JBPMSpringTest extends BaseSpringTest
throws Exception
{
theProcessInstanceContinuesWhenAnAsyncMessageIsReceived();
undeployProcessDefinition();
setComplete();
}
@@ -135,6 +136,21 @@ public class JBPMSpringTest extends BaseSpringTest
});
}
private void undeployProcessDefinition()
{
jbpmTemplate.execute(new JbpmCallback()
{
public Object doInJbpm(JbpmContext context)
{
GraphSession graphSession = context.getGraphSession();
ProcessDefinition processDefinition = graphSession.findLatestProcessDefinition("hello world");
graphSession.deleteProcessDefinition(processDefinition.getId());
return null;
}
});
}
private void processInstanceIsCreatedWhenUserSubmitsWebappForm()
{
jbpmTemplate.execute(new JbpmCallback()