OIM 11gR1: Add a Task to a Resource Object

Hello
I have added a new process task to a Resource Object. Task name is "Change Unique Value" on the RO. I'd like to programatically add this task to all users where the RO is either "Enabled" or "Provisioned"
I cannot seem to find an 11g API that allow me to find all resources provisioned to a user, and then find all available tasks, and add it.
Can someone please point me to the API that will allow me to add a task to an RO?
Thank you.

tcProvisioningOperationsIntf.addProcessTaskInstance(long plTaskKey, long plOrcKey)
Run this query for the task key:
select mil_key from mil where mil_name = 'Change Unique Value'
Then run the query to get the orc_key
select oiu.orc_key
from oiu, ost, obj, obi
where oiu.ost_key=ost.ost_key
and oiu.obi_key=obi.obi_key
and obi.obj_key=obj.obj_key
and obj.obj_name = :resourceName
and ost.ost_status in ('Provisioned','Enabled'))
Then use this code and put a comma seperated value of the orc_key output.
public void addProcessTask(){
long[] keys = new long[] {<COMMA_SEPERATED_ORC_KEY};
int counter = 0;
for (long key:keys){
try {
counter++;
provIntf.addProcessTaskInstance(<MIL_KEY FROM ABOVE>, key);
System.out.println(counter + "|" + keys.length);
} catch (Exception e) {
System.out.println(e.getLocalizedMessage());
System.out.println(e.getMessage());
Verify with one user first, then run the rest. It uses the tcProvisioningOperationsIntf.
-Kevin

Similar Messages

  • OIM 11g: Add process tasks as a result of a Request?

    Is it possible in OIM 11g to have the result of a Request be that 1 or more process tasks are added to an an account's process?
    The out-of-the-box Request framework seems to be very attribute driven (Modify Provisioned Resource, Self Modify Provisioned Resource), and I suppose we could add an attribute to trigger process tasks to be added, however, without going into detail, we'd really just like to be able to add the process task with no process form updates.
    Has anyone attempted anything like this?

    Sure you can.  Create a plugin on the request status:
    <plugin pluginclass="com.custom.eventhandlers.request.RequestCompleted" version="1.0" name="RequestCompleted">
    <metadata name="status">
    <value>Request Completed</value>
    </metadata>
    </plugin>
    In your code, using benEntity.getEntityKey() you can get the "Users-Object Instance For User.Key" value for the instance the request is for.  Then search the user's existing instances of that resource object type (findObjects) and match it to the "Users-Object Instance For User.Key" value from the result set.  Then get the process instance key.  From there you can use this code to get the task details:
    Map taskMap = new HashMap();
    String taskName = map.get(resourceName);
    taskMap.put("Process Definition.Tasks.Task Name",taskName);
    tcResultSet rs =  taskOper.getTaskDetail(processInstanceKey,taskMap);
    long taskKey = rs.getLongValue("Process Definition.Tasks.Key");
    And finally this code to insert the task:
    provIntf.addProcessTaskInstance(taskKey, processInstanceKey);
    And done!
    -Kevin

  • Resource Object - Add Custom Status

    Hi All,
    When I add a custom status in a resource object and map it in my process task the UI does not display it when the resource has been provisioned successfully. The resource is displayed in the User in status null. Has anyone add custom status in a resource object and use it?
    Thank you in advance,
    Kostas

    I suppose we should add the description of the new resource status in some Resource Bundle or some properties file....
    Anyone that can suggest any action...?

  • Resource Object API in OIM 11g r2

    Hi All,
    I'm new to OIM 11.1.2 and I'm working on provisioning users(trusted source) to OIM using custom code.
    In oim 9x ,tcObjectOperationsIntf is used to perform Resource object  Operations.I would like to know about Resource Object api in 11g R2
    Please help me on this.
    Regards,
    Madhu

    Resource objects in OIM11GR2 are application instances. You can refer application instance service API:
    http://docs.oracle.com/cd/E27559_01/apirefs.1112/e28159/oracle/iam/provisioning/api/ApplicationInstanceService.html
    Also, you can refer oim service api for common operations:
    http://docs.oracle.com/cd/E27559_01/apirefs.1112/e28159/oracle/iam/api/OIMService.html
    regards,
    GP

  • OIM 11gR1: Disabled Resource changes to Provisioned on modification

    Version: OIM 11gR1 BP7
    Target System: Active Directory using AD Connector 11.1.1.5.0
    In my environment, I have a user with a disabled Active Directory resource. Whenever I make changes to the user's AD resource, the status of that resource is changed to "Provisioned" even though the resource is still disabled on the target system. I know that when a resource is disabled, you cannot edit the form. I have made the modifications through the APIs or password reset button on the OIM interface (I have setup "Change Password" process task so that password is pushed out to the user's AD resources).
    I have also setup a custom icf connector and it has the same behavior as above.
    I would like to know if anyone has ran into this issue before or any insights in debugging this issue.

    Check if the task that is being triggered after user resource is disabled has mapping "C -- Provisioned". That could possibly be the reason!

  • Programmatically add an existing task assignment to resource timesheet

    hello forum members,
    I am working on code that creates tasks for a project, assigns resources to task and then adds that tasks to resources timesheets so that they could log time against it. 
    Can you anyone recommend any code samples or link references on how to add an existing task assignment to a resource timesheet?
    tatiana
    tatiana

    Hi Tatiana,
    Check following code sample (PSI):
    WebSvcTimeSheet.TimesheetDataSet dsTimeSheet = SvcTimeSheet.ReadTimeSheet(<TimesheetUID>);
    WebSvcTimeSheet.TimesheetDataSet.LinesRow newLine = dsTimeSheet.Lines.NewLinesRow();
    newLine.TS_LINE_UID = Guid.NewGuid();
    newLine.TS_UID = <TimesheetUID>;
    newLine.TS_LINE_CLASS_UID = TimesheetConst.const_StandardLineClassGuid;
    newLine.TS_LINE_VALIDATION_TYPE = (byte)TimesheetEnum.ValidationType.Unverified;
    newLine.TS_LINE_STATUS = (byte)TimesheetEnum.LineStatus.Approved;
    newLine.PROJ_UID = <ProjectUID>;
    newLine.TASK_UID = <TaskUID>;
    newLine.TS_LINE_CACHED_ASSIGN_NAME = <Task Name>;
    newLine.TS_LINE_CACHED_PROJ_NAME = <PROJ NAME>;
    newLine.SetTS_LINE_COMMENTNull();
    dsTimeSheet.Lines.AddLinesRow(newLine);
    SvcTimeSheet.PrepareTimesheetLine(<TimesheetUID>, ref dsTimeSheet, new[] { newLine.TS_LINE_UID });
    Guid jobUid = Guid.NewGuid();
    SvcTimeSheet.QueueUpdateTimesheet(jobUid, <TimesheetUID>, dsTimeSheet);
    Make sure you have the Microsoft.Office.Project.Server.Library referenced in your project.
    Hope this helps

  • API of Resource object managment - OIM 11g R2

    Hi All,
    I want to provision a resource (say 'AD User') from a post event handler (OIM 11g R2) during user creation.
    Please tell me the API to be used.
    In OIM 10g, we can use 'tcObjectOperationsIntf' interface to operate on resource objects. what API is its replace in OIM 11g R2?
    Thanks in Advance.

    Create a role and add a rule membership to that role using your custom attribute.
    Create an access policy to provision AD resource and use the role created above while creating access policy. There will be a schedule task with the name "Evaluate user access policies". Change its schedule to run for every 1 minute.
    Now, create a user who satisfies the above role membership and make sure this user got the role membership. Immediately after a minute, this new user should be provisioned to AD resource automatically.

  • AD- OIM Reconciliation with Manager as Approver of Resources

    Hi, I'm trying to setup the following scenario:
    AD->OIM Reconciliation with user's manager information. Setup the manager as the user's approver for every resource available in OIM.
    When a user gets added to the AD, he is reconciled into OIM and I have made 2 user defined fields, one to store his managers distinguished name and another to store the users - "usr_udf_man_dn" and "usr_udf_dn". This is working fine, both columns get populated on reconciliation.
    What I would like to do is assign the manager as the approver for all the resources that are requested by the user. I am thinking of populating the usr_manager_key through an sql query, by matching "usr_udf_man_dn" with "usr_udf_dn" and getting the managers "usr_key", then storing it in usr_manager_key of the user. The query is not my real problem.
    As I'm new to OIM, I don't yet know how to build the 'logic' of this process. How and where to I make the query? I'm assuming these fields can only be populated after the user has been reconciled (because there won't be any fields to do an sql query on before that). Do I use an adapter? How do I setup the approval process?
    Any feedback will be greatly appreciated :)
    Message was edited by:
    user638778

    This is very simple and infact there are 2 ways to do it:
    # 1) Create a User Process Trigger that adds on Change Event of your Manager UDF Field. This will kick in as soon as a value is put into the Manager UDF field (doesn't matter - via Recon or by hand). Then create an adapter that looks up a User in AD with the DN (your manager) and returns back a SamAccountName. Based on this returned SamAccountName, get the update the user with manager key. Attach this adapter to your process task event in Xellerate User Process Definition.
    # 2) Create an Entity adapter that does the same operation as written in #1. Attach this entity adapter to Xellerate User Update event. This is simpler. Drawback of this is that anytime you update the user (for anything - like last name change , org change etc.) - it will repeat this process of updating the user with its manager key. so any change on employee will trigger the manager update. #1 is more efficient.
    As far as the approval processes are concerned, there are 2 ways to achieve that also:
    # 1) Attach approval in the standard task and assign it to User's Manager for approval. Limitation is that you can not get rid of this in future once you go production with such a setup. You can but you might not want to.
    # 2) Individually on each approval process of each resource object, attach the approval task and assign it to User's Manager. That should do it.
    Hope this helps.
    rajnishbhatia19
    For Additional Code Snippets, you may refer to my Blog site:
    http://rajnishbhatia19.blogspot.com
    Add RSS feed to your portals (google / yahoo / whichever:)
    http://rajnishbhatia19.blogspot.com/feeds/posts/default
    Connect to me:
    http://www.linkedin.com/in/rajnishbhatia19

  • Add approval task through API call

    Hello, I am attempting to solve the following problem.
    I have a UDF defined on the Resource Objects form (OBJ table), this filed contains a comma delimited list of OIM groups which is of size n (based on the resource object).
    I would like to create an approval task for each group in this list. In addition i would like the name of each task to show up as the group name. so when a user logs into the UI and looks at the approval details the see the approval task as the group name.
    I have been able to add a task using tcProvisioningOperationsIntf.addProcessTaskInstance API however this API does not allow me to modify 1) the group to assign the request to and 2) the name of the task.
    thanks

    Hey Kevin, thanks for responding.
    This query will allow me to get the process task key, so i can be added to the approval task via. tcProvisioningOperationsIntf.addProcessTaskInstance. However the issue is, no task currently exists. So before i can add an instance of the task i have to actually create a new task. but i was un-sure how to accomplish this through api calls.
    The goal here is to allow a list of groups to be configurable at the resource level without having to modify the approval process.
    thanks

  • OIM: Is there a way to control resource groups based on OIM Admin group

    Hi,
    I have a resource+target system where we provision users and groups. My requirement is to make the group assignment/de-assignment to be based on OIM's user group of the admin. For example, admins from User Group UG1 can provision certain groups to a given user where as they cannot add/delete other groups. Similarly admins from another admin user group UG2 cannot add/delete resource groups to the same user.
    Have you come across such a requirement and if so could you please share you implemented this?
    Thanks

    The easiest way to do it is often to use a resource object for addition of groups, use request based provisioning and then include a test in the approval that checks if the raising user has the right to raise a request for that group. If not just deny the request.
    Works well and is easy to implement but may be considered a bit user unfriendly as it allows the admins to raise requests that are later auto denied.
    Best regards
    -Martin

  • How to trigger a process task on IT Resource process form

    Hi,
    I want to know how to trigger a process task on IT resource process form using OIM API.For Example:- If a task ilike an e-mail is to be sent on the departure date of a user.So,how can it be done using API?
    Thanks.

    This would typically be done through a scheduled task. Write your code to query for the departure date. If someone meets your criteria for an action to occur, you can either use the addProcessTaskInstance which has an adapter attached to it to send the email, or in your code, send the email.
    The details that need to be considered though is where the departure date is stored. Is it on a process form, or is it on the user's OIM profile. Do you want to disable the user or revoke the object instance at this departure date? You could use the notification tab of these existing tasks if so.
    -Kevin

  • User cannot add new task in a project

    Hi everyone,
    I've got a issue with Project Server 2013.
    The situation : I create a new project then, I add some resources (which are users of the AD) and I don't add new task in this project because  I want that the user creates all the task.
    But when he's in the "Task" page (PWA/Tasks.aspx) and he want to add a new task (ribbon TASKS -> Add a row -> Add a new Task), the new project is not present in the drop down "Project" , if I want that the project
    appears, I need to add a task with the user as a ressource.
    Is there any way to automatically add the project in this list without add a task for the specific resource ?
    Thanks,
    Patmol

    Hi Patmol6,
    Please note that PWA/My task is NOT INTENDED to create tasks and assign them to resources. The process to create a project plan at project initiation and to assign resources to tasks must be done:
    either in Ms Project Pro connected to your server and using enterprise resources,
    or with PWA: open your project from the project center, then navigate to the schedule page, edit the schedule, create the build team, create tasks and assign resources on tasks.
    "My task" page in PWA is meant to make tasks updates by team members.
    Hope it clarifies the process.
    Guillaume Rouyre - MBA, MCP, MCTS

  • How to Create Resource Object in OIM through SQL queries or OIM APIs

    Hello,
    I have to create few (100) resource Objects in OIM. I was creating manually through Design console one by one. In future we might need to create many more Resource Objects .It takes lot of time if we do it through Manually.
    Is there any possiblity we can create Resource Objects through SQL query or OIM APIs ???
    Thanks!!

    Yes. I do it all the time.
    If you are using 11G 11.1.1.3
    Go here
    http://fredforester.org/code/xmlstarters/
    Download the files.
    RESCFORM.xml is an example resource built from the template
    buildtemplate.sh is a shell script that creates a resource from the template
    index.php - you dont need this
    templateresource.xml - this is the template resource. it was created by building a simple resource with all its basic tasks and components then editing it and renaming things so I can find them with sed
    to create Resource C you would
    ./buildtemplate.sh RESCFORM "Resc Resource" "Resc Process"
    you would end up with a file called RESCFORM.xml where when imported would have
    UD_RESCFORM
    Resc Resource Resouce Defintion
    Resc Process Process Defition with basic tasks pointing to a dummy adapter.
    You can optionally create your own prepop so it will get assigned to the form when you import.
    Good luck

  • OIM 9.1 Pending task installing new conector

    Hello,
    I've been installed a new conector for SAP. I created a new Resource Object and some process defenition but I've two pending task in the installation:
    - Task name: Installation -- Organization: Requests
    - Task name: Enter Info into Oracle Identity Manager --- Organization: Requests
    What could be the problem? Is there a way to retry this task?
    Thanks

    You should be able to manually complete these tasks.
    -Kevin

  • How to delete old resource objects in OIM

    I'm working with OIM Version: 9.1.0.1866.70 and I've recently been told that we are not going to be using a certain resource object anymore.  I've looked and gone through the design console but I don't see any option for deleting an entire resource.  Is there even a way to delete a resource in OIM?  I can turn off self-requestable but our numerous provisioning admins will still have the ability to grant the defunct resource.  Is this available in a later version of OIM?

    Hi,
    This is a forum for discussion about application development in C/C++/Fortran. I think you want to raise your question in a forum about identity management. This one looks more promising:
    Identity Management
    Regards,
    Darryl.

