mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Fixed failing test testWorkflowDefinitionsGet for both Activiti and Jbpm Workflow Rest API Test.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@26258 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -703,6 +703,7 @@ public abstract class AbstractWorkflowRestApiTest extends BaseWebScriptTest
|
||||
|
||||
boolean adhocWorkflowPresent = false;
|
||||
|
||||
String adhocDefName = getAdhocWorkflowDefinitionName();
|
||||
for (int i = 0; i < results.length(); i++)
|
||||
{
|
||||
JSONObject workflowDefinitionJSON = results.getJSONObject(i);
|
||||
@@ -725,8 +726,8 @@ public abstract class AbstractWorkflowRestApiTest extends BaseWebScriptTest
|
||||
assertTrue(workflowDefinitionJSON.has("description"));
|
||||
String description = workflowDefinitionJSON.getString("description");
|
||||
assertTrue(description.length() > 0);
|
||||
|
||||
if(getAdhocWorkflowDefinitionName().equals(workflowDefinitionJSON.getString("name")))
|
||||
|
||||
if(adhocDefName.equals(workflowDefinitionJSON.getString("name")))
|
||||
{
|
||||
assertEquals(getAdhocWorkflowDefinitionTitle(), title);
|
||||
assertEquals(getAdhocWorkflowDefinitionDescription(), description);
|
||||
@@ -737,7 +738,7 @@ public abstract class AbstractWorkflowRestApiTest extends BaseWebScriptTest
|
||||
assertTrue("Adhoc workflow definition was not present!", adhocWorkflowPresent);
|
||||
|
||||
// filter the workflow definitions and check they are not returned
|
||||
String exclude = getAdhocWorkflowDefinitionName();
|
||||
String exclude = adhocDefName;
|
||||
response = sendRequest(new GetRequest(URL_WORKFLOW_DEFINITIONS + "?exclude=" + exclude), 200);
|
||||
assertEquals(Status.STATUS_OK, response.getStatus());
|
||||
json = new JSONObject(response.getContentAsString());
|
||||
@@ -760,7 +761,7 @@ public abstract class AbstractWorkflowRestApiTest extends BaseWebScriptTest
|
||||
assertFalse("Found adhoc workflow when it was supposed to be excluded", adhocWorkflowPresent);
|
||||
|
||||
// filter with a wildcard and ensure they all get filtered out
|
||||
exclude = getAdhocWorkflowDefinitionName() + ", jbpm$wcmwf:*";
|
||||
exclude = adhocDefName + ", jbpm$wcmwf:*";
|
||||
response = sendRequest(new GetRequest(URL_WORKFLOW_DEFINITIONS + "?exclude=" + exclude), 200);
|
||||
assertEquals(Status.STATUS_OK, response.getStatus());
|
||||
json = new JSONObject(response.getContentAsString());
|
||||
@@ -774,7 +775,7 @@ public abstract class AbstractWorkflowRestApiTest extends BaseWebScriptTest
|
||||
JSONObject workflowDefinitionJSON = results.getJSONObject(i);
|
||||
|
||||
String name = workflowDefinitionJSON.getString("name");
|
||||
if (name.equals(getAdhocWorkflowDefinitionName()))
|
||||
if (name.equals(adhocDefName))
|
||||
{
|
||||
adhocWorkflowPresent = true;
|
||||
}
|
||||
|
@@ -29,7 +29,7 @@ public class ActivitiWorkflowRestApiTest extends AbstractWorkflowRestApiTest
|
||||
|
||||
private static final String ADHOC_WORKFLOW_DEFINITION_NAME = "activiti$activitiAdhoc";
|
||||
private static final String ADHOC_WORKFLOW_DEFINITION_TITLE = "Adhoc Workflow (Activiti)";
|
||||
private static final String ADHOC_WORKFLOW_DEFINITION_DESCRIPTION = "Assign arbitrary task to colleague using Activiti workflow engine.";
|
||||
private static final String ADHOC_WORKFLOW_DEFINITION_DESCRIPTION = "Assign arbitrary task to colleague using Activiti workflow engine";
|
||||
private static final String REVIEW_WORKFLOW_DEFINITION_NAME = "activiti$activitiReview";
|
||||
private static final String REVIEW_POOLED_WORKFLOW_DEFINITION_NAME = "activiti$activitiReviewPooled";
|
||||
|
||||
|
@@ -28,7 +28,7 @@ public class JBPMWorkflowRestApiTest extends AbstractWorkflowRestApiTest
|
||||
{
|
||||
private static final String ADHOC_WORKFLOW_DEFINITION_NAME = "jbpm$wf:adhoc";
|
||||
private static final String ADHOC_WORKFLOW_DEFINITION_TITLE = "Adhoc Workflow (JBPM)";
|
||||
private static final String ADHOC_WORKFLOW_DEFINITION_DESCRIPTION = "Assign arbitrary task to colleague using JBPM workflow engine.";
|
||||
private static final String ADHOC_WORKFLOW_DEFINITION_DESCRIPTION = "Assign arbitrary task to colleague using JBPM workflow engine";
|
||||
private static final String REVIEW_WORKFLOW_DEFINITION_NAME = "jbpm$wf:review";
|
||||
private static final String REVIEW_POOLED_WORKFLOW_DEFINITION_NAME = "jbpm$wf:reviewpooled";
|
||||
|
||||
|
Reference in New Issue
Block a user