Workflow:

1) Support for localisation of all Workflow definitions
2) Consolidate on id, title & description fields for all Workflow API objects
3) Add WorkflowTransition object to Workflow APIs
4) Fix up damage of above changes (web client etc)

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3528 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
David Caruana
2006-08-16 18:07:27 +00:00
parent 640195064a
commit 7c670da1b0
18 changed files with 239 additions and 46 deletions

View File

@@ -30,8 +30,11 @@ public class WorkflowDefinition
/** Workflow Definition version */
public String version;
/** Workflow Definition name */
public String name;
/** Workflow Definition Title (Localised) */
public String title;
/** Workflow Definition Description (Localised) */
public String description;
/** Task Definition for Workflow Start Task (Optional) */
public WorkflowTaskDefinition startTaskDefinition;
@@ -42,6 +45,6 @@ public class WorkflowDefinition
*/
public String toString()
{
return "WorkflowDefinition[id=" + id + ",version=" + version + ",name=" + name + ",startTask=" + startTaskDefinition.toString() + "]";
return "WorkflowDefinition[id=" + id + ",version=" + version + ",title=" + title + ",startTask=" + startTaskDefinition.toString() + "]";
}
}

View File

@@ -26,9 +26,12 @@ package org.alfresco.service.cmr.workflow;
*/
public class WorkflowNode
{
/** Name of the Workflow Node */
public String name;
/** Workflow Node Title (Localised) */
public String title;
/** Workflow Node Description (Localised) */
public String description;
/** Type of the Workflow Node (typically this is BPM engine specific - informational only */
public String type;
@@ -36,7 +39,7 @@ public class WorkflowNode
public boolean isTaskNode;
/** The transitions leaving this node (or null, if none) */
public String[] transitions;
public WorkflowTransition[] transitions;
/* (non-Javadoc)
@@ -50,6 +53,6 @@ public class WorkflowNode
transitionsArray += ((i == 0) ? "" : ",") + "'" + transitions[i] + "'";
}
transitionsArray += "}";
return "WorkflowNode[name=" + name + ",type=" + type + ",transitions=" + transitionsArray + "]";
return "WorkflowNode[title=" + title + ",type=" + type + ",transitions=" + transitionsArray + "]";
}
}

View File

@@ -151,7 +151,7 @@ public interface WorkflowService
* @param transition the transition to follow (or null, for the default transition)
* @return the updated workflow path
*/
public WorkflowPath signal(String pathId, String transition);
public WorkflowPath signal(String pathId, String transitionId);
/**
* Gets all Tasks associated with the specified path
@@ -209,7 +209,7 @@ public interface WorkflowService
* @param transition the task transition to take on completion (or null, for the default transition)
* @return the updated task
*/
public WorkflowTask endTask(String taskId, String transition);
public WorkflowTask endTask(String taskId, String transitionId);
/**
* Create a Workflow Package (a container of content to route through the Workflow).

View File

@@ -25,7 +25,7 @@ import org.alfresco.service.namespace.QName;
/**
* Workflow Task Data Object
*
* Represents a human-oriented task within an "in-fligth" workflow instance
* Represents a human-oriented task within an "in-flight" workflow instance
*
* @author davidc
*/
@@ -34,8 +34,11 @@ public class WorkflowTask
/** Unique id of Task */
public String id;
/** Name of Task */
public String name;
/** Task Title (Localised) */
public String title;
/** Task Description (Localised) */
public String description;
/** Task State */
public WorkflowTaskState state;
@@ -55,7 +58,6 @@ public class WorkflowTask
public String toString()
{
String propCount = (properties == null) ? "null" : "" + properties.size();
return "WorkflowTask[id=" + id + ",name=" + name + ",state=" + state + ",props=" + propCount + ",def=" + definition + ",path=" + path.toString() + "]";
return "WorkflowTask[id=" + id + ",title=" + title + ",state=" + state + ",props=" + propCount + ",def=" + definition + ",path=" + path.toString() + "]";
}
}

View File

@@ -32,7 +32,6 @@ public class WorkflowTaskDefinition
/** Unique id of Workflow Task Definition */
public String id;
// TODO: Convert to TaskDefinition (derived from TypeDefinition)
/** Task Metadata */
public TypeDefinition metadata;

View File

@@ -0,0 +1,46 @@
/*
* Copyright (C) 2005 Alfresco, Inc.
*
* Licensed under the Mozilla Public License version 1.1
* with a permitted attribution clause. You may obtain a
* copy of the License at
*
* http://www.alfresco.org/legal/license.txt
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific
* language governing permissions and limitations under the
* License.
*/
package org.alfresco.service.cmr.workflow;
/**
* Workflow Transition.
*
* @author davidc
*/
public class WorkflowTransition
{
/** Transition Id */
public String id;
/** Transition Title (Localised) */
public String title;
/** Transition Description (Localised) */
public String description;
/** Is this the default transition */
public boolean isDefault;
/* (non-Javadoc)
* @see java.lang.Object#toString()
*/
public String toString()
{
return "WorkflowTransition[id=" + id + ",title=" + title + "]";
}
}