Fixed ALF-9515: Activiti can no longer be disabled

Both Activiti and JBPM can now be "disabled" using the properties "system.workflow.engine.activiti.enabled" and "system.workflow.engine.jbpm.enabled", respectively. However, disabling JBPM is NOT recommended as several parts of the system are reliant on it. Furthermore, "disabled" just means the process definitions are not deployed and the engine is not registered with the WorkflowService, all DB tables etc. are still present. This means the engines can be disabled and re-enabled at will.

Also added back-end support for ALF-9392: More workflow metrics are required on the Workflow Console Admin Tool. An MBean is now available in Enterprise mode that provides the number of tasks, workflow definitions deployed and workflow instances in the system.

Added ENGINE_ID constant to JBPMEngine and globally replaced use of "jbpm" hard coded string.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@29326 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gavin Cornwell
2011-07-25 21:42:37 +00:00
parent a7b885a1c6
commit b3ce73691e
11 changed files with 274 additions and 89 deletions

View File

@@ -195,6 +195,9 @@ public class JBPMEngine extends AlfrescoBpmEngine implements WorkflowEngine
private static final String ERR_GET_COMPANY_HOME_INVALID = "jbpm.engine.get.company.home.invalid";
private static final String ERR_GET_COMPANY_HOME_MULTIPLE = "jbpm.engine.get.company.home.multiple";
// engine ID
public static final String ENGINE_ID = "jbpm";
/**
* Sets the JBPM Template used for accessing JBoss JBPM in the correct
* context

View File

@@ -84,8 +84,8 @@ public class JBPMEngineTest extends BaseAlfrescoSpringTest
person3 = createPerson(USER3);
BPMEngineRegistry registry = (BPMEngineRegistry)applicationContext.getBean("bpm_engineRegistry");
workflowComponent = registry.getWorkflowComponent("jbpm");
taskComponent = registry.getTaskComponent("jbpm");
workflowComponent = registry.getWorkflowComponent(JBPMEngine.ENGINE_ID);
taskComponent = registry.getTaskComponent(JBPMEngine.ENGINE_ID);
packageComponent = (WorkflowPackageComponent)applicationContext.getBean("workflowPackageImpl");
// deploy test process messages

View File

@@ -65,7 +65,7 @@ public abstract class JBPMSpringActionHandler implements ActionHandler
protected String getWorkflowInstanceId(ExecutionContext context)
{
String id = new Long(context.getProcessInstance().getId()).toString();
return BPMEngineRegistry.createGlobalId("jbpm", id);
return BPMEngineRegistry.createGlobalId(JBPMEngine.ENGINE_ID, id);
}
}

View File

@@ -112,7 +112,7 @@ public class JbpmWorkflowServiceIntegrationTest extends AbstractWorkflowServiceI
@Override
protected String getEngine()
{
return "jbpm";
return JBPMEngine.ENGINE_ID;
}
@Override

View File

@@ -67,8 +67,8 @@ public class ReviewAndApproveTest extends BaseSpringTest
{
personService = (PersonService)applicationContext.getBean("personService");
BPMEngineRegistry registry = (BPMEngineRegistry)applicationContext.getBean("bpm_engineRegistry");
workflowComponent = registry.getWorkflowComponent("jbpm");
taskComponent = registry.getTaskComponent("jbpm");
workflowComponent = registry.getWorkflowComponent(JBPMEngine.ENGINE_ID);
taskComponent = registry.getTaskComponent(JBPMEngine.ENGINE_ID);
// deploy latest review and approve process definition
ClassPathResource processDef = new ClassPathResource("alfresco/workflow/review_processdefinition.xml");