diff --git a/config/alfresco/messages/webclient.properties b/config/alfresco/messages/webclient.properties index 64eb93131f..8867ab1e68 100644 --- a/config/alfresco/messages/webclient.properties +++ b/config/alfresco/messages/webclient.properties @@ -585,13 +585,6 @@ checkout_warn=Note: You will lose any changes already made to this document. local_copy_location=Local copy location locate_content_upload=Locate and upload your document to the repository. -# Edit Workflow messages -modify_workflow_props=Modify Properties of Simple Workflow -name_approve_step=Name for approve step -name_reject_step=Name for reject step -select_reject_step=Do you want to provide a reject step? -choose_copy_move_location=Choose whether you want to move or copy the content and also the location. - # System Information and admin page messages system_info=System Information current_user=Current User @@ -929,6 +922,11 @@ email_space_users=Email Space users email_space_users_desc=Send an email to the users and groups assigned to this space. # Workflow messages +modify_workflow_props=Modify Properties of Simple Workflow +name_approve_step=Name for approve step +name_reject_step=Name for reject step +select_reject_step=Do you want to provide a reject step? +choose_copy_move_location=Choose whether you want to move or copy the content and also the location. start_workflow=Start Workflow start_workflow_wizard=Start New Workflow Wizard start_workflow_desc=This wizard helps you start a workflow for an item in the repository. @@ -943,19 +941,19 @@ start_workflow_finish_instruction=To start the workflow press Finish. To review start_workflow_no_metadata=There is no metadata to collect for this particular workflow. users_and_roles=Users and their Roles resources=Resources -manage_workitem=Manage WorkItem -manage_workitem_title=Manage WorkItem -manage_workitem_desc=This dialog allows the work item to be managed -workitem_properties=Work Item Properties +manage_task=Manage Task +manage_task_title=Manage Task +manage_task_desc=This dialog allows the task to be managed. +task_properties=Task Properties id=Id status=Status completed=Completed source=Source priority=Priority -my_workitems_todo_title=My Work Items To Do -my_workitems_todo_desc=List of your workflow items still to complete -my_workitems_completed_title=My Completed Work Items -my_workitems_completed_desc=List of your completed workflow items +my_tasks_todo_title=My Tasks To Do +my_tasks_todo_desc=List of your tasks still to complete +my_tasks_completed_title=My Completed Tasks +my_tasks_completed_desc=List of your completed tasks due_date=Due Date completed_on=Completed on outcome=Outcome @@ -964,10 +962,10 @@ cancel_workflow=Cancel Workflow cancel_workflow_info=To cancel this workflow, click OK. cancel_workflow_confirm=Are you sure you want to cancel the \"{0}\" workflow? error_cancel_workflow=Unable to cancel the workflow due to system error: -reassign_workitem_title=Reassign Work Item -reassign_workitem_desc=This dialog allows you to reassign a work item. -reassign_select_user=Select the user to assign the work item to, then press OK. -error_reassign_workitem=Unable to reassign the work item due to system error: +reassign_task_title=Reassign Task +reassign_task_desc=This dialog allows you to reassign a task. +reassign_select_user=Select the user to assign the task to, then press OK. +error_reassign_task=Unable to reassign the task due to system error: part_of_workflow=Part of Workflow initiated_by=Initiated by start_date=Start date diff --git a/config/alfresco/web-client-config-workflow.xml b/config/alfresco/web-client-config-workflow.xml index f403b3d2f2..4834158309 100644 --- a/config/alfresco/web-client-config-workflow.xml +++ b/config/alfresco/web-client-config-workflow.xml @@ -43,7 +43,7 @@ - + @@ -56,7 +56,7 @@ - + @@ -67,7 +67,7 @@ - + @@ -89,13 +89,13 @@ - + reassign - /images/icons/reassign_workflow_item.gif - dialog:reassignWorkItem + /images/icons/reassign_task.gif + dialog:reassignTask #{DialogManager.setupParameters} - #{actionContext.id} + #{actionContext.id} @@ -134,7 +134,7 @@ - + @@ -201,17 +201,17 @@ - + - + diff --git a/config/alfresco/web-client-config.xml b/config/alfresco/web-client-config.xml index cda36070b5..abd5722841 100644 --- a/config/alfresco/web-client-config.xml +++ b/config/alfresco/web-client-config.xml @@ -189,10 +189,10 @@ - - + + resources; - protected WorkItemCompleteResolver completeResolver = new WorkItemCompleteResolver(); + protected TaskCompleteResolver completeResolver = new TaskCompleteResolver(); protected UIRichList packageItemsRichList; protected List packageItemsToAdd; protected List packageItemsToRemove; @@ -62,7 +62,7 @@ public class ManageWorkItemDialog extends BaseDialogBean protected static final String ID_PREFIX = "transition_"; protected static final String CLIENT_ID_PREFIX = "dialog:" + ID_PREFIX; - private static final Log logger = LogFactory.getLog(ManageWorkItemDialog.class); + private static final Log logger = LogFactory.getLog(ManageTaskDialog.class); // ------------------------------------------------------------------------------ // Dialog implementation @@ -73,8 +73,8 @@ public class ManageWorkItemDialog extends BaseDialogBean super.init(parameters); // reset variables - this.workItem = null; - this.workItemNode = null; + this.task = null; + this.taskNode = null; this.workflowInstance = null; this.transitions = null; this.workflowPackage = null; @@ -90,20 +90,20 @@ public class ManageWorkItemDialog extends BaseDialogBean // get the task details String taskId = this.parameters.get("id"); - this.workItem = this.workflowService.getTaskById(taskId); + this.task = this.workflowService.getTaskById(taskId); - if (this.workItem != null) + if (this.task != null) { - // setup a transient node to represent the work item we're managing - WorkflowTaskDefinition taskDef = this.workItem.definition; - this.workItemNode = new TransientNode(taskDef.metadata.getName(), - "task_" + System.currentTimeMillis(), this.workItem.properties); + // setup a transient node to represent the task we're managing + WorkflowTaskDefinition taskDef = this.task.definition; + this.taskNode = new TransientNode(taskDef.metadata.getName(), + "task_" + System.currentTimeMillis(), this.task.properties); - // get access to the workflow instance for the work item - this.workflowInstance = this.workItem.path.instance; + // get access to the workflow instance for the task + this.workflowInstance = this.task.path.instance; // setup the workflow package for the task - Serializable obj = this.workItem.properties.get(WorkflowModel.ASSOC_PACKAGE); + Serializable obj = this.task.properties.get(WorkflowModel.ASSOC_PACKAGE); // TODO: remove this workaroud where JBPM may return a String and not the NodeRef if (obj instanceof NodeRef) { @@ -115,8 +115,8 @@ public class ManageWorkItemDialog extends BaseDialogBean } if (logger.isDebugEnabled()) - logger.debug("Found workflow package for work item '" + - this.workItem.id + "': " + this.workflowPackage ); + logger.debug("Found workflow package for task '" + + this.task.id + "': " + this.workflowPackage ); } } @@ -125,10 +125,10 @@ public class ManageWorkItemDialog extends BaseDialogBean throws Exception { if (logger.isDebugEnabled()) - logger.debug("Saving task: " + this.workItem.id); + logger.debug("Saving task: " + this.task.id); // prepare the edited parameters for saving - Map params = WorkflowBean.prepareWorkItemParams(this.workItemNode); + Map params = WorkflowBean.prepareTaskParams(this.taskNode); // remove any items the user selected to remove if (this.workflowPackage != null && this.packageItemsToRemove != null && @@ -155,7 +155,7 @@ public class ManageWorkItemDialog extends BaseDialogBean } // update the task with the updated parameters - this.workflowService.updateTask(this.workItem.id, params, null, null); + this.workflowService.updateTask(this.task.id, params, null, null); return outcome; } @@ -165,11 +165,11 @@ public class ManageWorkItemDialog extends BaseDialogBean { List buttons = null; - if (this.workItem != null) + if (this.task != null) { - // get the transitions available from this work item and + // get the transitions available from this task and // show them in the dialog as additional buttons - this.transitions = this.workItem.path.node.transitions; + this.transitions = this.task.path.node.transitions; if (this.transitions != null) { @@ -207,7 +207,7 @@ public class ManageWorkItemDialog extends BaseDialogBean String outcome = getDefaultFinishOutcome(); if (logger.isDebugEnabled()) - logger.debug("Transitioning work item: " + this.workItemNode.getId()); + logger.debug("Transitioning task: " + this.taskNode.getId()); // to find out which transition button was pressed we need // to look for the button's id in the request parameters, @@ -237,19 +237,19 @@ public class ManageWorkItemDialog extends BaseDialogBean tx.begin(); // prepare the edited parameters for saving - Map params = WorkflowBean.prepareWorkItemParams(this.workItemNode); + Map params = WorkflowBean.prepareTaskParams(this.taskNode); // update the task with the updated parameters - this.workflowService.updateTask(this.workItem.id, params, null, null); + this.workflowService.updateTask(this.task.id, params, null, null); // signal the selected transition to the workflow task - this.workflowService.endTask(this.workItem.id, selectedTransition); + this.workflowService.endTask(this.task.id, selectedTransition); // commit the changes tx.commit(); if (logger.isDebugEnabled()) - logger.debug("Ended work item with transition: " + selectedTransition); + logger.debug("Ended task with transition: " + selectedTransition); } catch (Throwable e) { @@ -428,13 +428,13 @@ public class ManageWorkItemDialog extends BaseDialogBean } /** - * Returns the Node representing the work item + * Returns the Node representing the task * * @return The node */ - public Node getWorkItemNode() + public Node getTaskNode() { - return this.workItemNode; + return this.taskNode; } /** @@ -454,7 +454,7 @@ public class ManageWorkItemDialog extends BaseDialogBean */ public String getPackageActionGroup() { - return (String)this.workItem.properties.get( + return (String)this.task.properties.get( WorkflowModel.PROP_PACKAGE_ACTION_GROUP); } @@ -465,12 +465,12 @@ public class ManageWorkItemDialog extends BaseDialogBean */ public String getPackageItemActionGroup() { - return (String)this.workItem.properties.get( + return (String)this.task.properties.get( WorkflowModel.PROP_PACKAGE_ITEM_ACTION_GROUP); } /** - * Returns a list of resources associated with this work item + * Returns a list of resources associated with this task * i.e. the children of the workflow package * * @return The list of nodes @@ -568,7 +568,7 @@ public class ManageWorkItemDialog extends BaseDialogBean } else if (logger.isDebugEnabled()) { - logger.debug("Failed to find workflow package for work item: " + this.workItem.id); + logger.debug("Failed to find workflow package for task: " + this.task.id); } return this.resources; @@ -610,13 +610,13 @@ public class ManageWorkItemDialog extends BaseDialogBean /** * Property resolver to determine if the given node has been flagged as complete */ - protected class WorkItemCompleteResolver implements NodePropertyResolver + protected class TaskCompleteResolver implements NodePropertyResolver { public Object get(Node node) { String result = Application.getMessage(FacesContext.getCurrentInstance(), "no"); - List completedItems = (List)workItem.properties.get( + List completedItems = (List)task.properties.get( WorkflowModel.PROP_COMPLETED_ITEMS); if (completedItems != null && completedItems.size() > 0 && diff --git a/source/java/org/alfresco/web/bean/workflow/ReassignWorkItemDialog.java b/source/java/org/alfresco/web/bean/workflow/ReassignTaskDialog.java similarity index 89% rename from source/java/org/alfresco/web/bean/workflow/ReassignWorkItemDialog.java rename to source/java/org/alfresco/web/bean/workflow/ReassignTaskDialog.java index 67f682e244..f543730687 100644 --- a/source/java/org/alfresco/web/bean/workflow/ReassignWorkItemDialog.java +++ b/source/java/org/alfresco/web/bean/workflow/ReassignTaskDialog.java @@ -29,18 +29,18 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; /** - * Bean implementation for the "Reassign Work Item" dialog + * Bean implementation for the "Reassign Task" dialog * * @author gavinc */ -public class ReassignWorkItemDialog extends BaseDialogBean +public class ReassignTaskDialog extends BaseDialogBean { - protected String workItemId; + protected String taskId; protected WorkflowService workflowService; protected PersonService personService; - private static final Log logger = LogFactory.getLog(ReassignWorkItemDialog.class); + private static final Log logger = LogFactory.getLog(ReassignTaskDialog.class); // ------------------------------------------------------------------------------ // Dialog implementation @@ -50,10 +50,10 @@ public class ReassignWorkItemDialog extends BaseDialogBean { super.init(parameters); - this.workItemId = this.parameters.get("workitem-id"); - if (this.workItemId == null || this.workItemId.length() == 0) + this.taskId = this.parameters.get("task-id"); + if (this.taskId == null || this.taskId.length() == 0) { - throw new IllegalArgumentException("Reassign workitem dialog called without task id"); + throw new IllegalArgumentException("Reassign task dialog called without task id"); } } @@ -62,7 +62,7 @@ public class ReassignWorkItemDialog extends BaseDialogBean throws Exception { if (logger.isDebugEnabled()) - logger.debug("Reassigning work item with id: " + this.workItemId); + logger.debug("Reassigning task with id: " + this.taskId); UIComponent picker = context.getViewRoot().findComponent("dialog:dialog-body:user-picker"); @@ -76,7 +76,7 @@ public class ReassignWorkItemDialog extends BaseDialogBean String userName = user[0]; Map params = new HashMap(1); params.put(ContentModel.PROP_OWNER, userName); - this.workflowService.updateTask(this.workItemId, params, null, null); + this.workflowService.updateTask(this.taskId, params, null, null); } else { @@ -91,7 +91,7 @@ public class ReassignWorkItemDialog extends BaseDialogBean } if (logger.isDebugEnabled()) - logger.debug("Reassigning work item with id: " + this.workItemId); + logger.debug("Reassigning task with id: " + this.taskId); return outcome; } @@ -99,7 +99,7 @@ public class ReassignWorkItemDialog extends BaseDialogBean @Override protected String getErrorMessageId() { - return "error_reassign_workitem"; + return "error_reassign_task"; } // ------------------------------------------------------------------------------ diff --git a/source/java/org/alfresco/web/bean/workflow/StartWorkflowWizard.java b/source/java/org/alfresco/web/bean/workflow/StartWorkflowWizard.java index 913ac04000..b99d77ad54 100644 --- a/source/java/org/alfresco/web/bean/workflow/StartWorkflowWizard.java +++ b/source/java/org/alfresco/web/bean/workflow/StartWorkflowWizard.java @@ -115,7 +115,7 @@ public class StartWorkflowWizard extends BaseWizardBean logger.debug("Starting workflow: " + this.selectedWorkflow); // prepare the parameters from the current state of the property sheet - Map params = WorkflowBean.prepareWorkItemParams(this.startTaskNode); + Map params = WorkflowBean.prepareTaskParams(this.startTaskNode); // create a workflow package for the attached items and add them if (this.packageItemsToAdd.size() > 0) @@ -472,7 +472,7 @@ public class StartWorkflowWizard extends BaseWizardBean } /** - * Returns a list of resources associated with this work item + * Returns a list of resources associated with this task * i.e. the children of the workflow package * * @return The list of nodes diff --git a/source/java/org/alfresco/web/bean/workflow/WorkflowBean.java b/source/java/org/alfresco/web/bean/workflow/WorkflowBean.java index 5368ca9be6..7decab43ee 100644 --- a/source/java/org/alfresco/web/bean/workflow/WorkflowBean.java +++ b/source/java/org/alfresco/web/bean/workflow/WorkflowBean.java @@ -39,8 +39,8 @@ public class WorkflowBean { protected NodeService nodeService; protected WorkflowService workflowService; - protected List workItems; - protected List completedWorkItems; + protected List tasks; + protected List completedTasks; private static final Log logger = LogFactory.getLog(WorkflowBean.class); @@ -48,12 +48,12 @@ public class WorkflowBean // Bean Getters and Setters /** - * Returns a list of nodes representing the to do work items the + * Returns a list of nodes representing the to do tasks the * current user has. * - * @return List of to do work items + * @return List of to do tasks */ - public List getWorkItemsToDo() + public List getTasksToDo() { // get the current username FacesContext context = FacesContext.getCurrentInstance(); @@ -71,14 +71,14 @@ public class WorkflowBean userName, WorkflowTaskState.IN_PROGRESS); // create a list of transient nodes to represent - this.workItems = new ArrayList(tasks.size()); + this.tasks = new ArrayList(tasks.size()); for (WorkflowTask task : tasks) { - Node node = createWorkItem(task); - this.workItems.add(node); + Node node = createTask(task); + this.tasks.add(node); if (logger.isDebugEnabled()) - logger.debug("Added to do work item: " + node); + logger.debug("Added to do task: " + node); } // commit the changes @@ -88,19 +88,19 @@ public class WorkflowBean { // rollback the transaction try { if (tx != null) {tx.rollback();} } catch (Exception ex) {} - Utils.addErrorMessage("Failed to get to do work items: " + e.toString(), e); + Utils.addErrorMessage("Failed to get to do tasks: " + e.toString(), e); } - return this.workItems; + return this.tasks; } /** - * Returns a list of nodes representing the completed work items the + * Returns a list of nodes representing the completed tasks the * current user has. * - * @return List of completed work items + * @return List of completed tasks */ - public List getWorkItemsCompleted() + public List getTasksCompleted() { // get the current username FacesContext context = FacesContext.getCurrentInstance(); @@ -118,14 +118,14 @@ public class WorkflowBean userName, WorkflowTaskState.COMPLETED); // create a list of transient nodes to represent - this.completedWorkItems = new ArrayList(tasks.size()); + this.completedTasks = new ArrayList(tasks.size()); for (WorkflowTask task : tasks) { - Node node = createWorkItem(task); - this.completedWorkItems.add(node); + Node node = createTask(task); + this.completedTasks.add(node); if (logger.isDebugEnabled()) - logger.debug("Added completed work item: " + node); + logger.debug("Added completed task: " + node); } // commit the changes @@ -135,10 +135,10 @@ public class WorkflowBean { // rollback the transaction try { if (tx != null) {tx.rollback();} } catch (Exception ex) {} - Utils.addErrorMessage("Failed to get completed work items: " + e.toString(), e); + Utils.addErrorMessage("Failed to get completed tasks: " + e.toString(), e); } - return this.completedWorkItems; + return this.completedTasks; } /** @@ -164,7 +164,7 @@ public class WorkflowBean // ------------------------------------------------------------------------------ // Helper methods - public static Map prepareWorkItemParams(Node node) + public static Map prepareTaskParams(Node node) { Map params = new HashMap(); @@ -211,7 +211,7 @@ public class WorkflowBean * * @param task The task to create a representation of */ - protected TransientMapNode createWorkItem(WorkflowTask task) + protected TransientMapNode createTask(WorkflowTask task) { // get the type of the task WorkflowTaskDefinition taskDef = task.definition; diff --git a/source/web/WEB-INF/faces-config-beans.xml b/source/web/WEB-INF/faces-config-beans.xml index cf5c8b273d..39e4318fdb 100644 --- a/source/web/WEB-INF/faces-config-beans.xml +++ b/source/web/WEB-INF/faces-config-beans.xml @@ -1704,10 +1704,10 @@ - The bean that backs up the Manage WorkItem Dialog + The bean that backs up the Manage Task Dialog - ManageWorkItemDialog - org.alfresco.web.bean.workflow.ManageWorkItemDialog + ManageTaskDialog + org.alfresco.web.bean.workflow.ManageTaskDialog session nodeService @@ -1824,10 +1824,10 @@ - The bean that backs up the Reassign Work Item Dialog + The bean that backs up the Reassign Task Dialog - ReassignWorkItemDialog - org.alfresco.web.bean.workflow.ReassignWorkItemDialog + ReassignTaskDialog + org.alfresco.web.bean.workflow.ReassignTaskDialog session nodeService diff --git a/source/web/images/icons/completed_workflow_item.gif b/source/web/images/icons/completed_workflow_task.gif similarity index 100% rename from source/web/images/icons/completed_workflow_item.gif rename to source/web/images/icons/completed_workflow_task.gif diff --git a/source/web/images/icons/completed_workflow_item_large.gif b/source/web/images/icons/completed_workflow_task_large.gif similarity index 100% rename from source/web/images/icons/completed_workflow_item_large.gif rename to source/web/images/icons/completed_workflow_task_large.gif diff --git a/source/web/images/icons/manage_workflow_item_large.gif b/source/web/images/icons/manage_workflow_task_large.gif similarity index 100% rename from source/web/images/icons/manage_workflow_item_large.gif rename to source/web/images/icons/manage_workflow_task_large.gif diff --git a/source/web/images/icons/reassign_workflow_item.gif b/source/web/images/icons/reassign_task.gif similarity index 100% rename from source/web/images/icons/reassign_workflow_item.gif rename to source/web/images/icons/reassign_task.gif diff --git a/source/web/images/icons/reassign_workflow_item_large.gif b/source/web/images/icons/reassign_workflow_task_large.gif similarity index 100% rename from source/web/images/icons/reassign_workflow_item_large.gif rename to source/web/images/icons/reassign_workflow_task_large.gif diff --git a/source/web/images/icons/workflow_item.gif b/source/web/images/icons/workflow_task.gif similarity index 100% rename from source/web/images/icons/workflow_item.gif rename to source/web/images/icons/workflow_task.gif diff --git a/source/web/images/icons/workflow_item_large.gif b/source/web/images/icons/workflow_task_large.gif similarity index 100% rename from source/web/images/icons/workflow_item_large.gif rename to source/web/images/icons/workflow_task_large.gif diff --git a/source/web/jsp/workflow/manage-workitem-dialog.jsp b/source/web/jsp/workflow/manage-task-dialog.jsp similarity index 93% rename from source/web/jsp/workflow/manage-workitem-dialog.jsp rename to source/web/jsp/workflow/manage-task-dialog.jsp index fbf686c496..7fb6d21753 100644 --- a/source/web/jsp/workflow/manage-workitem-dialog.jsp +++ b/source/web/jsp/workflow/manage-task-dialog.jsp @@ -19,11 +19,11 @@ <%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %> <%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %> - - + @@ -108,7 +108,7 @@ - + diff --git a/source/web/jsp/workflow/reassign-workitem-dialog.jsp b/source/web/jsp/workflow/reassign-task-dialog.jsp similarity index 100% rename from source/web/jsp/workflow/reassign-workitem-dialog.jsp rename to source/web/jsp/workflow/reassign-task-dialog.jsp diff --git a/source/web/jsp/workflow/workitems-completed-dashlet.jsp b/source/web/jsp/workflow/tasks-completed-dashlet.jsp similarity index 89% rename from source/web/jsp/workflow/workitems-completed-dashlet.jsp rename to source/web/jsp/workflow/tasks-completed-dashlet.jsp index 567084b4c4..e635ed910c 100644 --- a/source/web/jsp/workflow/workitems-completed-dashlet.jsp +++ b/source/web/jsp/workflow/tasks-completed-dashlet.jsp @@ -3,7 +3,7 @@ <%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %> <%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %> - @@ -14,7 +14,7 @@ - + @@ -63,6 +63,4 @@ - - - \ No newline at end of file + \ No newline at end of file diff --git a/source/web/jsp/workflow/workitems-todo-dashlet.jsp b/source/web/jsp/workflow/tasks-todo-dashlet.jsp similarity index 90% rename from source/web/jsp/workflow/workitems-todo-dashlet.jsp rename to source/web/jsp/workflow/tasks-todo-dashlet.jsp index a98a7559e5..6683debdf9 100644 --- a/source/web/jsp/workflow/workitems-todo-dashlet.jsp +++ b/source/web/jsp/workflow/tasks-todo-dashlet.jsp @@ -3,7 +3,7 @@ <%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %> <%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %> - @@ -15,14 +15,14 @@ - + + action="dialog:manageTask"> @@ -79,6 +79,4 @@ - - - \ No newline at end of file + \ No newline at end of file