Maybe you are looking for

  • IPhoto shows thumbnail for screen snapshots but no image

    My mother-in-law just got back from a several month long trip in South America.  She has thousands of photos from a camera and iPad2 which she uploaded into iPhoto on her iMac.  Almost all of the photos are fine, but she discovered that any snapshot

  • Unable to create logical port in SOAMANAGER

    Hi All, When Im tryign to create a logical port for my consumer proxy I get SRT Framework exception: HTTP: Current user does not have the required authorization to access the HTTP destination. Any clue what authrizations I need? I didnt get this erro

  • Import / Export problems

    Hi team. I have a 4.6 C version an the import / export works fine. But in the SAP ERP Central Component 5.0 I do the Export. Review the abap memory and se the areas, but empty. And when I do the import the data are clear. Do you have any idea. And i

  • How is the Idoc Message Type FIDCC1 trigger from the FI Doc

    Hi Guru, I have a FI Document which is triggered from the Material Document. And this FI Document is triggering 2 different IDOC FIDCC1 on 9.Jul and 10.Jul. I did a comparison between this 2 idocs, the data seem to be the same, so can i know how this

  • SSD Drive schedules for 2007 Mac Mini @ GHz Core 2 Duo

    I have put a 240 Gig Crucial SSD in this computer and there was a very prominent bump in usability ie no pageouts . I have a 480 Gig SanDisk Extreme II and was wondering how sensible it would be to put it into the Mac Mini . SanDisk has a limited via