Merged HEAD-BUG-FIX (5.0/Cloud) to HEAD (4.3/Cloud)

74247: Merged V4.2-BUG-FIX (4.2.3) to HEAD-BUG-FIX (5.0/Cloud)
      73960: Merged DEV to V4.2-BUG-FIX (4.2.3)
         73719: MNT-11586 : bpm:outcome property is not set when completing a task via the workflow public API
         Added "bpm_outcome" variable to completed and resolved tasks.
         Added checks to tests.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@74881 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Will Abson
2014-06-25 16:32:28 +00:00
parent 3e30eaba81
commit 59a74742cc
2 changed files with 42 additions and 3 deletions

View File

@@ -792,7 +792,7 @@ public class TaskWorkflowApiTest extends EnterpriseWorkflowTestApi
assertEquals(1234, historyTask.getProcessVariables().get("newGlobalVariable"));
assertEquals(5678, historyTask.getTaskLocalVariables().get("newLocalVariable"));
assertNotNull("The outcome should not be null for completed task.", historyTask.getTaskLocalVariables().get("bpm_outcome"));
JSONObject variables = tasksClient.findTaskVariables(withVariablesTask.getId());
assertNotNull(variables);
JSONObject list = (JSONObject) variables.get("list");
@@ -988,6 +988,12 @@ public class TaskWorkflowApiTest extends EnterpriseWorkflowTestApi
task = activitiProcessEngine.getTaskService().createTaskQuery().processInstanceId(processInstance.getId()).singleResult();
assertEquals(DelegationState.RESOLVED, task.getDelegationState());
assertEquals(initiator, task.getAssignee());
HistoricTaskInstance historyTask = activitiProcessEngine.getHistoryService().createHistoricTaskInstanceQuery()
.taskId(task.getId())
.includeProcessVariables()
.includeTaskLocalVariables()
.singleResult();
assertNotNull("The outcome should not be null for resolved task.", historyTask.getTaskLocalVariables().get("bpm_outcome"));
// Resolving as owner
task.setDelegationState(null);