Trigger 2 tasks in OIM

Hello,
I need to trigger 2 process tasks (to copy the password to "password" and "confirm password" fields) on a change in user's password. I can name the tasks "Change User Password" and "Change User password 2" and both will be triggered but this method generates an ugly error message if I view the workflow in web console.
Is there a better way?
Thanks

It is because of execution time of both tasks. Check this
OIM Password change
And I hope your Password Updated task will get trigger on Password Field only.
You can make dependence of Change Password task over Change Confirm Password Task
One more way:
Make entry in Trigger Lookup for Change Confirm Password only.
Attach Copy Value here
In your Change user password Task attach copy value which and mapp Attribute with Process Form > PConfirm Password Field
Now you'll not face any issue but take care about mapping as I told.

Similar Messages

  • Security Violation Error while running schedule task from OIM.

    Hi All,
    I am getting this error while running a custom java schedule task from OIM:
    *Thor.API.Exceptions.tcAPIException [EJB:010160] Security Violation: User '<anonymous>' has insufficient permission to access EJB:*
    type=<ejb>,application=Xellerate,module=xlDataObjectBeans.jar,ejb=tcReconciliationoperations,method=createDeleteReconciliationEvent
    at Thor.API.Operations.tcReconciliationOperationsClient.createDeleteReconciliationEvent(UnKnown Source).
    I got this error as soon as my code start creating Delete Reconciliation Event.
    Note: I have already protected the JNDI Namespace.
    Please provide some pointers.
    Regards,
    Sunny

    Hi Rajiv,
    Check this:
    package com.centrica.iam.scheduletask;
    import java.io.BufferedReader;
    import java.io.File;
    import java.io.FileFilter;
    import java.io.FileNotFoundException;
    import java.io.FileReader;
    import java.text.SimpleDateFormat;
    import java.util.ArrayList;
    import java.util.Calendar;
    import java.util.Date;
    import java.util.HashMap;
    import java.util.Hashtable;
    import java.util.Iterator;
    import java.util.Set;
    import oracle.iam.connectors.common.ConnectorLogger;
    import com.thortech.xl.dataaccess.tcDataSet;
    import com.thortech.xl.dataaccess.tcDataSetException;
    import com.thortech.xl.dataobj.PreparedStatementUtil;
    import com.thortech.xl.orb.dataaccess.tcDataAccessException;
    import com.thortech.xl.scheduler.tasks.SchedulerBaseTask;
    import Thor.API.tcResultSet;
    import Thor.API.Exceptions.tcAPIException;
    import Thor.API.Exceptions.tcInvalidValueException;
    import Thor.API.Operations.tcLookupOperationsIntf;
    import Thor.API.Operations.tcReconciliationOperationsIntf;
    import Thor.API.Operations.tcSchedulerOperationsIntf;
    public class CustomFlatFile extends SchedulerBaseTask {
         private static tcSchedulerOperationsIntf schedulerIntf;
         private static tcLookupOperationsIntf lookupIntf;
         private static tcReconciliationOperationsIntf reconIntf;
         String sObjectName;
         String LookupName;
         String LookupName2;
         String FileDirectory;
         String FileName;
         String File;
         String delimeter;
         String isDeleteTrue;
         HashMap<String, String> attrMap = new HashMap();
         HashMap<String, String> delMap = new HashMap();
         HashMap<String, String> finalMap = new HashMap();
         ArrayList list = new ArrayList();
         public boolean isReconStopped;
         public CustomFlatFile()
              isReconStopped = false;
         public void init()
              LookupName = getAttribute("Attribute Lookup Name");
              FileDirectory = getAttribute("Directory Path");
              FileName = getAttribute("File Name");
              delimeter = getAttribute("Delimeter");
              sObjectName = getAttribute("Resource Object Name");
              isDeleteTrue = getAttribute("Is Delete Allowed");
         public void execute(){
              try {
                   System.out.println("Start Exceute");
                   //Initiate lookupIntf
                   lookupIntf = (tcLookupOperationsIntf)getUtility("Thor.API.Operations.tcLookupOperationsIntf");
                   reconIntf=(tcReconciliationOperationsIntf)getUtility("Thor.API.Operations.tcReconciliationOperationsIntf");
                   catch (tcAPIException tcapiexception){
                        tcapiexception.printStackTrace();
                        //logger.error(classname, s, tcapiexception.toString());
                        //logger.setStackTrace(tcapiexception, classname, s, tcapiexception.getMessage());
                   catch (Exception excep){
                        excep.printStackTrace();
                        //logger.error(classname, s, excep.toString());
                        //logger.setStackTrace(excep, classname, s, excep.getMessage());
                   attrMap = readLookup(LookupName);
                   System.out.println(attrMap.toString());
                   readFile();
                   if (isDeleteTrue.equalsIgnoreCase("true"))
                        performDelete();
                   System.out.println("Finish Execute");
         public void performDelete()
              System.out.println("Start Perform delete");
              int k = list.size();
              System.out.println("list size " + list.size());
              try
                   Thread.sleep(15000);
         /*     Hashtable ahashtable[] = new Hashtable[k];
              Hashtable hashtable = new Hashtable();
              for (int i=0;i<k;i++)
                   hashtable.put("User Id", list.get(i));
                   ahashtable[i] = hashtable;
                   System.out.println(list.get(i));
              Set set = reconIntf.provideDeletionDetectionData(sObjectName, ahashtable);
              System.out.println("Set--" + set.toString());
              tcResultSet tcresultset = reconIntf.getMissingAccounts(sObjectName, set);
              System.out.println("tcresultset - " + tcresultset.getRowCount());
              if (!(tcresultset.isEmpty()))
                   long l[] = reconIntf.deleteDetectedAccounts(tcresultset);
                   for (int i1=0;i1<l.length;i1++)
                        System.out.println("delete recon key " + l[i1]);
              //Get the existing list of Managed users
                   tcDataSet tcdataset = new tcDataSet();
                   tcDataSet tcdataset1 = new tcDataSet();
                   String query = "select orf.orf_fieldname,prf.prf_columnname, sdk.sdk_name from orf, sdk, pkg, tos, prf, obj " +
                             "where pkg.obj_key = obj.obj_key and pkg.pkg_key = tos.pkg_key and tos.sdk_key is not null " +
                             "and tos.sdk_key=sdk.sdk_key and tos.tos_key=prf.tos_key and prf.prf_iskey='1' and prf.orf_key=orf.orf_key " +
                             "and orf.orf_parent_orf_key is null and obj.obj_name='" + sObjectName + "'";
                   tcdataset.setQuery(getDataBase(), query);
                   tcdataset.executeQuery();
                   String FFName = tcdataset.getString("prf_columnname");
                   String FName = tcdataset.getString("sdk_name");
                   String ROFName = tcdataset.getString("orf_fieldname");
                   System.out.println("form- " + FName + " Field- " + FFName);
                   query = "select " + FFName + " from " + FName + " udtable, oiu a, ost b " +
                             "where udtable.orc_key=a.orc_key and a.ost_key=b.ost_key and b.ost_status!='Revoked'";
                   System.out.println(query);
                   tcdataset1.setQuery(getDataBase(), query);
                   tcdataset1.executeQuery();
                   int i = tcdataset1.getRowCount();
                   ArrayList list1 = new ArrayList();
                   String s1 = null;
                   System.out.println("N. of rows--" + i);
                   for (int j=0;j<i;j++)
                        tcdataset1.goToRow(j);
                        s1 = tcdataset1.getString(0);
                        System.out.println("s1---" + s1);
                        if (!(list.contains(s1)))
                             list1.add(s1);
                             System.out.println("under if--" + s1);
                   //Getting the existing list of unmanaged users
                   query = "select distinct (b.rcd_value) from rce a, rcd b, orf c, obj d where a.rce_key=b.rce_key and " +
                             "b.orf_key=c.orf_key and c.orf_fieldname='" + ROFName + "' and a.rce_status!='Event Linked' " +
                                       "and a.obj_key = d.obj_key and d.obj_name='" + sObjectName + "'";
                   tcdataset1.setQuery(getDataBase(), query);
                   tcdataset1.executeQuery();
                   i = tcdataset1.getRowCount();
                   System.out.println("No. Of Unmanaged Users " + i);
                   for (int j=0;j<i;j++)
                        tcdataset1.goToRow(j);
                        s1 = tcdataset1.getString(0);
                        System.out.println("s1---" + s1);
                        if (!(list.contains(s1)))
                             list1.add(s1);
                             System.out.println("under if--" + s1);
                   int k1 = list1.size();
                   System.out.println("list1 size--" + k1);
                   for (int j1=0;j1<k1;j1++)
                        delMap.clear();
                        delMap.put(ROFName, (String)list1.get(j1));
                        System.out.println(delMap.toString());
                        long l = reconIntf.createDeleteReconciliationEvent(sObjectName, delMap);
                        System.out.println("delete recon key--- " + l);
              catch (Exception exception)
                   exception.printStackTrace();
         public void readFile(){
              String s = "readFile()";
              //logger.setMethodStartLog(classname, s);
              HashMap map = new HashMap();
              try {
              File = getFile();
              BufferedReader reader = new BufferedReader(new FileReader(new
                        File(File)));
              String line = "";
              int k = attrMap.size();
              String value[] = new String[k];
              String Header[]= new String[k];
              if (delimeter.equalsIgnoreCase("|"))
                   delimeter = "\\" + delimeter;
                   line = reader.readLine();
                   Header = line.split(delimeter);
                   while((line = reader.readLine()) != null)
                        value = line.split(delimeter);
                        k = value.length;
                        for (int i = 0;i<k;i++){
                             finalMap.put(attrMap.get(Header), value[i]);
                        System.out.println(finalMap.toString());
                        System.out.println("Start Ignoring Event");
                        if (!(reconIntf.ignoreEvent(sObjectName, finalMap)))
                             System.out.println("Not Ignored");
                        long l1 = reconIntf.createReconciliationEvent(sObjectName, finalMap, true);
                        System.out.println("Recon Key--" + l1);
                        else
                             System.out.println("ignore event ---" + finalMap.toString());
                        list.add(finalMap.get("User Id"));
                        System.out.println(list.size() + "add--" +finalMap.get("User Id") );
                        finalMap.clear();
              catch (Exception exception)
                   exception.printStackTrace();
         public boolean stop(){
              String s = "stop()";
              //logger.setMethodStartLog(classname, s);
              //logger.info(classname, s, "Stopping Reconciliation........");
              isReconStopped = true;
              //logger.setMethodFinishLog(classname, s);
              return true;
         FileFilter fileFilter = new FileFilter()
         public boolean accept(File file)
         String sFilePath = file.getName();
         if( sFilePath.startsWith(FileName) )
         return true;
         else
         return false;
         public String getFile() throws FileNotFoundException, Exception{
              String s = "getFile()";
              //logger.setMethodStartLog(classname, s);
              String s1;
              File dir =     new File(FileDirectory);
              File[] files = dir.listFiles(fileFilter);
              if (files.length ==0)
                   throw new FileNotFoundException();
              if (files.length>1)
                   throw new Exception("Multiple Matches found for this file name");
              s1 = files[0].toString();
              //logger.setMethodFinishLog(classname, s);
              return s1;
         public HashMap readLookup(String s1){
              String s = "readLookup()";
              //logger.setMethodStartLog(classname, s);
              HashMap map = new HashMap();
              try {
              tcResultSet tc1=     lookupIntf.getLookupValues(s1);
              int i = tc1.getRowCount();
              for (int j = 0;j<i;j++){
                   tc1.goToRow(j);
                   map.put(tc1.getStringValue("Lookup Definition.Lookup Code Information.Code Key"), tc1.getStringValue("Lookup Definition.Lookup Code Information.Decode"));
              catch (tcAPIException tcapiexception){
                   tcapiexception.printStackTrace();
                   //logger.error(classname, s, tcapiexception.toString());
                   //logger.setStackTrace(tcapiexception, classname, s, tcapiexception.getMessage());
              catch (Exception excep){
                   excep.printStackTrace();
                   //logger.error(classname, s, excep.toString());
                   //logger.setStackTrace(excep, classname, s, excep.getMessage());
              return map;

  • Not able to create Schedule Task in OIM 9.1.0.2

    Hi,
    I created one Java program and created Jar file. Then placed in Schduled Task folder.
    When I try to create one Schedule Task in OIM web console, I am not able to see the Class File name in the list.
    Please let me know what could be the reason for this.
    Thansk for your help.

    In OIm Web console, there is one serach where we can serach the required class file. I am not able to see the class file in the list where as I am able to see other class files for other scheduled Tasks.
    But I am not able to see my Class file.
    When I try to paste the full class file path in Design Console, It gives an error saying No database read.
    This is very urgent for me to create the scheduled Task.
    Any idea??

  • Custom Event Notification (email) for Approval Tasks in OIM 11g

    Hi,
    how to create event notification for approval tasks in OIM 11g. I mean how to send email notification to user who sholuld accept or reject approval task?
    best
    mp
    Edited by: J23 on 2011-05-30 04:08

    Here is the documentation http://download.oracle.com/docs/cd/E21764_01/integration.1111/e10224/bp_notif.htm#SOASE548
    Search for SOA BPEL Email Notifications for more information:
    http://soa-bpel-esb.blogspot.com/2010/01/email-notification-in-bpel.html
    http://download.oracle.com/docs/cd/B31017_01/core.1013/b28764/bpel013.htm
    There are many more search links that can help you out.
    -Kevin

  • Getting INTERNAL_ERROR while updating tasks in OIM

    Hi,
    I have written a custom connector and wrote tasks to update the attributes in the target system. After the approval workflow the user got provisioned to the target system and i am able to update all the attributes like firstname,lastname etc. I have written custom target recon to reconcile all the users from the target system that also is working fine but the problm is I couldnt update any of the attibutes of the reconciled users.Im getting the following exception.Its not calling the task itself
    Please help me to solve this issue
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Running ISADAM
    Target Class = java.lang.String
    Running Get Attribute Map
    Running Set Attributes
    <Nov 25, 2010 8:00:06 AM CST> <Warning> <Socket> <BEA-000450> <Socket 12 internal data record unavailable (probable closure d
    ue idle timeout), event received 17>
    com.thortech.xl.dataobj.util.tcAdapterTaskException: INTERNAL_ERROR
    at com.thortech.xl.adapterfactory.events.tcAdpEvent.getRunTimeValue(Unknown Source)
    at com.thortech.xl.adapterfactory.events.tcAdpEvent.getRunTimeValue(Unknown Source)
    at com.thortech.xl.adapterGlue.ScheduleItemEvents.adpLNMODIFYUSER.implementation(adpLNMODIFYUSER.java:73)
    at com.thortech.xl.client.events.tcBaseEvent.run(Unknown Source)
    at com.thortech.xl.dataobj.tcDataObj.runEvent(Unknown Source)
    at com.thortech.xl.dataobj.tcScheduleItem.runMilestoneEvent(Unknown Source)
    at com.thortech.xl.dataobj.tcScheduleItem.eventPostInsert(Unknown Source)
    at com.thortech.xl.dataobj.tcDataObj.insert(Unknown Source)
    at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
    at com.thortech.xl.dataobj.tcOrderItemInfo.eventPostUpdate(Unknown Source)
    at com.thortech.xl.dataobj.tcDataObj.update(Unknown Source)
    at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
    at com.thortech.xl.dataobj.tcTableDataObj.save(Unknown Source)
    at com.thortech.xl.ejb.beansimpl.tcFormInstanceOperationsBean.setProcessFormData(Unknown Source)
    at com.thortech.xl.ejb.beansimpl.tcFormInstanceOperationsBean.setProcessFormData(Unknown Source)
    at com.thortech.xl.ejb.beans.tcFormInstanceOperationsSession.setProcessFormData(Unknown Source)
    at com.thortech.xl.ejb.beans.tcFormInstanceOperations_2j82mm_EOImpl.setProcessFormData(tcFormInstanceOperations_2j82m
    m_EOImpl.java:472)
    at Thor.API.Operations.tcFormInstanceOperationsClient.setProcessFormData(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at Thor.API.Base.SecurityInvocationHandler$1.run(Unknown Source)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    at weblogic.security.Security.runAs(Security.java:41)
    at Thor.API.Security.LoginHandler.weblogicLoginSession.runAs(Unknown Source)
    at Thor.API.Base.SecurityInvocationHandler.invoke(Unknown Source)
    at $Proxy67.setProcessFormData(Unknown Source)
    at com.thortech.xl.webclient.actions.UserDefinedFormAction.editForm(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    Thanks

    I want to update the attributes for eg password of the reconciled users from the OIMI assume that you talking about Target only.
    Do you wanna say that you have reconciled one account in OIM but when you change password in OIM tehn that password doesn't get updated in target resource.
    Have you configures Change User Password task and does you have entry for the same task in Trigger lookup ?
    What are the steps you following for testing your scenario ?

  • Assignment task in OIM 11.1.1.3

    System:
    RHEL 5 (64-bit)
    OIM 11.1.1.3.0.2
    JDK - Sun 1.6.0_21+
    DB - Oracle 11.2.0.1+
    Application Server - Oracle Weblogic Server 11gR1 (10.3.3)
    Problem:
    Can’t assign task on my process form to anyone. I was testing my AD resource and I usually did the following actions: through Design Console in “AD User” process definition I edit default assignment rule for “Create user” task (also I tried to create my own rule but result was the same). I change “target type” column to “user” and choose some user on “user” column (also I tried to assign task to some group but result was the same). After provisioning resource to some user “create user” task is assigned to XELSYSADM user passing the configuration I’ve made before.

    Did you set the organization, before approving the Task. The Approver needs to specify an OIM organization in which to create a user.
    Regards,
    Sanjay Sadarangani

  • USR_PROCESS_TRIGGERS or Response Tasks in OIM 9.1.0.2 seem inconsistent

    We have a scenario where an existing user is updated through trusted recon. The particular update needs to fire several unrelated adapters. For example, when a user is terminated in good standing in HR, they are given a grace period during which their resources will be disabled and at the end of the grace period their OIM account is disabled.
    So - USR_UDF_USR_HR_STATUS needs to fire:
    -Adapter to set deprovision date to 30 days
    -Adapter to block the user from their desktop (Active Directory resource)
    -Adapter to update OID attributes
    When we went live with OIM 9.1.0.2 BP 04, we put multiple rows in the Lookup.USR_PROCESS_TRIGGERS like:
    USR_UDF_USR_HR_STATUS -> Update HR Deprov Desktop
    USR_UDF_USR_HR_STATUS -> Update HR Set Deprov Date
    USR_UDF_USR_HR_STATUS -> Update HR Remove OID Attr
    Each adapter was appropriately configured in Process Tasks. This seemed to work fine. We have been up for 18 months and are now on BP 11. Now we see that occassionally one of the adapters does not seem to fire at all. When we go through debug logs in production, there is no mention of the adapter that did not fire.
    We found something in support.oracle.com that said that we should only have one adapter listed in Lookup.USR_PROCESS_TRIGGERS and the rest of the adapters should be Response Tasks (in the Process Task Definition). We have tried this but it still behaves inconsistently. So on the Process Task Integration, we now have adpHRDeprovDesktop and on Responses C - Two Tasks to Assign - Update HR Set Deprov Date and Update HR Remove OID Attr.
    But we still are not seeing correct results. In one recent case the adapter that did not fire was the one on Integration which makes no sense as to how the Tasks to Assign even ran.
    Have you seen this? What suggestions might you have?
    Thanks so much.

    You should not change the password through any means other than the APIs provided by the product. Doing any other way will only cause you a huge problem in the future if you do something wrong, or if you seek support on an issue around it.
    If you are not able to login, you can use the privateKey authentication while on the server and running the APIs. This will let you authenticate without supplying the password and perform any functions necessary.
    -Kevin

  • 'No Details' error when tying to appen approval task from oim page -11GR2

    Hi all,
    I am using RequestService service of oim API for triggering Remove Role request. Request is being triggered succesfuly, and approval task is being assigned to the right person. But when I try to open the task I get 'No Details Available For the Task' message in apopup. I tried to open it from the worklist application but there is the same error. What may be wrong? Any Help is strongly appreciated...
    Code snipped I use is below:
    OIMApiHelper helper = new OIMApiHelper();
    User user = helper.findUserByReconKey(userReconKey);
    String userKey =user.getEntityId();
    RoleManager roleManager = Platform.getService(RoleManager.class);
    RequestData requestData = new RequestData();
    RequestService reqsrvc = Platform.getService(RequestService.class);
    requestData.setJustification(" Remove Roles");
    ArrayList<RequestBeneficiaryEntity> entities = new ArrayList<RequestBeneficiaryEntity>();
    List<Role> userRoles = roleManager.getUserMemberships(userKey,true);
    for(int i=0; userRoles!=null && i<userRoles.size();i++){
    Role role = userRoles.get(i);
    String roleKey = role.getEntityId();
    String roleName = role.getName();
    if(roleName.endsWith("ALL USERS")){
    continue;
    log.info("Benificiary Key (Role ID) ->"+roleKey);
    log.info("Benificiary Name (Role Name) ->"+roleName);
    RequestBeneficiaryEntity ent1 = new RequestBeneficiaryEntity();
    ent1.setRequestEntityType(oracle.iam.platform.utils.vo.OIMType.Role);
    ent1.setOperation(RequestConstants.MODEL_REMOVE_ROLES_OPERATION);
    ent1.setEntitySubType(roleName);
    ent1.setEntityKey(roleKey);
    entities.add(ent1);
    if(entities.size()==0){
    return;
    Beneficiary beneficiary = new Beneficiary();
    beneficiary.setBeneficiaryKey(userKey);
    beneficiary.setBeneficiaryType(Beneficiary.USER_BENEFICIARY);
    beneficiary.setTargetEntities(entities);
    List<Beneficiary> beneficiaries = new ArrayList<Beneficiary>();
    beneficiaries.add(beneficiary);
    requestData.setBeneficiaries(beneficiaries);
    //submit request
    String reqId = reqsrvc.submitRequest(requestData);
    BR,
    Aliye

    He is talking about the configuration which you did at the time of OIM Installation.
    Verify:
    Login into EM > System Mbean Browser > Application Defined Mbean > oracle.iam > oim_server1 > oim >Config > XML Config.Discovery > Discovery

  • Approval Task Title -OIM 11g R2

    Hi,
    How can we pull data related to resource being requested, UDFs as part of the Approval task title in SOA composite?
    Thanks.

    Follow below document to know more about OIM 11g Approval (It's for OIM 11g R1) or you can also follow OIM 11g R2 Developer's Guide:
    http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/oim/oim_11g/Request_Workflow_for_Self_Registration/request_workflow_for_self_registration.htm

  • OIM Cannot uncomplete a completed task. OIM User Enable

    Hey Guys,
    I try to Enabled a Disabled user using the OIM user interface.
    When doing it I have an error coming back:
    DOBJ.SCHTM_INVALID_COMPLETED_CHANGE
    Cannot uncomplete a completed task.
    The logs shows:
    ERROR,08 Mar 2011 13:28:45,806,[XELLERATE.ADAPTERS],Class/Method: tcAdpEvent/updateDataSetValuePost encounter some problems: Adapter Execution Error: updateDataObjFieldValuePost: error updating usr_disabled
    ERROR,08 Mar 2011 13:28:45,807,[XELLERATE.ADAPTERS],Class/Method: tcAdpEvent/updateUserInfo encounter some problems: Adapter Execution Error: error updating Disabled
    Any idea where this can come from ?

    Hi
    If you will simply disable or enable user on OIM user profile, it won't give any error, if it is not attached with any resource object.
    I think, provisioning process has been attached with this user and you are going to enable, and one of the resource object is already enabled or data inconsistent.
    Will you provide user details for resource object and code?

  • Create new schedule task using OIM API

    Hello,
    Steps for setting up eclipse :
    1)Create a new JAVA project.
    2)Right click on your newly created JAVA project & select properties.
    3)In Properties window select JavaBuildPath & select libraries tab.
    4)Click on AddExternalJar's button & add jar files from lib,ext folders of OIM client installation.
    5)Click OK.
    CODE<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<package oimscheduler;
    import java.util.HashMap;
    import java.util.Hashtable;
    import javax.naming.Context;
    import Thor.API.Operations.tcUserOperationsIntf;
    import Thor.API.Exceptions.tcAPIException;
    import Thor.API.Exceptions.tcChallengeNotSetException;
    import Thor.API.Exceptions.tcLoginAttemptsExceededException;
    import Thor.API.Exceptions.tcPasswordResetAttemptsExceededException;
    import Thor.API.Exceptions.tcUserAccountDisabledException;
    import Thor.API.Exceptions.tcUserAccountInvalidException;
    import Thor.API.Exceptions.tcUserAlreadyLoggedInException;
    import Thor.API.tcUtilityFactory;
    import com.thortech.xl.scheduler.tasks.SchedulerBaseTask;
    import com.thortech.xl.util.config.ConfigurationClient;
    public class Scheduler extends SchedulerBaseTask
         tcUtilityFactory ioUtilityFactory = null;
         @Override
         protected void execute()
              try
                   System.out.println("Executing Scheduler.....");
                   createConnection();
                   createUser();
                   System.out.println("Back In execute fn !!!");
              catch(Exception e)
                   System.out.println("Error In execute : "+e.toString());
         public void createConnection()
              try
                   System.setProperty("XL.HomeDir","D:\\Oracle\\OIM\\xellerate");
                   System.setProperty("java.security.policy","D:\\Oracle\\OIM\\xellerate\\config\\xl.policy");
                   System.setProperty("java.security.auth.login.config","D:\\Oracle\\OIM\\xellerate\\config\\authwl.conf");
                   System.setProperty("java.naming.provider.url","t3://localhost:7001 ");
                   System.out.println("Setting Configurations .....");
                   System.out.println("Starting .....");
                   ConfigurationClient.ComplexSetting config =
                   ConfigurationClient.getComplexSettingByPath("Discovery.CoreServer");
                   System.out.println("Login...");
                   Hashtable env = config.getAllSettings();
                   env.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
                   env.put("java.naming.provider.url","t3://localhost:7001");
                   ioUtilityFactory = new tcUtilityFactory(env,"xelsysadm","abcd1234");
              catch(tcAPIException ae)
                   System.out.println("Error In createConnection:tcAPIException "+ae.toString());
              catch(tcChallengeNotSetException cnse)
                   System.out.println("Error In createConnection:tcChallengeNotSetException "+cnse.toString());
              catch(tcLoginAttemptsExceededException laee)
                   System.out.println("Error In createConnection:tcLoginAttemptsExceededException "+laee.toString());
              catch(tcPasswordResetAttemptsExceededException praee)
                   System.out.println("Error In createConnection:tcPasswordResetAttemptsExceededException "+praee.toString());
    catch(tcUserAccountDisabledException uade)
         System.out.println("Error In createConnection:tcUserAccountDisabledException "+uade.toString());
    catch(tcUserAccountInvalidException uaie)
         System.out.println("Error In createConnection:tcUserAccountInvalidException "+uaie.toString());
    catch(tcUserAlreadyLoggedInException uale)
         System.out.println("Error In createConnection:tcUserAlreadyLoggedInException "+uale.toString());
              catch(Exception e)
                   System.out.println("Error In createConnection:Exception "+e.toString());
         public void createUser()
              System.out.println("<<< In createUser Fn >>>");
              try
                   tcUserOperationsIntf moUserUtility = (tcUserOperationsIntf)ioUtilityFactory.getUtility("Thor.API.Operations.tcUserOperationsIntf");
                   HashMap user = new HashMap();
                   user.put("Users.User ID","OIM-API-SCH");
                   user.put("Users.First Name","Oracle-SCH");
                   user.put("Users.Middle Name","JAVA-SCH");
                   user.put("Users.Last Name","SUN-SCH");
                   user.put("Organizations.Key","1");
                   user.put("Users.Role","Full-Time");
                   user.put("Users.Xellerate Type","End-User");
                   user.put("Users.Password","password");
                   long l = moUserUtility.createUser(user);
                   System.out.println("CreatingUser Done.....");
              catch(tcAPIException ae)
                   System.out.println("Error In createUser:tcAPIException "+ae.toString());
              catch(Exception e)
                   System.out.println("Error In createUser:Exception "+e.toString());
    After writing above code ,we have to create jar file.
    Steps To Be Follwed In OIM Design Console
    1)Copy jar file in ScheduleTask folder of your OIM server installation.
    2)Expand administration tree & select TaskScheduler.
    3)Create new task & in class name textfield we have to mention package.classname & mention appropriate values in other textfields & execute it.
    4)Check output.

    We need to override 2 methods while extending from SchedulerBaseTask i.e
    init() :- this method is run before execute by the scheduler .
    execute() :- is executed by the scheduler.
    Revised code :-
    package oimscheduler;
    import java.util.HashMap;
    import Thor.API.Operations.tcUserOperationsIntf;
    import Thor.API.Exceptions.tcAPIException;
    import com.thortech.xl.scheduler.tasks.SchedulerBaseTask;
    public class Scheduler extends SchedulerBaseTask
         tcUserOperationsIntf moUserUtility = null;
         @Override
         public void init()
              try
                   System.out.println("In Init");
                   moUserUtility = (tcUserOperationsIntf) this.getUtility("Thor.API.Operations.tcUserOperationsIntf");
              catch (tcAPIException e)
                   e.printStackTrace();
         protected void execute()
              try
                   System.out.println("Executing Scheduler.....");
                   createUser();
                   System.out.println("Back In execute fn !!!");
              catch(Exception e)
                   System.out.println("Error In execute : "+e.toString());
         public void createUser()
              System.out.println("<<< In createUser Fn >>>");
              try
                   HashMap user = new HashMap();
                   user.put("Users.User ID","OIM-API-SCH1");
                   user.put("Users.First Name","Oracle-SCH1");
                   user.put("Users.Middle Name","JAVA-SCH1");
                   user.put("Users.Last Name","SUN-SCH1");
                   user.put("Organizations.Key","1");
                   user.put("Users.Role","Full-Time");
                   user.put("Users.Xellerate Type","End-User");
                   user.put("Users.Password","password");
                   long l = moUserUtility.createUser(user);
                   System.out.println("CreatingUser Done.....");
              catch(tcAPIException ae)
                   System.out.println("Error In createUser:tcAPIException "+ae.toString());
              catch(Exception e)
                   System.out.println("Error In createUser:Exception "+e.toString());
    Edited by: Rahul Shah on Jul 11, 2011 4:16 AM

  • Error creating a role from the process task adapter - OIM 11g R2 PS1

    I have a requirement to create an OIM role dynamically when a resource account is created. Also once the role is created, I need to assign that role to the user dynamically. Following code works perfectly fine if I replace the Platform with OIMClient and run it remotely. It fails when I run it from OIM:
    Exception:
    An exception occurred while performing the operation.
    java.lang.NullPointerException
    at oracle.iam.request.impl.RequestEngine.startOrchestrationFromPreProcess(RequestEngine.java:5516)
    at oracle.iam.request.impl.RequestEngine.triggerOperation(RequestEngine.java:5439)
    at oracle.iam.request.impl.RequestEngine.doOperation(RequestEngine.java:5154)
    at oracle.iam.impl.OIMServiceImpl.doOperation(OIMServiceImpl.java:43)
    at sun.reflect.GeneratedMethodAccessor6238.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
    at oracle.iam.platform.utils.DMSMethodInterceptor.invoke(DMSMethodInterceptor.java:25)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
    at com.sun.proxy.$Proxy943.doOperation(Unknown Source)
    public static User searchUserByLogin(String login) {
            List<User> users = null;
            Set<String> retAttrs = new HashSet<String>();
            retAttrs.add(UserManagerConstants.AttributeName.USER_KEY.getId());
            SearchCriteria criteria;
            criteria = new SearchCriteria(UserManagerConstants.AttributeName.USER_LOGIN.getId(), login, SearchCriteria.Operator.EQUAL);
            try {
                UserManager userManager = Platform.getService(UserManager.class);
              users = userManager.search(criteria, retAttrs, null);
            } catch (AccessDeniedException ade) {
                // handle exception
            } catch (UserSearchException use) {
                // handle exception
            if (users.size() > 0) {
                return users.get(0);
            } else {
                return null;
        public static boolean grantRole(String usrLogin, String roleKey) throws oracle.iam.platform.authz.exception.AccessDeniedException, UserMembershipException, ValidationFailedException, RoleGrantException {
            RoleManager roleMgr = (RoleManager) Platform.getService(RoleManager.class);      
            adpLogger.debug("Entering grantRole(1): User - " + usrLogin + " Role - " + roleKey);
            Set userKeys = new HashSet();
            User user = searchUserByLogin(usrLogin);
            userKeys.add(user.getEntityId());
            if (!roleMgr.isRoleGranted(roleKey, user.getEntityId(), false)) {
                RoleManagerResult result = roleMgr.grantRole(roleKey, userKeys);
                adpLogger.debug("Role granted " + result.getStatus());
            } else {
                adpLogger.debug("Role is already granted");
            return true;
        public static String createOrUpdateRole(String usrLogin, String roleName) throws oracle.iam.platform.authz.exception.AccessDeniedException, RoleSearchException, ValidationFailedException, RoleAlreadyExistsException, RoleCreateException, RoleGrantException, UserMembershipException {
            adpLogger.debug("Entering createOrUpdateRole(1) Role " + roleName);
            RoleManager roleMgr = (RoleManager) Platform.getService(RoleManager.class);
            SearchCriteria criteria;
            criteria = new SearchCriteria(RoleManagerConstants.ROLE_NAME, roleName, SearchCriteria.Operator.EQUAL);
            Set<String> ret = new HashSet<String>();
            User user = searchUserByLogin(usrLogin);
            List<Role> roles = new ArrayList<Role>();
            roles = roleMgr.search(criteria, ret, null);
            String grpKey = "";
            if (roles.size() > 0) {
                adpLogger.debug("Role already exists. Role ID " + roles.get(0).getEntityId());
                grpKey = roles.get(0).getEntityId();
            } else {
                Role role = new Role(new HashMap());
                role.setName(roleName);
                RoleManagerResult result = roleMgr.create(role);
                adpLogger.debug("Role created with ID " + result.getEntityId());
                grpKey = result.getEntityId();
            return grpKey;
    It fails at             RoleManagerResult result = roleMgr.create(role); line in createOrUpdateRole() method.
    Has anyone ever run into this kind of issue?
    Thanks

    Can you please try after making organization for a particular role and user are same ?
    For new role creation publish the particular group to organization.
    Regards
    Shashank k

  • How to trigger tasks which created during Event was inactive in WORKFLOW

    Hello Experts
    We  have a custom application with L+1 approval required for approval using workflow.
    There  was a publish for a nomination for team , Team has logged in registered for the published training.
    Unfortunately, all my team mebers 5 of 7 were already applied for nomination.
    The team was waiting for my approval, Finally we discovered - The tasks got deactivated;
    We discovered that The Triggering Events that  are deactivated
    Txn --> PFTC_DIS
    ...............Task Type : Selected ( Workflow Template)
    ...............Task : 9N000NNN  
    ...............Click : Display
    ...............Click : TAB : Triggering Events
    ..........................Found here ...The Tasks are deactivated ....................
    To activate "deactivated Events
    Txn --> SE37
    .................Function Module : SWE_EVENT_REC_TYPE_ENABLE
    ................Hit : Execute
    Filled in Screen   ;  CLINET : NNN
                                   OBHTYPE : ABCD ( What i have seen in Triggering Events Tab)
                                   RECTYPE : WS9N000NNN  
                                   EVENT : EVENTNAME ( What i have seen in Triggering Events Tab)
    ................Hit : Execute
    Once i do & if i check again in PFTC_DIS it is showing green & Event got activated
    after event is active
    The other 2 Members later raised & had come approval.
    ...as it is custom application we are storing who registered for it.
    Now I see the other 5 members entries in my table
    How can create Tasks to flow these workflow task for my approval which were created during event was inactive
    may slightly confusing, I am also early bird on WORKFLOW.
    if any one give a clue will be greatful
    Rgds
    PR

    Hello Srinivas !
             You've stated as follows :
    How can create Tasks to flow these workflow task for my approval which were created during event was inactive.
    Hope you wanted to state that users have registered nomination when the event was inactive( and thus workflow didn't get triggered) and now you want those nominations should be routed via workflow.
    The solution is to use SWUE transaction and re-create the event.In doing so, please be noted that the time at when nomination was registered(when the event was inactive) and time at when workflow triggered from SWUE would be too different.So, discuss with your team before doing so.
    Regards,
    S.Suresh.

  • Retry failed task through OIM API

    Hi everyone,
    I am trying to retry a failed task of particular resource. Can some one throw some light on how to do this?
    Thanks,
    Ani

    Assuming there is only one instance of the task for an individual user, you could do something like this:
                   tcProvisioningOperationsIntf provIntf = (tcProvisioningOperationsIntf) ioUtilityFactory.getUtility(tcProvisioningOperationsIntf.class.getName());
                   Map map = new HashMap();
                   map.put("Process Definition.Tasks.Task Name", "Rejcted Task Name");
                   map.put("Objects.Name", "Resource Object Name");
                   String[] statuses = {"Rejected"};
                   tcResultSet set = provIntf.getAssignedProvisioningTasks(1, map, statuses);
    This will return all rejected tasks, with task name, for resource object, assigned to Xelsysadm.
    9.1.0.2 also has the API
    findAllOpenProvisioningTasks
    Thor.API.tcResultSet findAllOpenProvisioningTasks(java.util.Map attributeList,
    java.lang.String[] statuses)
    throws Thor.API.Exceptions.tcAPIException,
    tcAPIException
    You could test out these options. Then task the task key from the result set and use the retryTask API.
    -Kevin
    +(Don't forget the points where deserved)+

  • Is it possible to trigger task in background on New Call received in windows phone??

    I have started to development windows phone 8 app.
    I am finding the event trigger to the phone which will execute when new call is received.
    Thanks for the help

    Hi Divyesh,
    Unfortunately, currently there is no such API to allow us to capture incoming call, it's for protecting user privacy.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

Maybe you are looking for

  • BBM issue faced on Z10. HELP NEEDED

    There seems to be a problem with my BBM feature. I cant seem to bbm with just ONE contact. I can receive pings from him but when I ping or text him, I get a red cross by the side. His contact picture shows up on my device but my contact picture does

  • Screen is faulty and fuzzy.

    Ive had my 4th gen nano for some time and in that time the screen has gone fuzzy a few times as in diagonal serrated lines across the screen making it difficult to see what Im doing. In the past simple manual resets would fix this, then I had to use

  • Discoverer reports in portlet

    Hi All! Will anyone help me to solve the following problem? There are several Discoverer reports based on database records. It's necessary to put them in a single portlet. I've tried to create a portlet provider and URL portlet, but there is the requ

  • Copying Layers/ Repeating Animation

    Ok, I'm not sure how to explain this: Basically I have a 12 second animation which consists of 9 layers, a mask, some pictures and text. What I want to do is repeat the same animation over and over again using different text and pictures. I assumed I

  • Plz help my phone E50 is not starting due to softw...

    plz help my phone E50 is not starting due to software update it just blinks Screen & go off.... when 2 min. left for completing the update it goes off & now its not starting... Plz help is it repairable? Thanks Usman Khan