atg.epub.pws.taglib
Class GetTasksTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by atg.web.tagsupport.PageVariableTagSupport
          extended by atg.web.tagsupport.CountTagSupport
              extended by atg.epub.pws.taglib.PWSResourceFileTagSupport
                  extended by atg.epub.pws.taglib.GetTasksTag
All Implemented Interfaces:
java.io.Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

public class GetTasksTag
extends atg.epub.pws.taglib.PWSResourceFileTagSupport

Tag for obtaining a list of tasks from the workflow engine. By supplying the processId, it will return only tasks for that process' workflow instance. If null, will return active tasks for the entire system. By supplying the userOnly property, it will return tasks for the current user only. When processId and userOnly are supplied, will return current user's tasks for given process' workflow. If unowned is true, then it will filter the results to include only those active tasks which are unowned. It will include the user's and unowned tasks if userOnly and unowned are both true. Everything above assumes active is true (default). If active is false, then processId is required and userOnly and unowned are ignored. This will return all the tasks for the given process.

See Also:
TaskInfo, Serialized Form

Nested Class Summary
 class GetTasksTag.Results
          Results class for returning output for this tag
static class GetTasksTag.TEI
          TagExtraInfo class to handle var/id processing.
 
Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Fields inherited from class atg.web.tagsupport.CountTagSupport
mCount, mIndex, mTotalCountVar
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
GetTasksTag()
          Empty Constructor
 
Method Summary
 int doStartTag()
          Sets the page variable defined in the id/var property to a collection of TaskInfo objects.
 boolean getActive()
           
 java.lang.String getProcessId()
           
 java.lang.String getTaskElementId()
           
 boolean getUnowned()
           
 boolean getUserOnly()
           
 java.lang.String getWorkflowId()
           
 void release()
           
 void setActive(boolean pActive)
          Sets a flag indicating whether or not to return active tasks, default is true.
 void setProcessId(java.lang.String string)
          Sets the processId to get the tasks for
 void setTaskElementId(java.lang.String string)
          Sets the task element ID to get a specific taskInfo
 void setUnowned(boolean pUnowned)
          Sets a flag indicating whether or not to return unowned tasks.
 void setUserOnly(boolean pUserOnly)
          Sets the userOnly flag which indicates that only the tasks for the current user should be returned
 void setWorkflowId(java.lang.String string)
          Sets the workflow ID to get tasks for a specific workflow in the process
 
Methods inherited from class atg.epub.pws.taglib.PWSResourceFileTagSupport
getResource, getResource
 
Methods inherited from class atg.web.tagsupport.CountTagSupport
getCount, getCountAsInt, getIndex, getIndexAsInt, getTotalCountVar, setCount, setIndex, setTotalCount, setTotalCount, setTotalCountVar
 
Methods inherited from class atg.web.tagsupport.PageVariableTagSupport
getDynamoRequest, getId, getVar, isBlank, setId, setPageVariable, setScope, setVar
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, doEndTag, findAncestorWithClass, getParent, getValue, getValues, removeValue, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string

Constructor Detail

GetTasksTag

public GetTasksTag()
Empty Constructor

Method Detail

setUserOnly

public void setUserOnly(boolean pUserOnly)
Sets the userOnly flag which indicates that only the tasks for the current user should be returned

Parameters:
pUserOnly - true to return only the tasks for the current user, false to return all tasks

getUserOnly

public boolean getUserOnly()
Returns:
the flag indicating whether or not to return tasks only for the current user

setUnowned

public void setUnowned(boolean pUnowned)
Sets a flag indicating whether or not to return unowned tasks. Can be used with the userOnly flag

Parameters:
pUnowned - flag indicating whether or not to return unowned tasks

getUnowned

public boolean getUnowned()
Returns:
a flag indicating whether or not to return unowned tasks

setActive

public void setActive(boolean pActive)
Sets a flag indicating whether or not to return active tasks, default is true. If set to false, projectId must be supplied and userOnly and unowned flags are ignored. Will return all tasks for given project if false.

Parameters:
pActive - a flag indicating whether or not to return active tasks

getActive

public boolean getActive()
Returns:
a flag indicating whether or not to return active tasks

setProcessId

public void setProcessId(java.lang.String string)
Sets the processId to get the tasks for

Parameters:
string - the processId to get the tasks for

getProcessId

public java.lang.String getProcessId()
Returns:
the processId to get the tasks from

setWorkflowId

public void setWorkflowId(java.lang.String string)
Sets the workflow ID to get tasks for a specific workflow in the process

Parameters:
string - the workflow Id

getWorkflowId

public java.lang.String getWorkflowId()
Returns:
the workflow Id

setTaskElementId

public void setTaskElementId(java.lang.String string)
Sets the task element ID to get a specific taskInfo

Parameters:
string - the task element Id

getTaskElementId

public java.lang.String getTaskElementId()
Returns:
the task element Id

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException
Sets the page variable defined in the id/var property to a collection of TaskInfo objects.

Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doStartTag in class javax.servlet.jsp.tagext.TagSupport
Throws:
javax.servlet.jsp.JspException - if a workflow error occurs or if active is true and projectId is null
See Also:
TaskInfo

release

public void release()
Specified by:
release in interface javax.servlet.jsp.tagext.Tag
Overrides:
release in class atg.web.tagsupport.CountTagSupport
See Also:
Tag.release()