mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
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:
@@ -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);
|
||||
|
@@ -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()
|
||||
|
Reference in New Issue
Block a user