Added getTaskById(String taskId) to get a single workflow task (req'd by Office Add-In)

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5840 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Mike Hatfield
2007-06-04 13:07:11 +00:00
parent 527addc354
commit c2b6a11cd7

View File

@@ -118,6 +118,19 @@ public class Workflow extends BaseTemplateProcessorExtension
return convertTasks(tasks);
}
/**
* Return a single object representing a task of the given taskId for the current user
*
* @return WorkflowTaskItem bean object {@link WorkflowTaskItem}
*/
public WorkflowTaskItem getTaskById(String taskId)
{
// get the task corresponding to the given taskId
WorkflowTask task = getWorkflowService().getTaskById(taskId);
return new WorkflowTaskItem(this.services, getTemplateImageResolver(), task);
}
/**
* Convert a list of WorkflowTask items into bean objects accessable from templates
*