Merging DEV/ACTIVITI_INTEGRATION2 to HEAD

25933: Updated activiti jars to 5.3 release + temporarily disabled query-tests for activtiti
	25932: Fixed failing FormServiceImplTest.
	25930: Fixed ClassCastException and NullPointerException when using JBPM and Activiti tasks in Alfresco Explorer.
	25898: Implemented testGetWorkflows() which tests the methods getWorkflows() getActiveWorkflows() and getCompletedWorkflows() for both workflow engines.
	25888: Fixed failing testOutcome.
	25884: Workflow console fully tested using activiti engine + small bugfixes
	25854: Implemented testGetPathProperties on AbstractWorkflowServiceIntegrationTest. This tests getPathProperties for Activiti and JBPM workflow engines.
	25827: Added lifecycle sample for activiti engine
	25801: Added a new WorkflowRestApiTest testTaskInstancesForWorkflowGet. Also fixed issues with ActivitWorkflowEngine.queryTasks() relating to the start task being returned incorrectly.
	25731: Added timer execution test to verify Authentication and Transactional behavior + added license headers to 2 files
	25682: ALF-6902 delete identitylinks + added timer sample + adhoc notify me feature
	25649: Redeploying of parallel activiti WF's turned of (remainder from development)
	25645: Fixing getWorkflows test, using valid date to check "due before"
	25642: Implemented getPathProperties() on ActivitiWorkflowEngine. Also refactored ActivitiTypeConverter to create ActivitiPropertyConverter which uses a WorkflowPropertyHandlerRegistry.
	25636: Fixes for use of Activiti workflows in JSF client
	25615: Added parallel review and approve process (regular + grouped)
	25520: Added REST-test for review workflow and pooled review workflow for both engines
	25471: Added queryTasks test for both engines
	25397: Testing getTimers() on both engines
	25368: Using authorityName instead of name for candidate-group + fixed priority WF vs. Task mixup in start-task
	25335: F96: A form control for LIST constraint based decision properties in Activiti tasks exists
	25324: Added correct sources for current 5.3-SNAPSHOT
	25323: Implemented TaskQuery further and added extra test-coverage + delete/cancel WF now deletes History as well 
	25318: The signal() method on ActivitiWorkflowEngine now returns a WorkflowPath if the signal ended the WorkflowInstance.
	25300: Fixed start workflow form for Activiti pooled review and approve process definition
	25294: Implemented signal() method on ActivitiWorkflowEngine. Currently it returns null if the signal() ended the Workflowinstance.
	25199: Implemented getTimers() + fixed some issues with the outcome prop name + upgraded to activiti 5.3
	25179: Added support for wf:outcome property on Activiti tasks. Now ian arbitrary property can be set as the property from which outcomes are read.
	25152: Refactored the WorkflowServiceImplTest to create an AbstractWorkflowServiceImplTest. Extended this base test with Jbpm and Activiti implementations.
	25134: Fixed workflowPath node issue on start-task + Task variables are no longer flushed to process-instance variables
	25131: ALF-6901 start task completion date + taskListeners using ScriptService instead of activiti's built-in JSR-223
	25105: Implemented getWorkflows() and getCompletedWorkflows() methods on ActivitiWorkflowEngine.
	25098: Mandatory properties are now checked in TaskCompleteListener to allow setting of mandatory properties in end-task listeners before the check is performed + review-pooled used person to set as bpm_assignee + removed duplicate messageService in ActivitiWE
	25089: Merged ActivitiTaskComponent and ActivitiWorkflowComponent into a single class, ActivitiWorkflowEngine.
	25048: Implemented getStartTask(String) method on WorkflowService interface. This gets the start task instance for a given workflow instance Id. Also, modified the start task returned by the ActivitiTaskComponent so that it has the correct title.
	25028: Added WorkflowDefinitionGet webscript and test + tested WorkflowInstanceDelete and fixed WorkflowTaskDefinition bug
	25003: Added getStartTask() method to WorkflowService. Implemented for JBPMEngine and ActivitiTaskComponent.
	24996: Added activiti process-definition for pooled review/approve workflow + new version of activiti 5.2 to allow releasing task to pool agian
	24972: Extended TaskInstanceGet REST-test + upgraded activiti lib due to bug in HistoricTaskInstance
	24934: Refactored package assignment/creation so that it is now mainly performed by the WOrkflowPackageComponent rather than the WorkflowComponent or TaskComponent. Implemented correct package behaviour for Activiti workflow engine.
	24926: Extended TaskInstancePut REST-test + added extra logic for ignoring tasks for deleted/canceled WF's
	24895: Added new tests to FormServiceImplTest to check TaskFormProcessor correctly transitions tasks with both workflow engines.
	24888: Updated WorkflowRestApiTest, enhanced testing of getTaskInstances
	24861: Updated the FormServiceImplTest so that it includes tests for the TaskFormProcessor using both workflow engines.
	24851: Made WorkflowRestApiTest abstract and created a subtype for activiti and jbpm
	24832: Added integration test to FormServiceImplTest to check WorkflowFormProcessor works correctly with both Activiti and Jbpm engines.
	24829: ALF-6195 Pooled actors are now available on completed tasks
	24806: Added null check for parameters variable
	24805: Cleaned up WorkflowRestAPITest to remove deprecated field access.
	24797: ALF-6016 start-task now contains variables, upgraded to activiti 5.2-SNAPSHOT
	24796: Removed accidentaly checked-in folder
	24795: Share project "Catalina-virtual" into "https://svn.alfresco.com/repos/enterprise/alfresco/BRANCHES/DEV/ACTIVITI_INTEGRATION2/root"
	24780: Created Activiti Review & Approve workflow.
	24702: ALF-6201 cleaned up WOFactory.createInstance + removed candidate group from adhoc WF (pooled task)
	24693: ALF-6438 implemented getWorkflowById for completed workflows + added unittest for getWorkflowById from running and complete processes
	24686: ALF-6195 added formKey (typeDefinition name) to variables to make available in history + added test for getTaskById() for a completed task
	24642: ALF-6003 + ALF-6195 Introduced mapping of WorkfloTask from HistoricTaskInstance and it's variables
	24565: ALF-6016 tested getting start task by id + added initial test for taskQuery
	24560: ALF-6217 implemented and tested pooled actors using activiti-candidate user/group
	24520: ALF-6003 ALF-6014 tested + various minor improvements + TaskTypeEvaluator matchin pattern adjusted to be able to use workflow-detail form for activiti start-tasks
	24417: ALF-6003, ALF-6014 Added tasklisteners to set default task props + flush variables when task ends + running script in tasklistener (to set task-variables in script based on wf-props)
	24399: Merged BRANCHES/V3.4 to BRANCHES/DEV/ACTIVITI_INTEGRATION2:
   24396: Fix for ALF-6126: TaskTypeEvaluator uses task-name instead of taskType-name for node-type matching
	24396: Fix for ALF-6126: TaskTypeEvaluator uses task-name instead of taskType-name for node-type matching
	24334: ALF-6015 ALF-6016: Completing a task implemented + using task-local variables
	24125: ALF-5995 properties passed when starting workflow are stored
	24111: ALF-5974, ALF-5972 Task-update implemented + capturing company-home, initiator and initiator home implemented and tested
	23891: Fixing failing tests in ActivitiWorkflowComponentTest
	23776: Upgraded activiti to 5.0-SNAPSHOT + Introduced error-handling using messages + initial support for HistoricActivity/ProcessInstances
	23600: Removing unneeded folder that was introduced accidentally when reattaching SVN to eclipse
	23599: 
	23298: 
	23250: Rolling back revisions 23212 to 23113 to fix issue with logging in.
	23212: Trying to fix the problem with logging in.
	23200: Added Form config for the Activiti Adhoc Process. Fixed failing tests in ActivitiWorkflowComponentTest.
	23197: Fixed failing tests in WorkflowServiceeImplTest. Updated Activiti jars in 3rdParty.
	23191: Adding Activiti Ahodc Workflow to Workflow Deployer to demonstrate Activiti Workflow/Task..Component integration with UI.
	23129: Copy Activiti JAR files when building WAR and doing exploded deploy
	23113: Implemented ActivitiTaskComponent.getTaskById()
	23079: Created ActivitiTaskComponent and started to implement various task getter methods.
	22890: Added testStartTask to WorkflowServiceImplTests to test that the start task functionality works as required by the Workflow UI.
	22889: Added testStartTask to WorkflowServiceImplTests to test that the start task functionality works as required by the Workflow UI.
	22888: Added testStartTask to WorkflowServiceImplTests to test that the start task functionality works as required by the Workflow UI.
	22887: Added testStartTask to WorkflowServiceImplTests to test that the start task functionality works as required by the Workflow UI.
	22769: Added more functionality to ActivitiWorkflowComponent.startWorkflow.
	22759: Implemented more methods for getting WorkflowDefinitions on ActivitiWorkflowComponent. Also added more functionality to the startWorkflow method.
	22758: Implemented more methods for getting WorkflowDefinitions on ActivitiWorkflowComponent. Also added more functionality to the startWorkflow method.
	22672: Created ActivitiWorkflowComponent and implemented deployDefinition(), undeployDefinition() and isDefinitionDeployed() methods.
	22659: Replacing Activiti Jars
	22359: Added tests to check rollback of transactions in Activiti.
	22358: Got some simple transaction tests working. These test transaction visibility is working properly and also check that rollbacks work correctly.
	22342: Created a patch to add the Activiti tables in.
	22333: Added some simple tests to check if Activiti works using a DataSource and TransactionManager.
	22332: Updating Activiti to the beta release.
	22286: Added Activiti and its dependencies to 3rd Party libraries. Updated JUnit jar to 4.8. Created package org/alfresco/repo/workflow/activiti and added some simple tests to check Activiti integration.
	21879: Branch to develop support for Activiti workflow engine.
	23264: Creating branch ACTIVITI_INTEGRATION2 to merge HEAD back into the existing ACTIVITI_INTEGGRATION branch.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@25984 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
