- package com.oimacademy.provision;
- import java.sql.Connection;
- import java.sql.DriverManager;
- import java.sql.ResultSet;
- import java.sql.Statement;
- import java.util.ArrayList;
- import java.util.HashMap;
- import java.util.List;
- import java.util.Map;
- import Thor.API.tcResultSet;
- import Thor.API.Operations.tcProvisioningOperationsIntf;
- import com.oimacademy.connection.Platform;
- public class GetProvisioningTasks {
- public static void main(String[] args) {
- try{
- System.out.println("Startup...");
- System.out.println("Getting configuration...");
- tcProvisioningOperationsIntf provOperIntf = (tcProvisioningOperationsIntf) Platform.getService(Thor.API.Operations.tcProvisioningOperationsIntf.class);
- String resourceName = "OID User";
- String taskName = "Direct Provision";
- Map<String, String> filter= new HashMap<String,String>();
- filter.put("Objects.Name", resourceName);
- filter.put("Process Definition.Tasks.Task Name",taskName);
- String taskStaus[]= new String[]{"Rejected"};
- tcResultSet trs=provOperIntf.findAllOpenProvisioningTasks(filter,taskStaus);
- List<Map<String,Object>> taskLists= new ArrayList<Map<String,Object>>();
- System.out.println("Started processing...");
- int rowCount=trs.getRowCount();
- System.out.println("Total tasks to be retried: " + rowCount);
- //Get all tasks to re-tried
- if(rowCount >0){
- for(int i=0;i<rowCount ;i++)
- {
- trs.goToRow(i);
- Map<String,Object> map= new HashMap<String,Object>();
- map.put("Process Instance.Task Details.Key",trs.getLongValue("Process Instance.Task Details.Key"));
- map.put("Process Instance.Task Information.Target User",trs.getStringValue("Process Instance.Task Information.Target User"));
- map.put("Process Instance.Key",trs.getLongValue("Process Instance.Key"));
- map.put("Process Definition.Tasks.Key",trs.getLongValue("Process Definition.Tasks.Key"));
- map.put("Process Definition.Tasks.Task Name",trs.getStringValue("Process Definition.Tasks.Task Name"));
- taskLists.add(map);
- System.out.println("added task: " + i);
- }
- }
- System.out.println("taskLists size: " + taskLists.size());
- System.out.println("...Completed..");
- }catch (Exception e){
- e.printStackTrace();
- }
- }
- }
Oracle Identity Manager(OIM) is the Provisioning Solution from oracle. This page contains an index with references to all OIM related posts in the oracle identity manager Academy blog. The posts included herein are intended to provide oracle identity management customers and developers with technical information about best practices for implementing OIM based solutions.
OIM API to Get Provisioning/Pending Tasks
Subscribe to:
Post Comments (Atom)
-
Connection Related API's : OIM DB Connection/ Data Source connection OIMClient API / OIMConnection API OIM Platform API to getSer...
-
Error : Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory at org.springframewor...
-
In this post, we set the middle name as “MiddleName” if user does not provide middle name during user create operation. Below are high...
No comments:
Post a Comment