|
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 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
Nested Class Summary static class
IAGQueryService.AGAssignmentFilter
Field Summary static Column[]
AG_BPM_DEFAULT_COLUMNS
static java.lang.String
AG_PROCESS_TYPE_ANY
Deprecated. Since 11.1.1.7.0. Use BPM mode insteadstatic java.lang.String
AG_PROCESS_TYPE_BPEL
Deprecated. Since 11.1.1.7.0. Use BPM mode insteadstatic 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
Method Summary AGDisplayInfo
getAGDisplayInfoDetailsById(IWorkflowContext ctx, long instanceId, java.util.List taskDisplayColumns)
Deprecated. as of release 11.1.1.2.7 UsegetAGDisplayInfoDetailsById
API insteadAGDisplayInfo
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. UsequeryAGDisplayInforDetailsById
API insteadMilestoneDisplayInfo
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. UsegetMilestoneDisplayInfo
API insteadjava.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. UsequeryAGDisplayInfos
API insteadjava.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. UsequeryAGDisplayInfos
API instead
Field Detail AGASSIGNMENT_FILTER_MY
static final java.lang.String AGASSIGNMENT_FILTER_MY
- See Also:
- Constant Field Values
AGASSIGNMENT_FILTER_REPORTEES
static final java.lang.String AGASSIGNMENT_FILTER_REPORTEES
- See Also:
- Constant Field Values
AGASSIGNMENT_FILTER_CREATOR
static final java.lang.String AGASSIGNMENT_FILTER_CREATOR
- See Also:
- Constant Field Values
AGASSIGNMENT_FILTER_PREVIOUS
static final java.lang.String AGASSIGNMENT_FILTER_PREVIOUS
- See Also:
- Constant Field Values
AGASSIGNMENT_FILTER_ADMIN
static final java.lang.String AGASSIGNMENT_FILTER_ADMIN
- See Also:
- Constant Field Values
AG_PROCESS_TYPE_BPEL
static final java.lang.String AG_PROCESS_TYPE_BPEL
- Deprecated. Since 11.1.1.7.0. Use BPM mode instead
- See Also:
- Constant Field Values
AG_PROCESS_TYPE_BPM
static final java.lang.String AG_PROCESS_TYPE_BPM
- See Also:
- Constant Field Values
AG_PROCESS_TYPE_ANY
static final java.lang.String AG_PROCESS_TYPE_ANY
- Deprecated. Since 11.1.1.7.0. Use BPM mode instead
- See Also:
- Constant Field Values
FUTURE_TASK_NOT_STARTED
static final java.lang.String FUTURE_TASK_NOT_STARTED
- See Also:
- Constant Field Values
AG_BPM_DEFAULT_COLUMNS
static final Column[] AG_BPM_DEFAULT_COLUMNS
Method Detail queryAGDisplayInfos
java.util.List queryAGDisplayInfos(IWorkflowContext ctx, java.util.List agDisplayColumns, IAGQueryService.AGAssignmentFilter agAssignmentFilter, Predicate predicate, Ordering ordering, int startRow, int endRow) throws WorkflowException
- queryAGDisplayInfos returns a list of AGDisplayInfo objects. The AGDisplayInfo objects returned contain the following information: 1. AG metadata info such as AG name 2. AG instance info such as AG instance status. The columns returned are controlled by the agDisplayColumns parameter. 3. A list of milestones with the following info. (1) Milestone metadata info such as milestone icon location (2) Milestone instance info such as milestone status The AGDisplayInfo objects returned do not contain task information, which can be retrieved only by the queryAGDisplayInfoDetailsById API The assignmentFilter is used to filter the AGdisplaInfos based on the AG assignment. The AGDisplayInfos 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 all qualifying AGDisplayInfos are returned.
- Parameters:
ctx
- the workflow context (can contain valid token or credentials)agAssignmentFilter
- the assignment filterFor 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)- Returns:
- a list of AGDisplayInfo objects
- Throws:
WorkflowException
- if any runtime error occurs while querying AGDisplayInfos
queryAGDisplayInfos
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) throws WorkflowException
- Deprecated. Since 11.1.1.7.0. Use
queryAGDisplayInfos
API instead
- Throws:
WorkflowException
queryAGDisplayInfos
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 returns a list of AGDisplayInfo objects. This method is the same as as the
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.
- Throws:
WorkflowException
queryAGDisplayInfos
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
- Deprecated. Since 11.1.1.7.0. Use
queryAGDisplayInfos
API instead
- Throws:
WorkflowException
getAGDisplayInfoDetailsById
AGDisplayInfo getAGDisplayInfoDetailsById(IWorkflowContext ctx, long instanceId, java.util.List taskDisplayColumns, java.lang.String agAssignmentFilter) throws WorkflowException
- getAGDisplayInfoDetailsById gets the details of an AGDisplayInfo object specified by instanceId The AGDisplayInfo objects returned contain the following information: 1. AG metadata info such as AG name 2. AG instance info such as AG instance status. All AG display columns are returned. 3. A list of milestones with the following info (1) Milestone metadata info such as milestone icon location (2) Milestone instance info such as milestone status (3) A list of tasks. The task columns returned are controlled by the taskDisplayColumns parameter.
- Parameters:
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 filterFor 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 details
AGDisplayInfo getAGDisplayInfoDetailsById(java.lang.String ag_process_mode, IWorkflowContext ctx, long instanceId, java.util.List taskDisplayColumns, java.lang.String agAssignmentFilter) throws WorkflowException
queryAGDisplayInforDetailsById
API instead
WorkflowException
AGDisplayInfo getAGDisplayInfoDetailsById(IWorkflowContext ctx, long instanceId, java.util.List taskDisplayColumns) throws WorkflowException
getAGDisplayInfoDetailsById
API instead
WorkflowException
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_PREVIOUS
WorkflowException
- 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 instead
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 |