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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user