diff --git a/config/alfresco/templates/webscripts/org/alfresco/repository/workflow/task-instances.get.desc.xml b/config/alfresco/templates/webscripts/org/alfresco/repository/workflow/task-instances.get.desc.xml
new file mode 100644
index 0000000000..08769cad29
--- /dev/null
+++ b/config/alfresco/templates/webscripts/org/alfresco/repository/workflow/task-instances.get.desc.xml
@@ -0,0 +1,18 @@
+
+ List Workflow Tasks
+
+ Lists all Workflow Task Instances associated with an authority and of a given State.
+ The list of returned tasks also includes pooled tasks which the specified authority is eligible to claim.
+
+ /api/task-instance
+ /api/task-instance?autority={authority?}
+ /api/task-instance?state={state?}
+ /api/task-instance?properties={properties?}
+ /api/task-instance?autority={authority?}&?state={state?}
+ /api/task-instance?authority={authority?}&?properties={properties?}
+ /api/task-instance?state={state?}&?properties={properties?}
+ /api/task-instance?authority={authority?}&?state={state?}&?properties={properties?}
+
+ user
+ required
+
\ No newline at end of file
diff --git a/config/alfresco/templates/webscripts/org/alfresco/repository/workflow/task-instances.get.json.ftl b/config/alfresco/templates/webscripts/org/alfresco/repository/workflow/task-instances.get.json.ftl
new file mode 100644
index 0000000000..d6eb9daa20
--- /dev/null
+++ b/config/alfresco/templates/webscripts/org/alfresco/repository/workflow/task-instances.get.json.ftl
@@ -0,0 +1,11 @@
+<#-- List Workflow Task Instances -->
+
+<#import "task.lib.ftl" as taskLib />
+{
+ "data": [
+ <#list taskInstances as task>
+ <@taskLib.taskJSON task=task />
+ <#if task_has_next>,#if>
+ #list>
+ ]
+}
\ No newline at end of file
diff --git a/config/alfresco/templates/webscripts/org/alfresco/repository/workflow/task.lib.ftl b/config/alfresco/templates/webscripts/org/alfresco/repository/workflow/task.lib.ftl
new file mode 100644
index 0000000000..d692c6a229
--- /dev/null
+++ b/config/alfresco/templates/webscripts/org/alfresco/repository/workflow/task.lib.ftl
@@ -0,0 +1,50 @@
+<#-- Renders a task instance. -->
+<#macro taskJSON task >
+ {
+ "url": "${task.url}",
+ "name": "${task.name}",
+ "title": "${task.title}",
+ "description": "${task.description}",
+ "state": "${task.state}",
+ "typeDefinitionTitle": "${task.typeDefinitionTitle}",
+ "isPooled": ${task.isPooled?string},
+ <#if task.owner??>
+ "owner":
+ {
+ "userName": "${task.owner.userName}",
+ "firstName": "${task.owner.firstName}",
+ "lastName": "${task.owner.lastName}"
+ },
+ #if>
+ "properties":
+ <@propertiesJSON properties=task.properties />
+ }
+#macro>
+
+<#-- Renders a map of properties -->
+<#macro propertiesJSON properties>
+ {
+ <#list properties?keys as key>
+ <#if properties[key]??>
+ <#assign val=properties[key]>
+ "${key}" :
+ <#if val?is_boolean == true>
+ ${val?string}
+ <#elseif val?is_number == true>
+ ${val?c}
+ <#elseif val?is_sequence>
+ [
+ <#list val as element>
+ "${jsonUtils.encodeJSONString(element?string)}"<#if (element_has_next)>,#if>
+ #list>
+ ]
+ <#else>
+ "${jsonUtils.encodeJSONString(shortQName(val?string))}"
+ #if>
+ <#if (key_has_next)>,#if>
+ #if>
+ #list>
+ }
+#macro>
+
+
\ No newline at end of file
diff --git a/config/alfresco/web-scripts-application-context.xml b/config/alfresco/web-scripts-application-context.xml
index 0f18bbd28e..1c7c3e88e4 100644
--- a/config/alfresco/web-scripts-application-context.xml
+++ b/config/alfresco/web-scripts-application-context.xml
@@ -731,7 +731,28 @@
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/source/java/org/alfresco/repo/web/scripts/workflow/AbstractWorkflowWebscript.java b/source/java/org/alfresco/repo/web/scripts/workflow/AbstractWorkflowWebscript.java
new file mode 100644
index 0000000000..1be1b37676
--- /dev/null
+++ b/source/java/org/alfresco/repo/web/scripts/workflow/AbstractWorkflowWebscript.java
@@ -0,0 +1,83 @@
+/*
+ * Copyright (C) 2005-2010 Alfresco Software Limited.
+ *
+ * This file is part of Alfresco
+ *
+ * Alfresco is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Alfresco is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Alfresco. If not, see .
+ */
+package org.alfresco.repo.web.scripts.workflow;
+
+import java.util.Map;
+
+import org.alfresco.service.cmr.repository.NodeService;
+import org.alfresco.service.cmr.security.PersonService;
+import org.alfresco.service.cmr.workflow.WorkflowService;
+import org.alfresco.service.namespace.NamespaceService;
+import org.springframework.extensions.webscripts.Cache;
+import org.springframework.extensions.webscripts.DeclarativeWebScript;
+import org.springframework.extensions.webscripts.Status;
+import org.springframework.extensions.webscripts.WebScriptRequest;
+
+/**
+ * @author Nick Smith
+ *
+ */
+public abstract class AbstractWorkflowWebscript extends DeclarativeWebScript
+{
+
+ private NamespaceService namespaceService;
+ private NodeService nodeService;
+ private PersonService personService;
+ protected WorkflowService workflowService;
+
+ @Override
+ protected Map executeImpl(WebScriptRequest req, Status status, Cache cache)
+ {
+ WorkflowModelBuilder modelBuilder = new WorkflowModelBuilder(namespaceService, nodeService, personService);
+ return buildModel(modelBuilder, req, status, cache);
+ }
+
+ public void setNamespaceService(NamespaceService namespaceService)
+ {
+ this.namespaceService = namespaceService;
+ }
+
+ public void setNodeService(NodeService nodeService)
+ {
+ this.nodeService = nodeService;
+ }
+
+ public void setPersonService(PersonService personService)
+ {
+ this.personService = personService;
+ }
+
+ public void setWorkflowService(WorkflowService workflowService)
+ {
+ this.workflowService = workflowService;
+ }
+
+ /**
+ * This method uses a {@link WorkflowModelBuilder} to build up the model to return.
+ * @param modelBuilder A {@link WorkflowModelBuilder}.
+ * @param req the {@link WebScriptRequest}
+ * @param status the {@link Status}
+ * @param cache the {@link Cache}
+ * @return the data model.
+ */
+ protected abstract Map buildModel(
+ WorkflowModelBuilder modelBuilder,
+ WebScriptRequest req,
+ Status status, Cache cache);
+}
diff --git a/source/java/org/alfresco/repo/web/scripts/workflow/TaskInstancesGet.java b/source/java/org/alfresco/repo/web/scripts/workflow/TaskInstancesGet.java
new file mode 100644
index 0000000000..8eef0f8f6e
--- /dev/null
+++ b/source/java/org/alfresco/repo/web/scripts/workflow/TaskInstancesGet.java
@@ -0,0 +1,123 @@
+/*
+ * Copyright (C) 2005-2010 Alfresco Software Limited.
+ *
+ * This file is part of Alfresco
+ *
+ * Alfresco is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Alfresco is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Alfresco. If not, see .
+ */
+package org.alfresco.repo.web.scripts.workflow;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletResponse;
+
+import org.alfresco.repo.security.authentication.AuthenticationUtil;
+import org.alfresco.service.cmr.workflow.WorkflowTask;
+import org.alfresco.service.cmr.workflow.WorkflowTaskState;
+import org.springframework.extensions.webscripts.Cache;
+import org.springframework.extensions.webscripts.Status;
+import org.springframework.extensions.webscripts.WebScriptException;
+import org.springframework.extensions.webscripts.WebScriptRequest;
+
+/**
+ * @author Nick Smith
+ *
+ */
+public class TaskInstancesGet extends AbstractWorkflowWebscript
+{
+ public static final String PARAM_AUTHORITY = "authority";
+ public static final String PARAM_STATUS= "status";
+ public static final String PARAM_PROPERTIES= "properties";
+
+ @Override
+ protected Map buildModel(WorkflowModelBuilder modelBuilder, WebScriptRequest req, Status status,
+ Cache cache)
+ {
+ String authority = getAuthority(req);
+ WorkflowTaskState state = getState(req);
+ List properties = getProperties(req);
+
+ //TODO Handle possible thrown exceptions here?
+ List tasks = workflowService.getAssignedTasks(authority, state);
+ List pooledTasks= workflowService.getPooledTasks(authority);
+ ArrayList allTasks = new ArrayList(tasks.size() + pooledTasks.size());
+ allTasks.addAll(tasks);
+ allTasks.addAll(pooledTasks);
+
+ ArrayList