Merged DEV to HEAD (4.3/Cloud)

66480: ACE-1154: Outcome of the Review and Approve task is not displayed in the "My Completed Task" component.
      Oracle specific issue: Set default value for outcome label.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@66488 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Andrey Che
2014-04-03 06:14:54 +00:00
2 changed files with 18 additions and 8 deletions

View File

@@ -22,6 +22,7 @@ import org.springframework.extensions.surf.util.I18NUtil;
public class WorkflowTaskNode extends TransientMapNode {
private static final long serialVersionUID = 1L;
private static final String DEFAULT_TRANSITION_TITLE = "bpm_businessprocessmodel.transition.title";
private Map<String, Object> propertyWrapper;
private WorkflowTask workflowTask;
@@ -35,7 +36,7 @@ public class WorkflowTaskNode extends TransientMapNode {
propertyWrapper.put(ContentModel.PROP_NAME.toString(), workflowTask.getTitle());
propertyWrapper.put("type", type.toString());
propertyWrapper.put("id", workflowTask.getId());
// add extra properties for completed tasks
if (workflowTask.getState().equals(WorkflowTaskState.COMPLETED))
{
@@ -52,20 +53,22 @@ public class WorkflowTaskNode extends TransientMapNode {
break;
}
}
if(outcome == null)
{
outcome = transition;
}
if (outcome != null)
{
propertyWrapper.put("outcome", outcome);
}
}
if (outcome == null)
{
outcome = I18NUtil.getMessage(DEFAULT_TRANSITION_TITLE);
}
propertyWrapper.put("outcome", outcome);
// add the workflow instance id and name this taks belongs to
propertyWrapper.put("workflowInstanceId", workflowTask.getPath().getInstance().getId());
// add the task itself as a property
propertyWrapper.put("workflowTask", workflowTask);
}

View File

@@ -38,6 +38,7 @@ import org.alfresco.service.cmr.workflow.WorkflowTransition;
import org.alfresco.web.app.Application;
import org.alfresco.web.bean.repository.Repository;
import org.alfresco.web.ui.common.Utils;
import org.springframework.extensions.surf.util.I18NUtil;
import org.springframework.extensions.webscripts.ui.common.component.SelfRenderingComponent;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -53,6 +54,7 @@ public class UIWorkflowHistory extends SelfRenderingComponent
private static final Log logger = LogFactory.getLog(UIWorkflowHistory.class);
private static final String DEFAULT_TRANSITION_TITLE = "bpm_businessprocessmodel.transition.title";
private static final String MSG_DESCRIPTION = "description";
private static final String MSG_TASK = "task_type";
private static final String MSG_ID = "id";
@@ -200,6 +202,11 @@ public class UIWorkflowHistory extends SelfRenderingComponent
// in this case default to the transition, if there is one.
outcome = transition;
}
//ACE-1154
if (outcome.equals(""))
{
outcome = I18NUtil.getMessage(DEFAULT_TRANSITION_TITLE);
}
out.write("<tr><td>");
out.write(desc == null ? "" : Utils.encode(desc));