mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
- Added workflow history to completed task dialog (allows user to see what happened through completed workflows)
- Fixed errors emitted from completed WCM workflows - Toned down the appearance of workflow selection in the submit dialog git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5774 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -400,12 +400,14 @@ public class UISelectList extends UIInput implements NamingContainer
|
||||
Utils.outputAttribute(out, getAttributes().get("itemStyleClass"), "class");
|
||||
out.write("><div style='padding:2px'>");
|
||||
out.write(item.getLabel());
|
||||
out.write("</div><div style='padding:2px'>");
|
||||
out.write("</div>");
|
||||
if (description != null)
|
||||
{
|
||||
out.write("<div style='padding:2px'>");
|
||||
out.write(description);
|
||||
out.write("</div>");
|
||||
}
|
||||
out.write("</div></td>");
|
||||
out.write("</td>");
|
||||
|
||||
if (activeSelect)
|
||||
{
|
||||
|
@@ -55,6 +55,7 @@ import org.apache.commons.logging.LogFactory;
|
||||
public class UIWorkflowHistory extends SelfRenderingComponent
|
||||
{
|
||||
protected WorkflowInstance value = null;
|
||||
protected Boolean completedMode = null;
|
||||
|
||||
private static final Log logger = LogFactory.getLog(UIWorkflowHistory.class);
|
||||
|
||||
@@ -84,15 +85,17 @@ public class UIWorkflowHistory extends SelfRenderingComponent
|
||||
// standard component attributes are restored by the super class
|
||||
super.restoreState(context, values[0]);
|
||||
this.value = (WorkflowInstance)values[1];
|
||||
this.completedMode = (Boolean)values[2];
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object saveState(FacesContext context)
|
||||
{
|
||||
Object values[] = new Object[8];
|
||||
Object values[] = new Object[3];
|
||||
// standard component attributes are saved by the super class
|
||||
values[0] = super.saveState(context);
|
||||
values[1] = this.value;
|
||||
values[2] = this.completedMode;
|
||||
return values;
|
||||
}
|
||||
|
||||
@@ -113,6 +116,7 @@ public class UIWorkflowHistory extends SelfRenderingComponent
|
||||
logger.debug("Retrieving workflow history for workflow instance: " + wi);
|
||||
|
||||
WorkflowTaskQuery query = new WorkflowTaskQuery();
|
||||
query.setActive(!getCompletedMode());
|
||||
query.setProcessId(wi.id);
|
||||
query.setTaskState(WorkflowTaskState.COMPLETED);
|
||||
query.setOrderBy(new WorkflowTaskQuery.OrderBy[] {
|
||||
@@ -253,4 +257,34 @@ public class UIWorkflowHistory extends SelfRenderingComponent
|
||||
{
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Returns whether the history is for a completed workflow instance
|
||||
*/
|
||||
public boolean getCompletedMode()
|
||||
{
|
||||
if (this.completedMode == null)
|
||||
{
|
||||
ValueBinding vb = getValueBinding("completedMode");
|
||||
if (vb != null)
|
||||
{
|
||||
this.completedMode = (Boolean)vb.getValue(getFacesContext());
|
||||
}
|
||||
}
|
||||
|
||||
if (this.completedMode == null)
|
||||
{
|
||||
this.completedMode = Boolean.FALSE;
|
||||
}
|
||||
|
||||
return this.completedMode;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param completedMode Sets whether the history is for a completed workflow instance
|
||||
*/
|
||||
public void setCompletedMode(boolean completedMode)
|
||||
{
|
||||
this.completedMode = Boolean.valueOf(completedMode);
|
||||
}
|
||||
}
|
||||
|
@@ -35,6 +35,9 @@ import org.alfresco.web.ui.common.tag.HtmlComponentTag;
|
||||
*/
|
||||
public class WorkflowHistoryTag extends HtmlComponentTag
|
||||
{
|
||||
private String value;
|
||||
private String completedMode;
|
||||
|
||||
/**
|
||||
* @see javax.faces.webapp.UIComponentTag#getComponentType()
|
||||
*/
|
||||
@@ -59,6 +62,7 @@ public class WorkflowHistoryTag extends HtmlComponentTag
|
||||
super.setProperties(component);
|
||||
|
||||
setStringProperty(component, "value", this.value);
|
||||
setBooleanProperty(component, "completedMode", this.completedMode);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -68,6 +72,7 @@ public class WorkflowHistoryTag extends HtmlComponentTag
|
||||
{
|
||||
super.release();
|
||||
this.value = null;
|
||||
this.completedMode = null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -80,6 +85,13 @@ public class WorkflowHistoryTag extends HtmlComponentTag
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
/** the value (binding to the workflow instance) */
|
||||
private String value;
|
||||
/**
|
||||
* Sets whether the component is showing history for a completed workflow
|
||||
*
|
||||
* @param completedMode
|
||||
*/
|
||||
public void setCompletedMode(String completedMode)
|
||||
{
|
||||
this.completedMode = completedMode;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user