N Smith
2011-03-02 17:12:35 +00:00
parent 8a87e29067
commit 2980cf9f78
130 changed files with 15410 additions and 1988 deletions

View File

@@ -29,11 +29,20 @@ import java.io.Serializable;
public class WorkflowDefinition implements Serializable
{
private static final long serialVersionUID = -4320345925926816927L;
//XXarielb these should most likely all be private
@Deprecated
public final String id;
@Deprecated
public final String name;
@Deprecated
public final String version;
@Deprecated
public final String title;
@Deprecated
public final String description;
transient private final WorkflowTaskDefinition startTaskDefinition;

View File

@@ -27,11 +27,24 @@ package org.alfresco.service.cmr.workflow;
public class WorkflowDeployment
{
/** Workflow Definition */
@Deprecated
public WorkflowDefinition definition;
/** Workflow Status */
@Deprecated
public String[] problems;
public WorkflowDeployment()
{
// Default Constructor.
}
public WorkflowDeployment(WorkflowDefinition definition, String... problems)
{
this.definition = definition;
this.problems = problems;
}
/**
* @return the definition
*/

View File

@@ -36,38 +36,69 @@ public class WorkflowInstance implements Serializable
private static final long serialVersionUID = 4221926809419223452L;
/** Workflow Instance unique id */
@Deprecated
public String id;
/** Workflow Instance description */
@Deprecated
public String description;
/** Is this Workflow instance still "in-flight" or has it completed? */
@Deprecated
public boolean active;
/** Initiator (cm:person) - null if System initiated */
@Deprecated
public NodeRef initiator;
/** Workflow priority */
public Integer priority;
/** Workflow Start Date */
@Deprecated
public Date startDate;
/** Workflow Due Date */
public Date dueDate;
/** Workflow End Date */
@Deprecated
public Date endDate;
/** Workflow Package */
@Deprecated
public NodeRef workflowPackage;
/** Workflow Context */
@Deprecated
public NodeRef context;
/** Workflow Definition */
@Deprecated
public WorkflowDefinition definition;
public WorkflowInstance(
String id,
WorkflowDefinition definition,
String description,
NodeRef initiator,
NodeRef workflowPackage,
NodeRef context,
boolean active,
Date startDate,
Date endDate)
{
this.id = id;
this.definition = definition;
this.description = description;
this.initiator = initiator;
this.workflowPackage = workflowPackage;
this.context = context;
this.active = active;
this.startDate = startDate;
this.endDate = endDate;
}
/**
* @return the serialversionuid
*/

View File

@@ -29,23 +29,42 @@ package org.alfresco.service.cmr.workflow;
public class WorkflowNode
{
/** Workflow Node Name */
@Deprecated
public String name;
/** Workflow Node Title (Localised) */
@Deprecated
public String title;
/** Workflow Node Description (Localised) */
@Deprecated
public String description;
/** Type of the Workflow Node (typically this is BPM engine specific - informational only */
@Deprecated
public String type;
/** Does this Workflow Node represent human interaction? */
@Deprecated
public boolean isTaskNode;
/** The transitions leaving this node (or null, if none) */
@Deprecated
public WorkflowTransition[] transitions;
public WorkflowNode(String name,
String title, String description,
String type, boolean isTaskNode,
WorkflowTransition... transitions)
{
this.name = name;
this.title = title;
this.description = description;
this.type = type;
this.isTaskNode = isTaskNode;
this.transitions = transitions;
}
/**
* @return the name
*/

View File

@@ -32,16 +32,28 @@ package org.alfresco.service.cmr.workflow;
public class WorkflowPath
{
/** Unique id of Workflow Path */
@Deprecated
public String id;
/** Workflow Instance this path is part of */
@Deprecated
public WorkflowInstance instance;
/** The Workflow Node the path is at */
@Deprecated
public WorkflowNode node;
/** Is the path still active? */
@Deprecated
public boolean active;
public WorkflowPath(String id, WorkflowInstance instance, WorkflowNode node, boolean active)
{
this.id = id;
this.instance = instance;
this.node = node;
this.active = active;
}
/**
* @return the id
@@ -75,12 +87,12 @@ public class WorkflowPath
return active;
}
/* (non-Javadoc)
* @see java.lang.Object#toString()
/**
* {@inheritDoc}
*/
@Override
public String toString()
{
return "WorkflowPath[id=" + id + ",instance=" + instance.toString() + ",active=" + active + ",node=" + node.toString()+ "]";
return "WorkflowPath[id=" + id + ",instance=" + instance.toString() + ",active=" + active + ",node=" + ((node != null) ? node.toString() : "null") + "]";
}
}

View File

@@ -194,7 +194,7 @@ public interface WorkflowService
public WorkflowPath startWorkflowFromTemplate(NodeRef templateDefinition);
/**
* Gets all "in-flight" active workflow instances of the specified Workflow Definition
* Gets all active workflow instances of the specified Workflow Definition
*
* @param workflowDefinitionId the workflow definition id
* @return the list of "in-flight" workflow instances
@@ -203,7 +203,7 @@ public interface WorkflowService
public List<WorkflowInstance> getActiveWorkflows(String workflowDefinitionId);
/**
* Gets all "in-flight" completed workflow instances of the specified Workflow Definition
* Gets all completed workflow instances of the specified Workflow Definition
*
* @param workflowDefinitionId the workflow definition id
* @return the list of "in-flight" workflow instances
@@ -213,7 +213,7 @@ public interface WorkflowService
public List<WorkflowInstance> getCompletedWorkflows(String workflowDefinitionId);
/**
* Gets all "in-flight" workflow instances (both active and completed) of the specified Workflow Definition
* Gets all workflow instances (both active and completed) of the specified Workflow Definition
*
* @param workflowDefinitionId the workflow definition id
* @return the list of "in-flight" workflow instances
@@ -298,6 +298,15 @@ public interface WorkflowService
*/
@Auditable(parameters = {"pathId"})
public List<WorkflowTask> getTasksForWorkflowPath(String pathId);
/**
* Gets the start task instance for the given workflow instance.
*
* @param workflowInstanceId
* @return
*/
@Auditable(parameters = {"pathId"})
public WorkflowTask getStartTask(String workflowInstanceId);
//

View File

@@ -34,29 +34,54 @@ import org.alfresco.service.namespace.QName;
public class WorkflowTask
{
/** Unique id of Task */
@Deprecated
public String id;
/** Task Name */
@Deprecated
public String name;
/** Task Title (Localised) */
@Deprecated
public String title;
/** Task Description (Localised) */
@Deprecated
public String description;
/** Task State */
@Deprecated
public WorkflowTaskState state;
/** Workflow path this Task is associated with */
@Deprecated
public WorkflowPath path;
/** Task Definition */
@Deprecated
public WorkflowTaskDefinition definition;
/** Task Properties as described by Task Definition */
@Deprecated
public Map<QName, Serializable> properties;
public WorkflowTask(String id,
WorkflowTaskDefinition definition,
String name, String title, String description,
WorkflowTaskState state, WorkflowPath path,
Map<QName, Serializable> properties)
{
this.id = id;
this.definition = definition;
this.name = name;
this.title = title;
this.description = description;
this.state = state;
this.path = path;
this.properties = properties;
}
/**
* @return the id
*/

View File

@@ -32,14 +32,24 @@ import org.alfresco.service.cmr.dictionary.TypeDefinition;
public class WorkflowTaskDefinition
{
/** Unique id of Workflow Task Definition */
@Deprecated
public String id;
/** Workflow Node this task created from */
@Deprecated
public WorkflowNode node;
/** Task Metadata */
@Deprecated
public TypeDefinition metadata;
public WorkflowTaskDefinition(String id, WorkflowNode node, TypeDefinition metadata)
{
this.id = id;
this.node = node;
this.metadata = metadata;
}
/**
* @return the id
*/
@@ -64,8 +74,9 @@ public class WorkflowTaskDefinition
return node;
}
/* (non-Javadoc)
* @see java.lang.Object#toString()
/**
*
* {@inheritDoc}
*/
@Override
public String toString()

View File

@@ -23,24 +23,43 @@ import java.util.Date;
public class WorkflowTimer
{
/** Timer Id */
@Deprecated
public String id;
/** Transition Name */
@Deprecated
public String name;
/** Associated Workflow Path */
@Deprecated
public WorkflowPath path;
/** Associated Workflow Task (if any) */
@Deprecated
public WorkflowTask task;
/** Due Date */
@Deprecated
public Date dueDate;
/** Error */
@Deprecated
public String error;
/**
public WorkflowTimer(String id, String name, WorkflowPath path,
WorkflowTask task, Date dueDate, String error) {
super();
this.id = id;
this.name = name;
this.path = path;
this.task = task;
this.dueDate = dueDate;
this.error = error;
}
/**
* @return the id
*/
public String getId()

View File

@@ -27,18 +27,29 @@ package org.alfresco.service.cmr.workflow;
public class WorkflowTransition
{
/** Transition Id */
@Deprecated
public String id;
/** Transition Title (Localised) */
@Deprecated
public String title;
/** Transition Description (Localised) */
@Deprecated
public String description;
/** Is this the default transition */
@Deprecated
public boolean isDefault;
public WorkflowTransition(String id, String title, String description, boolean isDefault)
{
this.id = id;
this.title = title;
this.description = description;
this.isDefault = isDefault;
}
/**
* @return the id
*/
@@ -71,8 +82,8 @@ public class WorkflowTransition
return isDefault;
}
/* (non-Javadoc)
* @see java.lang.Object#toString()
/**
* {@inheritDoc}
*/
@Override
public String toString()