public interface IAGQueryService
This class provides a programmatic means for retrieving AGDisplayInfo objects, which contain metadata info, instance info, and associated tasks for an AG instance. The AGDisplayInfo objects can then be used by the UI layer to construct the AG tree structure. 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 an AGDisplayInfo list method to retrieve AG instances that match some filter criterion 3. Use the context and an AGDisplayInfo details method to retrieve a full blown AGDisplayInfo object, which contains instance info, metadata info, and associated tasks, for an AGInstance in the list 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.repos.Ordering; import oracle.bpel.services.workflow.repos.Predicate; import oracle.bpel.services.workflow.repos.TableConstants; import oracle.bpel.services.workflow.task.model.Task; import oracle.bpel.services.workflow.verification.IWorkflowContext; import oracle.bpel.services.workflow.activityguide.query.model.AGDisplayInfo; import oracle.bpel.services.workflow.activityguide.query.model.MilestoneDisplayInfoType; //User whose AGDisplayInfo list needs to be queried String userId = "jstein"; // Password for the user String password = "welcome1"; // 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); IAGQueryService agQuerySvc = wfSvcClient.getAGQueryService(); // Build the predicate Predicate datePredicate = new Predicate(TableConstants.WFTASK_CREATEDDATE_COLUMN, Predicate.OP_ON, new Date()); // Create the ordering Ordering ordering = new Ordering(TableConstants.WFTASK_COMPOSITEDN_COLUMN, true, true); // List of AG display columns // For those AG display columns that are not specified here, the queried AGDisplayInfo object will not // hold any value. // For example: If COMPOSITENAME is not specified, agDisplayInfo.getCompositeName() will return null // For the list of most comonly used columns, check the table below List agQueryColumns = new ArrayList(); agQueryColumns.add("CREATEDDATE"); agQueryColumns.add("UPDATEDDATE"); List agDisplayInfosList = agQuerySvc.queryAGDisplayInfos(wfCtx, agQueryColumns, IAGQueryService.AGAssignmentFilter.MY, datePredicate, 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 queryAGs to find out the number of AGDisplayInfos it returns. Using this // calculate your paging size (The number of AGDisplayInfos you want in a page) // Call queryAGs successively varing the startRow and endRow params. // For example: If the total number of AGDisplayInfos 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 queryAGDisplayInfos 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 agDisplayInfos returned is // less than your paging size (or) there are no more AGDisplayInfos returned if (agDisplayInfosList != null) { // There are AGDisplayInfos System.out.println("Total number of AGDisplayInfos: " + agDisplayInfosList.size()); System.out.println("AGDisplayInfo List: "); AGDisplayInfo agDisplayInfo = null; for(int i=0;iFollowing are all AG columns
Column objects are defined in oracle.bpel.services.workflow.repos.TableConstants, and they can also be obtained by passing the column name to the static method getColumn() on oracle.bpel.services.workflow.repos.Column.
Column Description Column Object How to retrieve Default Column INSTANCEID Instance id WFTASK_INSTANCEID_COLUMN agDisplayInfo.getInstanceId() True CREATEDDATE Creation Date WFTASK_CREATEDDATE_COLUMN agDisplayInfo.getCreatedDate() False UPDATEDDATE Updation Date WFTASK_UPDATEDDATE_COLUMN agDisplayInfo.getUpdatedDate() False COMPOSITEDN Composite Name WFTASK_COMPONENTDN_COLUMN agDisplayInfo.getCompositeName() True STATUS State WFTASK_STATE_COLUMN agDisplayInfo.getStatus() True
Modifier and Type | Interface and Description |
---|---|
static class |
IAGQueryService.AGAssignmentFilter |
Modifier and Type | Field and Description |
---|---|
static Column[] |
AG_BPM_DEFAULT_COLUMNS |
static java.lang.String |
AG_PROCESS_TYPE_ANY
Deprecated.
Since 11.1.1.7.0. Use BPM mode instead
|
static java.lang.String |
AG_PROCESS_TYPE_BPEL
Deprecated.
Since 11.1.1.7.0. Use BPM mode instead
|
static java.lang.String |
AG_PROCESS_TYPE_BPM |
static java.lang.String |
AGASSIGNMENT_FILTER_ADMIN |
static java.lang.String |
AGASSIGNMENT_FILTER_CREATOR |
static java.lang.String |
AGASSIGNMENT_FILTER_MY |
static java.lang.String |
AGASSIGNMENT_FILTER_PREVIOUS |
static java.lang.String |
AGASSIGNMENT_FILTER_REPORTEES |
static java.lang.String |
FUTURE_TASK_NOT_STARTED |
Modifier and Type | Method and Description |
---|---|
AGDisplayInfo |
getAGDisplayInfoDetailsById(IWorkflowContext ctx,
long instanceId,
java.util.List taskDisplayColumns)
Deprecated.
as of release 11.1.1.2.7
Use
getAGDisplayInfoDetailsById API instead |
AGDisplayInfo |
getAGDisplayInfoDetailsById(IWorkflowContext ctx,
long instanceId,
java.util.List taskDisplayColumns,
java.lang.String agAssignmentFilter)
getAGDisplayInfoDetailsById gets the details of an AGDisplayInfo object specified by instanceId
The AGDisplayInfo objects returned contain the following information:
1.
|
AGDisplayInfo |
getAGDisplayInfoDetailsById(java.lang.String ag_process_mode,
IWorkflowContext ctx,
long instanceId,
java.util.List taskDisplayColumns,
java.lang.String agAssignmentFilter)
Deprecated.
Since 11.1.1.7.0.
Use
queryAGDisplayInforDetailsById API instead |
MilestoneDisplayInfo |
getMilestoneDisplayInfo(IWorkflowContext ctx,
long instanceId,
java.lang.String milestoneName,
java.util.List taskDisplayColumns,
java.lang.String agAssignmentFilter)
getMilestoneDisplayInfo gets the MilestoneDisplayInfo object for the specified milestone in the specified AG
This API is useful when the UI needs to retrieve and refresh only the milestone subtree instead of the entire AG tree.
|
MilestoneDisplayInfo |
getMilestoneDisplayInfo(java.lang.String ag_process_mode,
IWorkflowContext ctx,
long instanceId,
java.lang.String milestoneName,
java.util.List taskDisplayColumns,
java.lang.String agAssignmentFilter)
Deprecated.
Since 11.1.1.7.0.
Use
getMilestoneDisplayInfo API instead |
java.util.List |
queryAGDisplayInfos(IWorkflowContext ctx,
java.util.List agDisplayColumns,
IAGQueryService.AGAssignmentFilter agAssignmentFilter,
Predicate predicate,
Ordering ordering,
int startRow,
int endRow)
queryAGDisplayInfos returns a list of AGDisplayInfo objects.
|
java.util.List |
queryAGDisplayInfos(IWorkflowContext ctx,
java.util.List agDisplayColumns,
java.lang.String agAssignmentFilter,
Predicate predicate,
Ordering ordering,
int startRow,
int endRow)
queryAGDisplayInfos returns a list of AGDisplayInfo objects.
|
java.util.List |
queryAGDisplayInfos(java.lang.String ag_process_mode,
IWorkflowContext ctx,
java.util.List agDisplayColumns,
IAGQueryService.AGAssignmentFilter agAssignmentFilter,
Predicate predicate,
Ordering ordering,
int startRow,
int endRow)
Deprecated.
Since 11.1.1.7.0.
Use
queryAGDisplayInfos API instead |
java.util.List |
queryAGDisplayInfos(java.lang.String ag_process_mode,
IWorkflowContext ctx,
java.util.List agDisplayColumns,
java.lang.String agAssignmentFilter,
Predicate predicate,
Ordering ordering,
int startRow,
int endRow)
Deprecated.
Since 11.1.1.7.0.
Use
queryAGDisplayInfos API instead |
static final java.lang.String AGASSIGNMENT_FILTER_MY
static final java.lang.String AGASSIGNMENT_FILTER_REPORTEES
static final java.lang.String AGASSIGNMENT_FILTER_CREATOR
static final java.lang.String AGASSIGNMENT_FILTER_PREVIOUS
static final java.lang.String AGASSIGNMENT_FILTER_ADMIN
static final java.lang.String AG_PROCESS_TYPE_BPEL
static final java.lang.String AG_PROCESS_TYPE_BPM
static final java.lang.String AG_PROCESS_TYPE_ANY
static final java.lang.String FUTURE_TASK_NOT_STARTED
static final Column[] AG_BPM_DEFAULT_COLUMNS
java.util.List queryAGDisplayInfos(IWorkflowContext ctx, java.util.List agDisplayColumns, IAGQueryService.AGAssignmentFilter agAssignmentFilter, Predicate predicate, Ordering ordering, int startRow, int endRow) throws WorkflowException
ctx
- the workflow context (can contain valid token or credentials)agAssignmentFilter
- the assignment filter
For all possible values, check the assignment filters defined in this interface, like AGASSIGNMENT_FILTER_<Filter Name>
agDisplayColumns
- a list containing names of AG columns to be retrieved
For those columns that are not specified here, the queried AGDisplayInfo object will not hold any value.
For example: If CREATEDDATE is not specified, agDisplayInfo.getCreatedDate() will return null.
The following AG columns will always be returned regardless of the agDisplayColumns setting
ColumnName | Column |
INSTANCEID | WFTASK_INSTANCEID |
COMPOSITEDN | WFTASK_COMPOSITEDN_COLUMN |
STATUS | WFTASK_STATE_COLUMN |
predicate
- the predicate for filtering the AGDisplayInfosordering
- the ordering criteria for sorting the AGDisplayInfosstartRow
- the rownum of the starting row for this query (set to 0 for no paging)endRow
- the rownum of the ending row for this query (set to 0 for no paging)WorkflowException
- if any runtime error occurs while querying AGDisplayInfosjava.util.List queryAGDisplayInfos(java.lang.String ag_process_mode, IWorkflowContext ctx, java.util.List agDisplayColumns, IAGQueryService.AGAssignmentFilter agAssignmentFilter, Predicate predicate, Ordering ordering, int startRow, int endRow) throws WorkflowException
queryAGDisplayInfos
API insteadWorkflowException
java.util.List queryAGDisplayInfos(IWorkflowContext ctx, java.util.List agDisplayColumns, java.lang.String agAssignmentFilter, Predicate predicate, Ordering ordering, int startRow, int endRow) throws WorkflowException
queryAGDisplayInfos
API,
except that it takes a string assignment filter instead of an AGAssignmentFilter enum as input.
This method is to be called by class AGQueryServiceWSIF only, which gets a string assignment filter
from the XML input.WorkflowException
java.util.List queryAGDisplayInfos(java.lang.String ag_process_mode, IWorkflowContext ctx, java.util.List agDisplayColumns, java.lang.String agAssignmentFilter, Predicate predicate, Ordering ordering, int startRow, int endRow) throws WorkflowException
queryAGDisplayInfos
API insteadWorkflowException
AGDisplayInfo getAGDisplayInfoDetailsById(IWorkflowContext ctx, long instanceId, java.util.List taskDisplayColumns, java.lang.String agAssignmentFilter) throws WorkflowException
ctx
- the workflow context (can contain valid token or credentials)instanceId
- the instance id of the AGDisplayInfo whose details are neededtaskDisplayColumns
- a list containing names of task columns to be retrievedagAssignmentFilter
- the assignment filter
For all possible values, check the assignment filters defined in this interface, like AGASSIGNMENT_FILTER_<Filter Name>
For a list of common task columns, refer to oracle.bpel.services.workflow.query.ITaskQueryService. If taskDisplayColumns is null or has no elements, then the following columns will be returned by default:
Column |
WFTASK_TASKID_COLUMN |
WFTASK_VERSION_COLUMN |
WFTASK_TASKGROUPID_COLUMN |
WFTASK_TASKNUMBER_COLUMN |
WFTASK_TASKDEFINITIONID_COLUMN |
WFTASK_TASKGROUPINSTANCEID_COLUMN |
WFTASK_SUBTASKGROUPINSTANCEID_COLUMN |
WFTASK_ASSIGNEEUSERS_COLUMN |
WFTASK_ASSIGNEEUSERSDISPLAYNAME_COLUMN |
WFTASK_ASSIGNEEGROUPS_COLUMN |
WFTASK_ASSIGNEEGROUPSDISPLAYNAME_COLUMN |
WFTASK_ACQUIREDBY_COLUMN |
WFTASK_ASSIGNEES_COLUMN |
WFTASK_ORIGINALASSIGNEEUSER_COLUMN |
WFTASK_REVIEWERS_COLUMN |
WFTASK_CREATOR_COLUMN |
WFTASK_OWNERUSER_COLUMN |
WFTASK_OWNERGROUP_COLUMN |
WFTASK_OWNERROLE_COLUMN |
WFTASK_APPLICATIONCONTEXT_COLUMN |
WFTASK_DIGITALSIGNATUREREQUIRED_COLUMN |
WFTASK_EXPIRATIONDATE_COLUMN |
WFTASK_PRIORITY_COLUMN |
WFTASK_ASSIGNEDDATE_COLUMN |
WFTASK_CREATEDDATE_COLUMN |
WFTASK_ENDDATE_COLUMN |
WFTASK_STATE_COLUMN |
WFTASK_SUBSTATE_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_NUMBEROFTIMESMODIFIED_COLUMN |
WFTASK_TASKDISPLAYURL_COLUMN |
WFTASK_OUTCOME_COLUMN |
WFTASK_MDSLABEL_COLUMN |
WFTASK_PARTICIPANTNAME_COLUMN |
WFTASK_ORGANIZATIONALUNITID_COLUMN |
WFTASK_APPROVERS_COLUMN |
WFTASK_TENANTIDNUMBER_COLUMN |
WFTASK_TENANTID_COLUMN |
WFTASK_ACQUIREDBY_COLUMN |
WFTASK_ACTIVITYID_COLUMN |
WFTASK_INSTANCEID_COLUMN |
WFTASK_ASSIGNEES_COLUMN |
WFTASK_ASSIGNEEGROUPS_COLUMN |
WFTASK_ASSIGNEEUSERS_COLUMN |
WFTASK_REVIEWERS_COLUMN |
WFTASK_OWNERUSER_COLUMN |
WFTASK_OWNERGROUP_COLUMN |
WFTASK_ORIGINALASSIGNEEUSER_COLUMN |
WFTASK_PARTICIPANTNAME_COLUMN |
WFTASK_APPROVERS_COLUMN |
WFTASK_IDENTITYCONTEXT_COLUMN |
WFTASK_TASKDEFINITIONNAME_COLUMN |
WFTASK_COMPONENTNAME_COLUMN |
WFTASK_COMPOSITENAME_COLUMN |
WFTASK_CALLBACKID_COLUMN |
WFTASK_STATE_COLUMN |
WFTASK_SUBSTATE_COLUMN |
WFTASK_PROCESSID_COLUMN |
WorkflowException
- if any runtime error occurs while getting AGDisplayInfo detailsAGDisplayInfo getAGDisplayInfoDetailsById(java.lang.String ag_process_mode, IWorkflowContext ctx, long instanceId, java.util.List taskDisplayColumns, java.lang.String agAssignmentFilter) throws WorkflowException
queryAGDisplayInforDetailsById
API insteadWorkflowException
AGDisplayInfo getAGDisplayInfoDetailsById(IWorkflowContext ctx, long instanceId, java.util.List taskDisplayColumns) throws WorkflowException
getAGDisplayInfoDetailsById
API insteadWorkflowException
MilestoneDisplayInfo getMilestoneDisplayInfo(IWorkflowContext ctx, long instanceId, java.lang.String milestoneName, java.util.List taskDisplayColumns, java.lang.String agAssignmentFilter) throws WorkflowException
ctx
- the workflow context (can contain valid token or credentials)instanceId
- the instance id of the AG instancemilestoneName
- the name of the milestonetaskDisplayColumns
- a list containing names of task columns to be retrieved, which is the same as
the one in getAGDisplayInfoDetailsById API aboveagAssignmentFilter
- - Allowable filters are
AGASSIGNMENT_FILTER_MY
AGASSIGNMENT_FILTER_REPORTEES
AGASSIGNMENT_FILTER_PREVIOUSWorkflowException
- if any runtime error occurs while getting MilestoneDisplayInfoMilestoneDisplayInfo getMilestoneDisplayInfo(java.lang.String ag_process_mode, IWorkflowContext ctx, long instanceId, java.lang.String milestoneName, java.util.List taskDisplayColumns, java.lang.String agAssignmentFilter) throws WorkflowException
getMilestoneDisplayInfo
API insteadWorkflowException