mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Changing workflow REST API URLs to be plural for consistency with other services and also some minor formatting of FTL
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@21127 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -4,14 +4,7 @@
|
||||
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.
|
||||
</description>
|
||||
<url>/api/task-instance</url>
|
||||
<url>/api/task-instance?authority={authority?}</url>
|
||||
<url>/api/task-instance?state={state?}</url>
|
||||
<url>/api/task-instance?properties={properties?}</url>
|
||||
<url>/api/task-instance?authority={authority?}&?state={state?}</url>
|
||||
<url>/api/task-instance?authority={authority?}&?properties={properties?}</url>
|
||||
<url>/api/task-instance?state={state?}&?properties={properties?}</url>
|
||||
<url>/api/task-instance?authority={authority?}&?state={state?}&?properties={properties?}</url>
|
||||
<url>/api/task-instances?authority={authority?}&state={state?}&properties={properties?}</url>
|
||||
<format default="json"/>
|
||||
<authentication>user</authentication>
|
||||
<transaction allow="readonly">required</transaction>
|
||||
|
@@ -2,7 +2,8 @@
|
||||
|
||||
<#import "task.lib.ftl" as taskLib />
|
||||
{
|
||||
"data": [
|
||||
"data":
|
||||
[
|
||||
<#list taskInstances as task>
|
||||
<@taskLib.taskJSON task=task />
|
||||
<#if task_has_next>,</#if>
|
||||
|
@@ -51,5 +51,3 @@
|
||||
</#list>
|
||||
}
|
||||
</#macro>
|
||||
|
||||
|
@@ -232,12 +232,12 @@ public class WorkflowModelBuilder
|
||||
|
||||
private String getUrl(WorkflowTask task)
|
||||
{
|
||||
return "api/task-instance/" + task.id;
|
||||
return "api/task-instances/" + task.id;
|
||||
}
|
||||
|
||||
private String getUrl(WorkflowDefinition workflowDefinition)
|
||||
{
|
||||
return "api/workflow-definition/" + workflowDefinition.id;
|
||||
return "api/workflow-definitions/" + workflowDefinition.id;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -92,7 +92,7 @@ public class WorkflowModelBuilderTest extends TestCase
|
||||
Object id = model.get(WorkflowModelBuilder.TASK_ID);
|
||||
assertEquals(task.id, id);
|
||||
Object url = model.get(WorkflowModelBuilder.TASK_URL);
|
||||
assertEquals("api/task-instance/"+task.id, url);
|
||||
assertEquals("api/task-instances/"+task.id, url);
|
||||
assertEquals(task.name, model.get(WorkflowModelBuilder.TASK_NAME));
|
||||
assertEquals(task.title, model.get(WorkflowModelBuilder.TASK_TITLE));
|
||||
assertEquals(task.description, model.get(WorkflowModelBuilder.TASK_DESCRIPTION));
|
||||
@@ -143,7 +143,7 @@ public class WorkflowModelBuilderTest extends TestCase
|
||||
|
||||
Map<String, Object> model = builder.buildSimple(workflowDefinition);
|
||||
assertEquals(workflowDefinition.id, model.get(WorkflowModelBuilder.WORKFLOW_DEFINITION_ID));
|
||||
assertEquals("api/workflow-definition/" + workflowDefinition.id, model.get(WorkflowModelBuilder.WORKFLOW_DEFINITION_URL));
|
||||
assertEquals("api/workflow-definitions/" + workflowDefinition.id, model.get(WorkflowModelBuilder.WORKFLOW_DEFINITION_URL));
|
||||
assertEquals(workflowDefinition.name, model.get(WorkflowModelBuilder.WORKFLOW_DEFINITION_NAME));
|
||||
assertEquals(workflowDefinition.title, model.get(WorkflowModelBuilder.WORKFLOW_DEFINITION_TITLE));
|
||||
assertEquals(workflowDefinition.description, model.get(WorkflowModelBuilder.WORKFLOW_DEFINITION_DESCRIPTION));
|
||||
|
Reference in New Issue
Block a user