|
Oracle Fusion Middleware Java API Reference for Oracle BPM Suite 11g Release 1 (11.1.1.7.0) E25378-07 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ITaskQueryService
This class provides a programmatic means for retrieving tasks, task details, etc A typical usage would be as follows: 1. Use an authentication method to authenticate a user and obtain a context 2. Use the context and a task list method to retrieve tasks that match some filter criterion 3. Use the context and a task details method to drill down on a task in the list (retrieve task details and actions that can be performed on the task) 4. Use task service, to perform operations on the task A sample code fragment that shows the usage in the above pattern in shown below: import java.util.ArrayList; import java.util.Date; import java.util.List; import oracle.bpel.services.workflow.IWorkflowConstants; import oracle.bpel.services.workflow.client.IWorkflowServiceClient; import oracle.bpel.services.workflow.client.IWorkflowServiceClientConstants; import oracle.bpel.services.workflow.client.WorkflowServiceClientFactory; import oracle.bpel.services.workflow.query.ITaskQueryService; import oracle.bpel.services.workflow.repos.Ordering; import oracle.bpel.services.workflow.repos.Predicate; import oracle.bpel.services.workflow.repos.TableConstants; import oracle.bpel.services.workflow.task.ITaskService; import oracle.bpel.services.workflow.task.model.Task; import oracle.bpel.services.workflow.verification.IWorkflowContext; //User whose task list needs to be queried String userId = "jstein"; // Password for the user String password = "welcome1"; // You can use keyword to specify sql % around the keyword like: %keyword% on the following // attributes: task title, identification key, all textAttributes in task, task number (only // if the keyword is a number) String keyword = null; String nullParam = null; // Get workflow service client IWorkflowServiceClient wfSvcClient = WorkflowServiceClientFactory.getWorkflowServiceClient(WorkflowServiceClientFactory.SOAP_CLIENT); // Get the workflow context IWorkflowContext wfCtx = wfSvcClient.getTaskQueryService().authenticate(userId, password, oracle.tip.pc.services.identity.config.ISConfiguration.getDefaultRealmName(), null); // Admin can authenticate on behalf of another user //IWorkflowContext adminCtx = wfSvcClient.getTaskQueryService().authenticate(adminUserId, pwd, // oracle.tip.pc.services.identity.config.ISConfiguration.getDefaultRealmName(), // userId); ITaskQueryService querySvc = wfSvcClient.getTaskQueryService(); // Only for SOAP clients and it is mandatory for SOAP clients Predicate.enableXMLSerialization(true); // Build the predicate Predicate statePredicate = new Predicate(TableConstants.WFTASK_STATE_COLUMN, Predicate.OP_NEQ, IWorkflowConstants.TASK_STATE_ASSIGNED); statePredicate.addClause(Predicate.AND, TableConstants.WFTASK_NUMBERATTRIBUTE1_COLUMN, Predicate.OP_IS_NULL, nullParam); Predicate datePredicate = new Predicate(TableConstants.WFTASK_ENDDATE_COLUMN, Predicate.OP_ON, new Date()); Predicate predicate = new Predicate(statePredicate, Predicate.AND, datePredicate); // Create the ordering Ordering ordering = new Ordering(TableConstants.WFTASK_TITLE_COLUMN, true, true); ordering.addClause(TableConstants.WFTASK_PRIORITY_COLUMN, true, true); // List of display columns // For those columns that are not specified here, the queried Task object will not hold any value. // For example: If TITLE is not specified, task.getTitle() will return null // For the list of most comonly used columns, check the table below // Note: TASKID is fetched by default. So there is no need to explicitly specity it. List queryColumns = new ArrayList(); queryColumns.add("TASKNUMBER"); queryColumns.add("TITLE"); queryColumns.add("PRIORITY"); queryColumns.add("STATE"); queryColumns.add("ENDDATE"); queryColumns.add("NUMBERATTRIBUTE1"); queryColumns.add("TEXTATTRIBUTE1"); // List of optional info // Any optionalInfo specified can be fetched from the Task object // For example: if you have specified "CustomActions", you can retrieve // it using task.getSystemAttributes().getCustomActions(); // "Actions" (All Actions) - task.getSystemAttributes().getSystemActions() // "GroupActions" (Only group Actions: Actions that can be permoded by the user as a member of a group) // - task.getSystemAttributes().getSystemActions() // "ShortHistory" - task.getSystemAttributes().getShortHistory() List optionalInfo = new ArrayList(); optionalInfo.add("Actions"); //optionalInfo.add("GroupActions"); //optionalInfo.add("CustomActions"); //optionalInfo.add("ShortHistory"); // The following is reserved for future use. // If you need them, please use getTaskDetailsById (or) getTaskDetailsByNumber, // which will fetch all information related to a task, which includes these //optionalInfo.add("Attachments"); //optionalInfo.add("Comments"); //optionalInfo.add("Payload"); List tasksList = querySvc.queryTasks(wfCtx, queryColumns, optionalInfo, ITaskQueryService.ASSIGNMENT_FILTER_MY_AND_GROUP, keyword, predicate, ordering, 0,0); // No Paging // How to use paging: // 1. If you need to dynamically calculate paging size (or) to display/find // out the number of pages, the user has to scroll (Like page X of Y) // Call countTasks to find out the number of tasks it returns. Using this // calculate your paging size (The number of taks you want in a page) // Call queryTasks successively varing the startRow and endRow params. // For example: If the total number of tasks is 30 and your want a paging size // of 10, you can call with (startRow, endRow): (1, 10) (11, 20) (21, 30) // 2. If you have fixed paging size, just keep calling queryTasks successively with // the paging size (If your paging size is 10, you can call with (startRow, endRow): // (1, 10) (11, 20) (21, 30) (31, 40)..... until the number of tasks returned is // less than your paging size (or) there are no more tasks returned. // 3. If no paging is specified (startRow and endRow are both zero), then the // first 200 rows will be returned. If for some reason, you require more // than 200 rows, you should explicilty specify a larger paging size. if (tasksList != null) { // There are tasks System.out.println("Total number of tasks: " + tasksList.size()); System.out.println("Tasks List: "); Task task = null; for (int i = 0; i < tasksList.size(); i++) { task = (Task) tasksList.get(i); System.out.println("Task Number: " + task.getSystemAttributes().getTaskNumber()); System.out.println("Task Id: " + task.getSystemAttributes().getTaskId()); System.out.println("Title: " + task.getTitle()); System.out.println("Priority: " + task.getPriority()); System.out.println("State: " + task.getSystemAttributes().getState()); System.out.println(); // Retrive any Optional Info specified // Use task service, to perform operations on the task } } Beyond authentication, all methods require the worklist context as the first argument. The worklist context helps the worklist service determine the user requesting the action, whether the user has permission to perform the requested action on the task and so forth. The context also contains information about the user's locale and timezone information.Most commonly used columns
ITaskMetadataService.getTaskAttributes(oracle.bpel.services.workflow.verification.IWorkflowContext)
or
ITaskMetadataService.getTaskAttributesForTaskDefinition(oracle.bpel.services.workflow.verification.IWorkflowContext, java.lang.String)
.
Column | Description | Column Object | How to retrieve |
ACQUIREDBY | Acquired By | WFTASK_ACQUIREDBY_COLUMN | task.getSystemAttributes().getAcquiredBy() |
ASSIGNEES | Assignees | WFTASK_ASSIGNEES_COLUMN | task.getSystemAttributes().getAssignees() |
REVIEWERS | Reviewers | WFTASK_REVIEWERS_COLUMN | task.getSystemAttributes().getReviewers() |
ASSIGNEEGROUPS | Assignee Groups | WFTASK_ASSIGNEEGROUPS_COLUMN | task.getSystemAttributes().getAssigneeGroups() |
ASSIGNEEUSERS | Assignee Users | WFTASK_ASSIGNEEUSERS_COLUMN | task.getSystemAttributes().getAssigneeUsers() |
CREATOR | Creator | WFTASK_CREATOR_COLUMN | task.getCreator() |
DIGITALSIGNATUREREQUIRED | Digital Signature Required | WFTASK_DIGITALSIGNATUREREQUIRED_COLUMN | task.getSystemAttributes().isDigitalSignatureRequired() |
EXPIRATIONDATE | Expiration Date | WFTASK_EXPIRATIONDATE_COLUMN | task.getSystemAttributes().getExpirationDate() |
IDENTITYCONTEXT | Identity Context | WFTASK_IDENTITYCONTEXT_COLUMN | task.getIdentityContext() |
OWNERUSER | Owner User | WFTASK_OWNERUSER_COLUMN | task.getOwnerUser() |
OWNERGROUP | Owner Group | WFTASK_OWNERGROUP_COLUMN | task.getOwnerGroup() |
PASSWORDREQUIREDONUPDATE | Password Required On Update | WFTASK_PASSWORDREQUIREDONUPDATE_COLUMN | task.getSystemAttributes().isPasswordRequiredOnUpdate() |
PRIORITY | Priority | WFTASK_PRIORITY_COLUMN | task.getPriority() |
SECURENOTIFICATIONS | Secure Notifications | WFTASK_SECURENOTIFICATIONS_COLUMN | task.getSystemAttributes().isSecureNotifications() |
ASSIGNEDDATE | Assigned Date | WFTASK_ASSIGNEDDATE_COLUMN | task.getSystemAttributes().getAssignedDate() |
CREATEDDATE | Created Date | WFTASK_CREATEDDATE_COLUMN | task.getSystemAttributes().getCreatedDate() |
ENDDATE | End Date | WFTASK_ENDDATE_COLUMN | task.getSystemAttributes().getEndDate() |
FROMUSER | From User | WFTASK_FROMUSER_COLUMN | task.getSystemAttributes().getFromUser() |
HASSUBTASK | Has Subtask | WFTASK_HASSUBTASK_COLUMN | task.getSystemAttributes().isHasSubTasks() |
ISGROUP | Is Group | WFTASK_ISGROUP_COLUMN | task.getSystemAttributes().isIsGroup() |
ORIGINALASSIGNEEUSER | Original Assignee User | WFTASK_ORIGINALASSIGNEEUSER_COLUMN | task.getSystemAttributes().() |
OUTCOME | Outcome | WFTASK_OUTCOME_COLUMN | task.getSystemAttributes().getOriginalAssigneeUser() |
STATE | State | WFTASK_STATE_COLUMN | task.getSystemAttributes().getState() |
TASKID | Task Id | WFTASK_TASKID_COLUMN | task.getSystemAttributes().getTaskId() |
TASKNUMBER | Task Number | WFTASK_TASKNUMBER_COLUMN | task.getSystemAttributes().getTaskNumber() |
UPDATEDBY | Updated By | WFTASK_UPDATEDBY_COLUMN | task.getSystemAttributes().getUpdatedBy() |
UPDATEDDATE | Updated Date | WFTASK_UPDATEDDATE_COLUMN | task.getSystemAttributes().getUpdatedDate() |
TEXTATTRIBUTE1 to TEXTATTRIBUTE10 | Textattribute1 to Textattribute10 | WFTASK_TEXTATTRIBUTE1_COLUMN to WFTASK_TEXTATTRIBUTE10_COLUMN | task.getSystemMessageAttributes().getTextAttribute1() to task.getSystemMessageAttributes().getTextAttribute10() |
FORMATTRIBUTE1 to FORMATTRIBUTE5 | FormAttribute1 to FormAttribute5 | WFTASK_FORMATTRIBUTE1_COLUMN to WFTASK_FORMATTRIBUTE5_COLUMN | task.getSystemMessageAttributes().getFormAttribute1() to task.getSystemMessageAttributes().getFormAttribute5() |
URLATTRIBUTE1 to URLATTRIBUTE5 | UrlAttribute1 to UrlAttribute5 | WFTASK_URLATTRIBUTE1_COLUMN to WFTASK_URLATTRIBUTE5_COLUMN | task.getSystemMessageAttributes().getUrlAttribute1() to task.getSystemMessageAttributes().getUrlAttribute5() |
DATEATTRIBUTE1 to DATEATTRIBUTE5 | DateAttribute1 to DateAttribute5 | WFTASK_DATEATTRIBUTE1_COLUMN to WFTASK_DATEATTRIBUTE5_COLUMN | task.getSystemMessageAttributes().getDateAttribute1() to task.getSystemMessageAttributes().getDateAttribute5() |
NUMBERATTRIBUTE1 to NUMBERATTRIBUTE5 | NumberAttribute1 to NumberAttribute5 | WFTASK_NUMBERATTRIBUTE1_COLUMN to WFTASK_NUMBERATTRIBUTE5_COLUMN | task.getSystemMessageAttributes().getNumberAttribute1() to task.getSystemMessageAttributes().getNumberAttribute5() |
TITLE | Title | WFTASK_TITLE_COLUMN | task.getTitle() |
IDENTIFICATIONKEY | Identification key | WFTASK_IDENTIFICATIONKEY_COLUMN | task.getIdentificationKey() |
TASKDEFINITIONID | Task Definition Id | WFTASK_TASKDEFINITIONID_COLUMN | task.getTaskDefinitionId() |
TASKDEFINITIONNAME | Task Definition Name | WFTASK_TASKDEFINITIONNAME_COLUMN | task.getSystemAttributes().getTaskDefinitionName() |
PROTECTEDTEXTATTRIBUTE1 to PROTECTEDTEXTATTRIBUTE10 | ProtectedTextAttribute1 to ProtectedTextAttribute10 | WFTASK_PROTECTEDTEXTATTRIBUTE1_COLUMN to WFTASK_PROTECTEDTEXTATTRIBUTE10_COLUMN | task.getSystemMessageAttributes().getProtectedTextAttribute1() to task.getSystemMessageAttributes().getProtectedTextAttribute10() |
PROTECTEDFORMATTRIBUTE1 to PROTECTEDFORMATTRIBUTE5 | ProtectedFormAttribute1 to ProtectedFormAttribute5 | WFTASK_PROTECTEDFORMATTRIBUTE1_COLUMN to WFTASK_PROTECTEDFORMATTRIBUTE5_COLUMN | task.getSystemMessageAttributes().getFormAttribute1() to task.getSystemMessageAttributes().getFormAttribute5() |
PROTECTEDURLATTRIBUTE1 to PROTECTEDURLATTRIBUTE5 | ProtectedURLAttribute1 to ProtectedURLAttribute5 | WFTASK_PROTECTEDURLATTRIBUTE1_COLUMN to WFTASK_PROTECTEDURLATTRIBUTE5_COLUMN | task.getSystemMessageAttributes().getProtectedURLAttribute1() to task.getSystemMessageAttributes().getProtectedURLAttribute5() |
PROTECTEDDATEATTRIBUTE1 to PROTECTEDDATEATTRIBUTE5 | ProtectedDateAttribute1 to ProtectedDateAttribute5 | WFTASK_PROTECTEDDATEATTRIBUTE1_COLUMN to WFTASK_PROTECTEDDATEATTRIBUTE5_COLUMN | task.getSystemMessageAttributes().getProtectedDateAttribute1() to task.getSystemMessageAttributes().getProtectedDateAttribute5() |
PROTECTEDNUMBERATTRIBUTE1 to PROTECTEDNUMBERATTRIBUTE5 | ProtectedNumberAttribute1 to ProtectedNumberAttribute5 | WFTASK_PROTECTEDNUMBERATTRIBUTE1_COLUMN to WFTASK_PROTECTEDNUMBERATTRIBUTE5_COLUMN | task.getSystemMessageAttributes().getProtectedNumberAttribute1() to task.getSystemMessageAttributes().getProtectedNumberAttribute5() |
APPLICATIONCONTEXT | Application Context | WFTASK_APPLICATIONCONTEXT_COLUMN | task.getApplicationContext() |
CATEGORY | Category | WFTASK_CATEGORY_COLUMN | task.getCategory() |
DUEDATE | Due Date | WFTASK_DUEDATE_COLUMN | task.getDueDate() |
ISPUBLIC | Is Public | WFTASK_ISPUBLIC_COLUMN | task.isIsPublic() |
PARTICIPANTNAME | Participant Name | WFTASK_PARTICIPANTNAME_COLUMN | task.getSystemAttributes().getParticipantName() |
PERCENTAGECOMPLETE | Percentage Complete | WFTASK_PERCENTAGECOMPLETE_COLUMN | task.getPercentageComplete() |
STARTDATE | Start Date | WFTASK_STARTDATE_COLUMN | task.getStartDate() |
TASKDISPLAYURL | Task Display Url | WFTASK_TASKDISPLAYURL_COLUMN | task.getTaskDisplayUrl() |
Nested Class Summary | |
---|---|
static class |
ITaskQueryService.AssignmentFilter
Enumeration for specifying the assignment filter to be used in Task Queries |
static class |
ITaskQueryService.ATTRIBUTE
ATRRIBUTE enumeration is used for WorkflowContext update in ITaskQueryService |
static class |
ITaskQueryService.OptionalInfo
Enumeration for specifying additional information to be retrieved whilst executing Task Queries |
static class |
ITaskQueryService.TaskActionsType
Enumeration for task actions type |
static class |
ITaskQueryService.TaskSequenceBuilderContext
|
static class |
ITaskQueryService.TaskSequenceType
Enumeration for specifying the type of task sequence to be retrieved whilst executing Task Sequence Queries |
Field Summary | |
---|---|
static java.lang.String |
ASSIGNMENT_FILTER_ADMIN
Deprecated. |
static java.lang.String |
ASSIGNMENT_FILTER_ALL
Deprecated. |
static java.lang.String |
ASSIGNMENT_FILTER_CREATOR
Deprecated. |
static java.lang.String |
ASSIGNMENT_FILTER_GROUP
Deprecated. |
static java.lang.String |
ASSIGNMENT_FILTER_MY
Deprecated. |
static java.lang.String |
ASSIGNMENT_FILTER_MY_AND_GROUP
Deprecated. |
static java.lang.String |
ASSIGNMENT_FILTER_MY_AND_GROUP_ALL
Deprecated. |
static java.lang.String |
ASSIGNMENT_FILTER_OWNER
Deprecated. |
static java.lang.String |
ASSIGNMENT_FILTER_PREVIOUS
Deprecated. |
static java.lang.String |
ASSIGNMENT_FILTER_REPORTEES
Deprecated. |
static java.lang.String |
ASSIGNMENT_FILTER_REVIEWER
Deprecated. |
static java.lang.String |
TASK_ACTIONS_TYPE_ALL_ACTIONS
|
static java.lang.String |
TASK_ACTIONS_TYPE_CUSTOM_ACTIONS
|
static java.lang.String |
TASK_ACTIONS_TYPE_GROUP_ACTIONS
|
Method Summary | |
---|---|
IWorkflowContext |
authenticate(java.lang.String user,
char[] password,
java.lang.String identityContext)
authenticate is used for authenticating a user with the identity authentication service based on the specified user/password and returns a workflow context. |
IWorkflowContext |
authenticate(java.lang.String user,
java.lang.String password,
java.lang.String identityContext,
java.lang.String onBehalfOfUser)
Deprecated. since 11. Use authenticate(String, char[], String) or
authenticateOnBehalfOf(IWorkflowContext, String) |
IWorkflowContext |
authenticateOnBehalfOf(IWorkflowContext adminWorkflowContext,
java.lang.String onBehalfOfUser)
Admin can authenticate on behalf of another user, and get the workflow context for the user specified in onBehalfOfUser |
int |
countTasks(IWorkflowContext ctx,
ITaskQueryService.AssignmentFilter assignmentFilter,
java.lang.String keywords,
Predicate predicate)
Counts the number of tasks that match the specified query criteria. |
int |
countViewTasks(IWorkflowContext ctx,
java.lang.String viewId,
Predicate extraPredicate)
Counts the number of tasks that match the query criteria of the specified view. |
IWorkflowContext |
createContext(javax.servlet.http.HttpServletRequest request)
createContext is used for creating a context from a pre-authenticated environment such as a SSO based application. |
IWorkflowContext |
createContextFromRequestObject(java.lang.Object request)
createContextFromRequestObject is used for creating a context from a pre-authenticated environment such as a SSO based application. |
void |
destroyWorkflowContext(IWorkflowContext ctx)
destroyWorkflowContext is used for cleaning up a workflow context that is no longer needed. |
boolean |
doesTaskExist(IWorkflowContext ctx,
ITaskQueryService.AssignmentFilter assignmentFilter,
java.lang.String keywords,
Predicate predicate)
Checks to see if any tasks exist that match the specified query criteria. |
boolean |
doesViewTaskExist(IWorkflowContext ctx,
java.lang.String viewId,
Predicate extraPredicate)
Checks to see if any tasks exist match the query criteria of the specified view. |
oracle.bpel.services.workflow.task.IRestrictedAssignees |
getPermittedAssignees(IWorkflowContext ctx,
Task task,
java.lang.String operation)
getPermittedAssignees gets a list of users to whom the current task can be reassigned to by the current user. |
oracle.bpel.services.workflow.task.IRestrictedAssignees |
getPermittedAssigneesForTasks(IWorkflowContext ctx,
java.util.List<java.lang.String> taskIdList,
java.lang.String operation,
java.lang.String participantType,
SearchFilter filter,
java.lang.String appRoleNamePattern,
java.lang.String appId)
getPermittedAssigneesForTasks gets a list of users to whom current set of tasks can be reassigned to by the current user. |
Task |
getTaskDetailsById(IWorkflowContext ctx,
java.lang.String taskId)
getTaskDetailsById gets the details of a task whose id is taskId |
Task |
getTaskDetailsByNumber(IWorkflowContext ctx,
int taskNumber)
getTaskDetailsByNumber gets the details of a task whose number is taskNumber |
java.util.List |
getTaskHistory(IWorkflowContext ctx,
java.lang.String taskId)
Deprecated. use @link{#getTaskHistory(IWorkflowContext, String, List)} instead. |
java.util.List<Task> |
getTaskHistory(IWorkflowContext ctx,
java.lang.String taskId,
java.util.List<java.lang.String> displayColumns)
getTaskHistory returns a list of historical task versions for the specified taskId. |
TaskSequence |
getTaskSequence(IWorkflowContext ctx,
java.lang.String taskId,
java.util.List<java.lang.String> taskDisplayColumns,
java.util.List<ITaskQueryService.TaskSequenceType> taskSequenceType,
java.util.List<ITaskQueryService.TaskSequenceBuilderContext> taskSequenceBuilderContext,
boolean fetchTaskSequenceForRootTask)
|
TaskSequence |
getTaskSequence(IWorkflowContext ctx,
Task task,
java.util.List<java.lang.String> taskDisplayColumns,
java.util.List<ITaskQueryService.TaskSequenceType> taskSequenceType,
java.util.List<ITaskQueryService.TaskSequenceBuilderContext> taskSequenceBuilderContext,
boolean fetchTaskSequenceForRootTask)
getTaskSequence gets the task sequence tree of a task whose id is taskId, for those type of sequence specified in sequenceTypes There are 4 types of objects in the returned tree. |
Task |
getTaskVersionDetails(IWorkflowContext ctx,
java.lang.String taskId,
int versionNumber)
getTaskVersionDetails gets the task version details of a task whose id is taskId for the version denoted by versionNumber |
IWorkflowContext |
getWorkflowContext(java.lang.String ctxToken)
getWorkflowContext is used for retrieving a workflow context based on the given token. |
IWorkflowContext |
getWorkflowContextForAuthenticatedUser()
Gets WorkflowContext for already authenticated user and whose identity is propagated to server The method returns valid context only if user identity is propagated to the service and context is still valid, else the method throws WorkflowException exception |
java.util.List<TaskCountType> |
queryAggregatedTasks(IWorkflowContext ctx,
Column groupByColumn,
ITaskQueryService.AssignmentFilter assignmentFilter,
java.lang.String keywords,
Predicate predicate,
boolean orderByCount,
boolean ascendingOrder)
Executes the specified query, and aggregates a count of the tasks returned by the query, grouped by the specified column. |
java.util.List<Task> |
queryDecomposedTasks(IWorkflowContext ctx,
java.lang.String parentTaskId,
java.util.List<java.lang.String> displayColumns,
java.util.List<ITaskQueryService.OptionalInfo> optionalInfo,
java.lang.String keywords,
Predicate predicate,
Ordering ordering,
int startRow,
int endRow)
Queries a list of sub-tasks that have been decomposed from the specified parent task instance. |
java.util.List<oracle.bpel.services.workflow.task.error.model.TaskError> |
queryTaskErrors(IWorkflowContext ctx,
Predicate predicate,
Ordering ordering,
int startRow,
int endRow)
queryTaskErrors returns a list of TaskError objects matching the specified predicate |
java.util.List<Task> |
queryTasks(IWorkflowContext ctx,
java.util.List displayColumns,
java.util.List<ITaskQueryService.OptionalInfo> optionalInformation,
ITaskQueryService.AssignmentFilter assignmentFilter,
java.lang.String keywords,
Predicate predicate,
Ordering ordering,
int startRow,
int endRow)
queryTasks returns a list of tasks that match the predicate and ordering criterion. |
java.util.List |
queryTasks(IWorkflowContext ctx,
java.util.List displayColumns,
java.util.List optionalInformation,
java.lang.String assignmentFilter,
java.lang.String keywords,
Predicate predicate,
Ordering ordering,
int startRow,
int endRow)
Deprecated. |
java.util.List<Task> |
queryTasks(IWorkflowContext ctx,
java.lang.String presentationId,
ITaskQueryService.AssignmentFilter assignmentFilter,
java.lang.String keywords,
Predicate predicate,
int startRow,
int endRow)
queryTasks returns a list of tasks that match the predicate. |
java.util.List<TaskCountType> |
queryViewAggregatedTasks(IWorkflowContext ctx,
java.lang.String viewId,
Predicate extraPredicate,
Column defaultGroupByColumn,
boolean defaultOrderByCount,
boolean defaultAscendingOrder)
Executes the query as defined in the specified view, and agregates the selected tasks according to the chart property defined in the view. |
java.util.List |
queryViewTasks(IWorkflowContext ctx,
java.lang.String viewId,
Predicate extraPredicate,
Ordering defaultOrdering,
int startRow,
int endRow)
queryViewTasks returns a list of tasks that match the criterion specified in the view such as columns, optional info, assignmentFilter, keywords, predicate, ordering. |
IWorkflowContext |
refreshWorkflowContext(IWorkflowContext ctx)
refreshWorkflowContext is used for refreshing session and updating user cache associated with this context The method synchronizes privilages, app roles and group granted to workflow context user with security provider. |
IWorkflowContext |
updateWorkflowContext(IWorkflowContext ctx,
java.util.Map<ITaskQueryService.ATTRIBUTE,java.lang.Object> attributes,
boolean force)
updateWorkflowContext is used for update workflow context with attribute values provided in the map The method returns a new WorflowContext instance |
Field Detail |
---|
static final java.lang.String ASSIGNMENT_FILTER_MY
static final java.lang.String ASSIGNMENT_FILTER_GROUP
static final java.lang.String ASSIGNMENT_FILTER_MY_AND_GROUP
static final java.lang.String ASSIGNMENT_FILTER_MY_AND_GROUP_ALL
static final java.lang.String ASSIGNMENT_FILTER_REPORTEES
static final java.lang.String ASSIGNMENT_FILTER_CREATOR
static final java.lang.String ASSIGNMENT_FILTER_OWNER
static final java.lang.String ASSIGNMENT_FILTER_REVIEWER
static final java.lang.String ASSIGNMENT_FILTER_PREVIOUS
static final java.lang.String ASSIGNMENT_FILTER_ALL
static final java.lang.String ASSIGNMENT_FILTER_ADMIN
static final java.lang.String TASK_ACTIONS_TYPE_ALL_ACTIONS
static final java.lang.String TASK_ACTIONS_TYPE_GROUP_ACTIONS
static final java.lang.String TASK_ACTIONS_TYPE_CUSTOM_ACTIONS
Method Detail |
---|
IWorkflowContext createContext(javax.servlet.http.HttpServletRequest request) throws WorkflowException
If a IWorkflowContext
instance is not used for within the timeout defined
in the workflow configuration, it would become invalid and can't be used further in workflow
service calls because a WorkflowException would be thrown. If this occurs a new
IWorkflowContext
instance would have to be obtained.
When IWorkflowContext
instance isn't needed any more (such as a logout
from an application) it has to be destroyed to free up memory used in the service by that
corresponding session. To destroy a IWorkflowContext
instance see
destroyWorkflowContext()
method.
request
- The pre-authenticated environment (request) to create the context for
WorkflowException
- any exception thrown during authenticationIWorkflowContext createContextFromRequestObject(java.lang.Object request) throws WorkflowException
If a IWorkflowContext
instance is not used for within the timeout defined
in the workflow configuration, it would become invalid and can't be used further in workflow
service calls because a WorkflowException would be thrown. If this occurs a new
IWorkflowContext
instance would have to be obtained.
When IWorkflowContext
instance isn't needed any more (such as a logout
from an application) it has to be destroyed to free up memory used in the service by that
corresponding session. To destroy a IWorkflowContext
instance see
destroyWorkflowContext()
method.
request
- The pre-authenticated HttpServletRequest/PortletRequest to create the workflow context for
WorkflowException
- any exception thrown during authenticationIWorkflowContext authenticate(java.lang.String user, java.lang.String password, java.lang.String identityContext, java.lang.String onBehalfOfUser) throws WorkflowException
authenticate(String, char[], String)
or
authenticateOnBehalfOf(IWorkflowContext, String)
If a IWorkflowContext
instance is not used for within the timeout defined
in the workflow configuration, it would become invalid and can't be used further in workflow
service calls because a WorkflowException would be thrown. If this occurs a new
IWorkflowContext
instance would have to be obtained.
When IWorkflowContext
instance isn't needed any more (such as a logout
from an application) it has to be destroyed to free up memory used in the service by that
corresponding session. To destroy a IWorkflowContext
instance see
destroyWorkflowContext()
method.
user
- the name of the user who needs to be authenticatedpassword
- the password of the user who needs to be authenticatedidentityContext
- the identityContext (usually realm) of the useronBehalfOfUser
- The user on behalf of whom the context should be created
(Admin can authenticate on behalf of another user, and get the
workflow context for the user specified in onBehalfOfUser)
WorkflowException
- any exception thrown during authenticationIWorkflowContext authenticate(java.lang.String user, char[] password, java.lang.String identityContext) throws WorkflowException
If a IWorkflowContext
instance is not used for within the timeout defined
in the workflow configuration, it would become invalid and can't be used further in workflow
service calls because a WorkflowException would be thrown. If this occurs a new
IWorkflowContext
instance would have to be obtained.
When IWorkflowContext
instance isn't needed any more (such as a logout
from an application) it has to be destroyed to free up memory used in the service by that
corresponding session. To destroy a IWorkflowContext
instance see
destroyWorkflowContext()
method.
user
- the name of the user who needs to be authenticatedpassword
- the password of the user who needs to be authenticatedidentityContext
- the identityContext (usually realm) of the user
WorkflowException
- any exception thrown during authenticationIWorkflowContext authenticateOnBehalfOf(IWorkflowContext adminWorkflowContext, java.lang.String onBehalfOfUser) throws WorkflowException
If a IWorkflowContext
instance is not used for within the timeout defined
in the workflow configuration, it would become invalid and can't be used further in workflow
service calls because a WorkflowException would be thrown. If this occurs a new
IWorkflowContext
instance would have to be obtained.
When IWorkflowContext
instance isn't needed any more (such as a logout
from an application) it has to be destroyed to free up memory used in the service by that
corresponding session. To destroy a IWorkflowContext
instance see
destroyWorkflowContext()
method.
IWorkflowContext
- the workflow context of the adminonBehalfOfUser
- The user on behalf of whom the context should be created
WorkflowException
- any exception thrown during authenticationIWorkflowContext getWorkflowContextForAuthenticatedUser() throws WorkflowException
WorkflowException
exception
If a IWorkflowContext
instance is not used for within the timeout defined
in the workflow configuration, it would become invalid and can't be used further in workflow
service calls because a WorkflowException would be thrown. If this occurs a new
IWorkflowContext
instance would have to be obtained.
When IWorkflowContext
instance isn't needed any more (such as a logout
from an application) it has to be destroyed to free up memory used in the service by that
corresponding session. To destroy a IWorkflowContext
instance see
destroyWorkflowContext()
method.
IWorkflowContext
object.
WorkflowException
- any exception thrown during authenticationIWorkflowContext getWorkflowContext(java.lang.String ctxToken) throws WorkflowException
If a IWorkflowContext
instance is not used for within the timeout defined
in the workflow configuration, it would become invalid and can't be used further in workflow
service calls because a WorkflowException would be thrown. If this occurs a new
IWorkflowContext
instance would have to be obtained.
When IWorkflowContext
instance isn't needed any more (such as a logout
from an application) it has to be destroyed to free up memory used in the service by that
corresponding session. To destroy a IWorkflowContext
instance see
destroyWorkflowContext()
method.
ctxToken
- the token to be used for retrieving the context
WorkflowException
- any exception thrown during retrievalvoid destroyWorkflowContext(IWorkflowContext ctx) throws WorkflowException
ctx
- the workflow context
WorkflowException
- any exception thrown during authenticationIWorkflowContext refreshWorkflowContext(IWorkflowContext ctx) throws WorkflowException
ctx
- the workflow context
WorkflowException
- any exception thrown during authenticationIWorkflowContext updateWorkflowContext(IWorkflowContext ctx, java.util.Map<ITaskQueryService.ATTRIBUTE,java.lang.Object> attributes, boolean force) throws WorkflowException
ctx
- the workflow contextattributes
- an instance of Mapforce
- a boolean flag. If true, the values from the map overwrites the values in WorkflowConext, otherwise the method overwrites
only if user's attribute (for instance locale or timeZone) is null or does not exist in the identity provider
WorkflowException
- any exception thrown during authenticationjava.util.List queryTasks(IWorkflowContext ctx, java.util.List displayColumns, java.util.List optionalInformation, java.lang.String assignmentFilter, java.lang.String keywords, Predicate predicate, Ordering ordering, int startRow, int endRow) throws WorkflowException
ctx
- the workflow context (can contain valid token or credentials)assignmentFilter
- the filter for task assignment
For all possible values, check the assignment filters defined in this interface, like ASSIGNMENT_FILTER_<Filter Name>
displayColumns
- a list containing names of columns to be retrieved
For those columns that are not specified here, the queried Task object will not hold any value. For example: If TITLE is not specified, task.getTitle() will return null For the complete list of columns that can be specified here, check the table shown above Note: TASKID is fetched by default. So there is no need to explicitly specity it. If displayColumns is null or has no elements, then the following columns will be returned by default:
Column |
WFTASK_TASKID_COLUMN |
WFTASK_TASKGROUPID_COLUMN |
WFTASK_TASKNUMBER_COLUMN |
WFTASK_TASKDEFINITIONID_COLUMN |
WFTASK_TASKGROUPINSTANCEID_COLUMN |
WFTASK_SUBTASKGROUPINSTANCEID_COLUMN |
WFTASK_ACQUIREDBY_COLUMN |
WFTASK_ASSIGNEES_COLUMN |
WFTASK_REVIEWERS_COLUMN |
WFTASK_CREATOR_COLUMN |
WFTASK_OWNERUSER_COLUMN |
WFTASK_OWNERGROUP_COLUMN |
WFTASK_DIGITALSIGNATUREREQUIRED_COLUMN |
WFTASK_EXPIRATIONDATE_COLUMN |
WFTASK_PRIORITY_COLUMN |
WFTASK_ASSIGNEDDATE_COLUMN |
WFTASK_CREATEDDATE_COLUMN |
WFTASK_ENDDATE_COLUMN |
WFTASK_STATE_COLUMN |
WFTASK_UPDATEDBY_COLUMN |
WFTASK_UPDATEDDATE_COLUMN |
WFTASK_WORKFLOWPATTERN_COLUMN |
WFTASK_TITLE_COLUMN |
WFTASK_CATEGORY_COLUMN |
WFTASK_DUEDATE_COLUMN |
WFTASK_PERCENTAGECOMPLETE_COLUMN |
WFTASK_STARTDATE_COLUMN |
WFTASK_TASKDISPLAYURL_COLUMN |
optionalInformation
- a list specifying optional information to be retrieved
Possible Values: 1) Actions (All actions that can be performed on the task) 2) GroupActions (Only group Actions: Actions that can be performed on a group of tasks) 3) CustomActions (Custom actions applicable to the specific task type) 4) ShortHistory (A concise history of changes made to the task) All optionalInfo specified can be fetched from the Task object For example: if you have specified "CustomActions", you can retrieve it using task.getSystemAttributes().getCustomActions(); Actions" (All Actions) - task.getSystemAttributes().getSystemActions() "GroupActions" (Only group Actions)- task.getSystemAttributes().getSystemActions() "ShortHistory" - task.getSystemAttributes().getShortHistory() The following is reserved for future use. If you need them, please use getTaskDetailsById (or) getTaskDetailsByNumber, which will fetch all information related to a task, which includes these Attachments Comments Payload
keywords
- an optional search string
If this keyword is null, it is omitted from all query. If not null, predicates will be added to the query predicate to perform SQL 'like' operation (this method will add the sql % around the keyword: %$lt;keyword>%) on the following task attributes: task title, identification key, all textAttributes in task, task number (only if the keyword is a number)
predicate
- the predicate for filtering the tasksordering
- the ordering criteria for sorting the tasksstartRow
- the rownum of the starting row returned by this query. Used for paging queries.
If startRow is zero or less, list will start with the first row selected by the query.endRow
- the rownum of the ending row for this query.
If endRow is zero or less, paging size defaults to 200; up to 200 rows
will be returned (depending on the number of rows actually returned by the query).
WorkflowException
- if any runtime error occurs while querying tasksjava.util.List<Task> queryTasks(IWorkflowContext ctx, java.util.List displayColumns, java.util.List<ITaskQueryService.OptionalInfo> optionalInformation, ITaskQueryService.AssignmentFilter assignmentFilter, java.lang.String keywords, Predicate predicate, Ordering ordering, int startRow, int endRow) throws WorkflowException
ctx
- the workflow context (can contain valid token or credentials)assignmentFilter
- the filter for task assignment. Mandatory paramter.
For all possible values, check the list of assignment filters defined in this interface, in the enum AssignmentFilter
displayColumns
- a list containing names of columns to be retrieved
For those columns that are not specified here, the queried Task object will not hold any value. For example: If TITLE is not specified, task.getTitle() will return null For the complete list of columns that can be specified here, check the table shown above Note: TASKNUMBER and TASKID are fetched by default. So there is no need to explicitly specity it. If displayColumns is null or has no elements, then the following columns will be returned by default:
Column |
WFTASK_TASKID_COLUMN |
WFTASK_TASKGROUPID_COLUMN |
WFTASK_TASKNUMBER_COLUMN |
WFTASK_TASKDEFINITIONID_COLUMN |
WFTASK_TASKGROUPINSTANCEID_COLUMN |
WFTASK_SUBTASKGROUPINSTANCEID_COLUMN |
WFTASK_ACQUIREDBY_COLUMN |
WFTASK_ASSIGNEES_COLUMN |
WFTASK_REVIEWERS_COLUMN |
WFTASK_CREATOR_COLUMN |
WFTASK_OWNERUSER_COLUMN |
WFTASK_OWNERGROUP_COLUMN |
WFTASK_DIGITALSIGNATUREREQUIRED_COLUMN |
WFTASK_EXPIRATIONDATE_COLUMN |
WFTASK_PRIORITY_COLUMN |
WFTASK_ASSIGNEDDATE_COLUMN |
WFTASK_CREATEDDATE_COLUMN |
WFTASK_ENDDATE_COLUMN |
WFTASK_STATE_COLUMN |
WFTASK_UPDATEDBY_COLUMN |
WFTASK_UPDATEDDATE_COLUMN |
WFTASK_WORKFLOWPATTERN_COLUMN |
WFTASK_TITLE_COLUMN |
WFTASK_CATEGORY_COLUMN |
WFTASK_DUEDATE_COLUMN |
WFTASK_PERCENTAGECOMPLETE_COLUMN |
WFTASK_STARTDATE_COLUMN |
WFTASK_TASKDISPLAYURL_COLUMN |
optionalInformation
- a list specifying optional information to be retrieved
Possible Values: (Refer to the enum OptionalInfo, defined in this interface) 1) ALL_ACTIONS (All actions that can be performed on the task) 2) GROUP_ACTIONS (Only group Actions: Actions that can be performed on a group of tasks) 3) CUSTOM_ACTIONS (Custom actions applicable to the specific task type) 4) SHORT_HISTORY (A concise history of changes made to the task) 5) DISPLAY_INFO (Information relating to the URI for the task details display page) All optionalInfo specified can be fetched from the Task object For example: if you have specified "CUSTOM_ACTIONS", you can retrieve it using task.getSystemAttributes().getCustomActions(); "ALL_ACTIONS" (All Actions) - task.getSystemAttributes().getSystemActions() "GROUP_ACTIONS" (Only group Actions)- task.getSystemAttributes().getSystemActions() "SHORT_HISTORY" - task.getSystemAttributes().getShortHistory() "DISPLAY_INFO" - task.getSystemAttributes().getDisplayInfo() "ATTACHMENTS" - task.getAttachment() "COMMENTS" - task.getAddedComment() "PAYLOAD" - task.getPayloadAsElement()If optionalInformation is null, then no addtional information will be retrieved.
keywords
- an optional search string.
If this keyword is null, it is omitted from all query. If not null, predicates will be added to the query predicate to perform SQL 'like' operation (this method will add the sql % around the keyword: %<keyword>%) on the following task attributes: task title, identification key, all textAttributes in task, task number (only if the keyword is a number)
predicate
- the predicate for filtering the tasks. Optional parameter - may be null.ordering
- the ordering criteria for sorting the tasks. Optional parameter - if
no value is set, the tasks wil be ordered by task number.startRow
- the rownum of the starting row for this query.
If startRow is zero or less, list will contain rows from the start of the queried rows.endRow
- the rownum of the ending row for this query.
If endRow is zero or less, paging size defaults to 200; up to 200 rows
will be returned (depending on the number of rows actually returned by the query).
WorkflowException
- if any runtime error occurs while querying tasksjava.util.List<Task> queryTasks(IWorkflowContext ctx, java.lang.String presentationId, ITaskQueryService.AssignmentFilter assignmentFilter, java.lang.String keywords, Predicate predicate, int startRow, int endRow) throws WorkflowException
The user must have access to the specified presentation (must be the presentation owner, a grantee, or have andmin privileges).
The assignmentFilter is used to filter the tasks based on the task assignment. The tasks returned can be restricted by specifying valid values (>0) for the startRow and endRow to facilitate database level paging. If these values are set to 0 then the first 200 qualifying tasks are returned.
ctx
- the workflow context (can contain valid token or credentials)presentationId
- the id of the Presentation to use for this query.
The columns and optional info specified in the presetation will be queried,
and the query results will be ordered according to the ordering clauses in
the Presentation.assignmentFilter
- the filter for task assignment. Mandatory paramter.
For all possible values, check the list of assignment filters defined in this interface, in the enum AssignmentFilter
keywords
- an optional search string.
If this keyword is null, it is omitted from all query. If not null, predicates will be added to the query predicate to perform SQL 'like' operation (this method will add the sql % around the keyword: %<keyword>%) on the following task attributes: task title, identification key, all textAttributes in task, task number (only if the keyword is a number)
predicate
- the predicate for filtering the tasks. Optional parameter - may be null.startRow
- the rownum of the starting row for this query.
If startRow is zero or less, list will contain rows from the start of the queried rows.endRow
- the rownum of the ending row for this query.
If endRow is zero or less, paging size defaults to 200; up to 200 rows
will be returned (depending on the number of rows actually returned by the query).
WorkflowException
- if any runtime error occurs while querying tasksjava.util.List<TaskCountType> queryAggregatedTasks(IWorkflowContext ctx, Column groupByColumn, ITaskQueryService.AssignmentFilter assignmentFilter, java.lang.String keywords, Predicate predicate, boolean orderByCount, boolean ascendingOrder) throws WorkflowException
ctx
- the workflow context (can contain valid token or credentials)groupByColumn
- the Column
the
task counts should be grouped by.assignmentFilter
- the filter for task assignment
For all possible values, check the list of assignment filters defined in this interface, in the enum AssignmentFilter. Mandatory parameter.
keywords
- an optional search string.
If this keyword is null, it is omitted from all query. If not null, predicates will be added to the query predicate to perform SQL 'like' operation (this method will add the sql % around the keyword: %<keyword>%) on the following task attributes: task title, identification key, all textAttributes in task, task number (only if the keyword is a number)
predicate
- the Predicate
for filtering the tasks.
Optional parameter - may be null.orderByCount
- if true
, results will be ordered by the counts,
if false
, results will be ordered by the values of the groupBy column.ascendingOrder
- if true
, results will be in ascending order, otherwise
results will be in descending order.
TaskCountType
objects.
Each TaskCountType object has a value field containing a value from the
groupBy column and a count field containing the number of tasks that have
that value.
WorkflowException
- if any runtime error occurs while querying tasks.int countTasks(IWorkflowContext ctx, ITaskQueryService.AssignmentFilter assignmentFilter, java.lang.String keywords, Predicate predicate) throws WorkflowException
ctx
- the workflow context (can contain valid token or credentials)assignmentFilter
- the filter for task assignment
For all possible values, check the list of assignment filters defined in this interface, in the enum AssignmentFilter. Mandatory parameter.
keywords
- an optional search string.
If this keyword is null, it is omitted from all query. If not null, predicates will be added to the query predicate to perform SQL 'like' operation (this method will add the sql % around the keyword: %<keyword>%) on the following task attributes: task title, identification key, all textAttributes in task, task number (only if the keyword is a number)
predicate
- the Predicate
for filtering the tasks.
Optional parameter - may be null.
WorkflowException
- if any runtime error occurs while querying tasks.boolean doesTaskExist(IWorkflowContext ctx, ITaskQueryService.AssignmentFilter assignmentFilter, java.lang.String keywords, Predicate predicate) throws WorkflowException
ctx
- the workflow context (can contain valid token or credentials)assignmentFilter
- the filter for task assignment
For all possible values, check the list of assignment filters defined in this interface, in the enum AssignmentFilter. Mandatory parameter.
keywords
- an optional search string.
If this keyword is null, it is omitted from all query. If not null, predicates will be added to the query predicate to perform SQL 'like' operation (this method will add the sql % around the keyword: %<keyword>%) on the following task attributes: task title, identification key, all textAttributes in task, task number (only if the keyword is a number)
predicate
- the Predicate
for filtering the tasks.
Optional parameter - may be null.
true
if any tasks match the specified query criteria, otherwise false
.
WorkflowException
- if any runtime error occurs while querying tasks.java.util.List queryViewTasks(IWorkflowContext ctx, java.lang.String viewId, Predicate extraPredicate, Ordering defaultOrdering, int startRow, int endRow) throws WorkflowException
ctx
- the workflow context (can contain valid token or credentials)viewId
- the view id of the view whose tasks need to be retrieved
(Views can be created using IUserMetadataService
)extraPredicate
- optional extra Predicate
on top of the view predicate for filtering the tasks.defaultOrdering
- the default ordering criteria that overrides view ordering for sorting the tasksstartRow
- the rownum of the starting row for this query.
If startRow is zero or less, list will contain rows from the start of the queried rows.endRow
- the rownum of the ending row for this query.
If endRow is zero or less, paging size defaults to 200; up to 200 rows
will be returned (depending on the number of rows actually returned by the query).
WorkflowException
- if any runtime error occurs while querying tasksjava.util.List<TaskCountType> queryViewAggregatedTasks(IWorkflowContext ctx, java.lang.String viewId, Predicate extraPredicate, Column defaultGroupByColumn, boolean defaultOrderByCount, boolean defaultAscendingOrder) throws WorkflowException
ChartType
,
and defines the following properties:
String
The name of the column the
task counts should be grouped by.ChartType.SelectValuesType
optionally specifies a list of values from the groupByColumn that should be selected
for aggregation. If no selectValues are selected, then all agregation is
over all values of the groupBy columnboolean
if true
, results
will be ordered by the counts, if false
, results will be ordered
by the values of the group by column.
boolean
if true
, results
will be in ascending order, otherwise results will be in descending order.
ctx
- ctx the workflow context (can contain valid token or credentials)viewId
- the view id of the view whose tasks need to be retrieved
(Views can be created using IUserMetadataService
)extraPredicate
- optional extra Predicate
on top of the view predicate for filtering the tasks.defaultGroupByColumn
- if the view does not specify a chart groupBy column
this parameter specifies the to be used
group the task counts.defaultOrderByCount
- specifies how tasks counts should be ordered
if the view does not specify ordering.defaultAscendingOrder
- specifies how tasks counts should be ordered
if the view does not specify ordering.
TaskCountType
objects.
Each TaskCountType object has a value field containing a value from the
groupBy column and a count field containing the number of tasks that have
that value.
WorkflowException
- if any runtime error occurs while querying tasks.int countViewTasks(IWorkflowContext ctx, java.lang.String viewId, Predicate extraPredicate) throws WorkflowException
ctx
- the workflow context (can contain valid token or credentials)viewId
- the view id of the view whose tasks are to be counted.extraPredicate
- optional extra Predicate
on top of the view predicate for filtering the tasks.
WorkflowException
- if any runtime error occurs while querying tasks.boolean doesViewTaskExist(IWorkflowContext ctx, java.lang.String viewId, Predicate extraPredicate) throws WorkflowException
ctx
- the workflow context (can contain valid token or credentials)viewId
- the view id of the view whose tasks are to be counted.extraPredicate
- optional extra Predicate
on top of the view predicate for filtering the tasks.
true
if any tasks match the specified query criteria, otherwise false
.
WorkflowException
- if any runtime error occurs while querying tasks.java.util.List<Task> queryDecomposedTasks(IWorkflowContext ctx, java.lang.String parentTaskId, java.util.List<java.lang.String> displayColumns, java.util.List<ITaskQueryService.OptionalInfo> optionalInfo, java.lang.String keywords, Predicate predicate, Ordering ordering, int startRow, int endRow) throws WorkflowException
A decomposed task can be created by a call to
ITaskService.decomposeTask(oracle.bpel.services.workflow.verification.IWorkflowContext, java.lang.String, oracle.bpel.services.workflow.metadata.routingslip.model.RoutingSlip, oracle.bpel.services.workflow.task.model.DecomposeTaskInfo)
.
This method will only return direct sub-tasks - if a decomposed sub-task is further decomposed, those 'sub-sub-tasks' wont be included in the list returned by this method for the original parent task. The 'sub-sub-tasks' may be returned by passing the taskId of the decomposed sub-task they were decomposed from to this method.
The fields that should be populated on the on the returned Task objects
can be specfied by the displayColumns
and optionalInfo
parameters.
The ordering of the returned list can be specified using the ordering
paramter. The list of returned tasks can be paged by specifying a startRow
and endRow.
ctx
- the workflow context (can contain valid token or credentials)parentTaskId
- the taskId of the task to query the decomposed tasks fordisplayColumns
- a list containing names of columns to be retrieved.
Refer to queryTasks(oracle.bpel.services.workflow.verification.IWorkflowContext, java.util.List, java.util.List, java.lang.String, java.lang.String, oracle.bpel.services.workflow.repos.Predicate, oracle.bpel.services.workflow.repos.Ordering, int, int)
for a description of this
parameter.optionalInfo
- a list specifying optional information to be retrieved.
Refer to queryTasks(oracle.bpel.services.workflow.verification.IWorkflowContext, java.util.List, java.util.List, java.lang.String, java.lang.String, oracle.bpel.services.workflow.repos.Predicate, oracle.bpel.services.workflow.repos.Ordering, int, int)
for a description of this
parameter.keywords
- an optional search string.
Refer to queryTasks(oracle.bpel.services.workflow.verification.IWorkflowContext, java.util.List, java.util.List, java.lang.String, java.lang.String, oracle.bpel.services.workflow.repos.Predicate, oracle.bpel.services.workflow.repos.Ordering, int, int)
for a description of this
parameter.predicate
- the predicate for filtering the tasks. Optional parameter - may be null.ordering
- the ordering criteria for sorting the tasks. Optional parameter - if
no value is set, the tasks wil be ordered by task number.startRow
- the rownum of the starting row for this query.
If startRow is zero or less, list will contain rows from the start of the queried rows.endRow
- the rownum of the ending row for this query.
If endRow is zero or less, paging size defaults to 200; up to 200 rows
will be returned (depending on the number of rows actually returned by the query).
WorkflowException
java.util.List<oracle.bpel.services.workflow.task.error.model.TaskError> queryTaskErrors(IWorkflowContext ctx, Predicate predicate, Ordering ordering, int startRow, int endRow) throws WorkflowException
ctx
- the workflow context (can contain valid token or credentials)predicate
- the predicate for filtering the task errorsordering
- the ordering criteria for sorting the task errorsstartRow
- the rownum of the starting row for this query.
If startRow is zero or less, list will contain rows from the start of the queried rows.endRow
- the rownum of the ending row for this query.
If endRow is zero or less, paging size defaults to 200; up to 200 rows
will be returned (depending on the number of rows actually returned by the query).
WorkflowException
java.util.List getTaskHistory(IWorkflowContext ctx, java.lang.String taskId) throws WorkflowException
ctx
- the workflow context (can contain valid token or credentials)taskId
- the id of the task whose history is needed
WorkflowException
- if any runtime error occurs while getting task versionsjava.util.List<Task> getTaskHistory(IWorkflowContext ctx, java.lang.String taskId, java.util.List<java.lang.String> displayColumns) throws WorkflowException
ctx
- the workflow context (can contain valid token or credentials)taskId
- the id of the task whose history is neededdisplayColumns
- a list containing names of columns to be retrieved
For those columns that are not specified here, the queried Task object will not hold any value. For example: If TITLE is not specified, task.getTitle() will return null For the complete list of columns that can be specified here, check the table shown above If displayColumns is null or has no elements, then the following columns will be returned by default:
Column |
WFTASKHISTORY_TASKID_COLUMN |
WFTASKHISTORY_TASKGROUPID_COLUMN |
WFTASKHISTORY_TASKNUMBER_COLUMN |
WFTASKHISTORY_VERSION_COLUMN |
WFTASKHISTORY_VERSIONREASON_COLUMN |
WFTASKHISTORY_STATE_COLUMN |
WFTASKHISTORY_ASSIGNEES_COLUMN |
WFTASKHISTORY_UPDATEDDATE_COLUMN |
WFTASKHISTORY_UPDATEDBY_COLUMN |
WFTASKHISTORY_USERCOMMENT_COLUMN |
WFTASKHISTORY_OUTCOME_COLUMN |
WorkflowException
- if any runtime error occurs while getting task versionsTask getTaskDetailsById(IWorkflowContext ctx, java.lang.String taskId) throws WorkflowException
ctx
- the workflow context (can contain valid token or credentials)taskId
- the id of the task whose details are needed
WorkflowException
- if any runtime error occurs while getting task detailsTask getTaskDetailsByNumber(IWorkflowContext ctx, int taskNumber) throws WorkflowException
ctx
- the workflow context (can contain valid token or credentials)taskNumber
- the number of the task whose details are needed
WorkflowException
- if any runtime error occurs while getting task detailsTask getTaskVersionDetails(IWorkflowContext ctx, java.lang.String taskId, int versionNumber) throws WorkflowException
ctx
- the workflow context (can contain valid token or credentials)taskId
- the id of the task whose details are neededversionNumber
- the version number of the task
WorkflowException
- if any runtime error occurs while getting task detailsTaskSequence getTaskSequence(IWorkflowContext ctx, Task task, java.util.List<java.lang.String> taskDisplayColumns, java.util.List<ITaskQueryService.TaskSequenceType> taskSequenceType, java.util.List<ITaskQueryService.TaskSequenceBuilderContext> taskSequenceBuilderContext, boolean fetchTaskSequenceForRootTask) throws WorkflowException
getTaskSequence gets the task sequence tree of a task whose id is taskId, for those type of sequence specified in sequenceTypes There are 4 types of objects in the returned tree. Each of these objects implement the ITaskSequence interface.Attributes in each of ITaskSequence objects are:
- TaskSequence. This node represents a sequence of nodes. This node is always the root object and will also be the wrapper around a parallel branch if there is more than one node in that branch. The objects in the getChildren() method could be Parallel, SequenceGroup or TaskSequenceRecord.
- Parallel. This node represents a parallel events in the task. Each node in the getChildren() method represents one parallel branch. The objects in the getChildren() method could be Sequence, SequenceGroup, Parallel or TaskSequenceRecord. If there are more than one node in any parallel branch, then all those nodes will be wrapped by a Sequence object. If the client wants each parallel branch to be wrapped with a TaskSequence object, it could pass TaskSequenceBuilderContext.INCLUDE_SEQUENCE_FOR_SINGLE_CHILD in the List<TaskSequenceBuilderContext> parameter of the getTaskSequence method.
- SequenceGroup. The SequenceGroup object represents a sequence of nodes that are grouped because they belong to the same workflow pattern like management chain or sequential participant. The objects in the getChildren() method are always TaskSequenceRecord objects. By default there will be no SequenceGroup objects. If the client wants workflow patterns to be captured as SequenceGroup objects in the TaskSequence tree, it could pass TaskSequenceBuilderContext.WORKFLOW_PATTERN in the List<TaskSequenceBuilderContext> parameter of the getTaskSequence method.
- TaskSequenceRecord. This object represents actual update to the task or a future assignment. It doesn't have any children.
Attribute | TaskSequence | Parallel | SequenceGroup | TaskSequenceRecord |
---|---|---|---|---|
Id | Not populated by default | Not populated by default | Not populated by default | Not populated by default |
SequenceNumber | Populated by default | Populated by default | Populated by default | Populated by default |
Label | Not applicable | The name of the parallel pattern as specified during design time | The name of the workflow pattern node as specified during design time | The name of the workflow pattern node as specified during design time |
Pattern | Not applicable | ITaskSequence.Pattern.Parallel | ITaskSequence.Pattern.ManagementChain or ITaskSequence.Pattern.SequentialParticipant | ITaskSequence.Pattern.* |
Name | Not applicable | Same as label | Same as label | Concatenated string of the assignees |
FlexString1-5 | Not populated by default. Available for clients to set additional attributes on nodes in the tree | Not populated by default. Available for clients to set additional attributes on nodes in the tree | Not populated by default. Available for clients to set additional attributes on nodes in the tree | Not populated by default. Available for clients to set additional attributes on nodes in the tree |
ctx
- the workflow context (can contain valid token or credentials)task
- the task whose details are neededtaskDisplayColumns
- the task columns to querytaskSequenceType
- a list containing type of task sequence type to be retrievedtaskSequenceBuilderContext
- a list containing context to the task sequence true builderfetchTaskSequenceForRootTask
- If true, get the task sequence for the root task, else get
the task sequence for the current task. The root task is the main task which could have sub tasks
that represent parallel tasks
WorkflowException
- if any runtime error occurs while getting task sequenceTaskSequence getTaskSequence(IWorkflowContext ctx, java.lang.String taskId, java.util.List<java.lang.String> taskDisplayColumns, java.util.List<ITaskQueryService.TaskSequenceType> taskSequenceType, java.util.List<ITaskQueryService.TaskSequenceBuilderContext> taskSequenceBuilderContext, boolean fetchTaskSequenceForRootTask) throws WorkflowException
ctx
- the workflow context (can contain valid token or credentials)taskId
- the taskId of the task whose details are neededtaskDisplayColumns
- the task columns to querytaskSequenceType
- a list containing type of task sequence type to be retrievedtaskSequenceBuilderContext
- a list containing context to the task sequence true builderfetchTaskSequenceForRootTask
- If true, get the task sequence for the root task, else get
the task sequence for the current task. The root task is the main task which could have sub tasks
that represent parallel tasks
WorkflowException
- if any runtime error occurs while getting task sequencegetTaskSequence(oracle.bpel.services.workflow.verification.IWorkflowContext, oracle.bpel.services.workflow.task.model.Task, java.util.List, java.util.List, java.util.List, boolean)
oracle.bpel.services.workflow.task.IRestrictedAssignees getPermittedAssignees(IWorkflowContext ctx, Task task, java.lang.String operation) throws WorkflowException
ctx
- the workflow context.task
- the task being operated uponoperation
- the operation. One of the constants from the call back interface.
WorkflowException
- if any runtime error occurs while obtaining the list of users.oracle.bpel.services.workflow.task.IRestrictedAssignees getPermittedAssigneesForTasks(IWorkflowContext ctx, java.util.List<java.lang.String> taskIdList, java.lang.String operation, java.lang.String participantType, SearchFilter filter, java.lang.String appRoleNamePattern, java.lang.String appId) throws WorkflowException
ctx
- : the workflow contexttaskList
- : the set of tasks undergoing bulk reassignment(task Ids)operation
- : the operation, One of the constants from the call back interfaceparticipantType
- : the type of participant, the user is searching for. User/AppRole/Group/Allfilter
- : search query filter passed by the user to restrict the participants returnedappId
- : Optional Parameter. The appId the user is trying to search in, when the user searches for AppRole/All
WorkflowException
|
Oracle Fusion Middleware Java API Reference for Oracle BPM Suite 11g Release 1 (11.1.1.7.0) E25378-07 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |