Thursday, July 21, 2011

Creating a scheduled task in OIM


While writing a custom scheduled task we will have to extend the SchedulerBaseTask and overwrite the methods init and execute. In the init method we will initialize all the schedule task attributes and other global variables. In the execute method we will write the actual logic to handle the reconciliation. Use the following to implement the ignore event:

//ignore event API we will have to pass the resource obj name and the hashmap containing the mapping b/w the field name and value pairs. This is to ignore the parent form data.
if (!this.tcReconIntf.ignoreEvent(sObjectName, hmuserAttr))

After writing the custom code we will have to tell the OIM about this. Steps to do this:

1.In the resource object reconciliation tab we will have to add the attributes to be reconciled to the resource profile form.
2.Then we will have to map them in the process definition.
3.After the mapping is done we will have to export the jar and place it in the OIM_HOME/ScheduledTasks
4. Now create a scheduled task by giving the complete class name.
5. Add the required attributes in the task and then save it. In the tasks we usually add the IT resource name from which we pick the target connection details,recon Field Mapping lookup name,etc.
6.Save the task and run it.

Thursday, July 7, 2011

Procedure to call a webservice from OIM

There are three steps for this:
 1.  From the wsdl file generate stubs automatically using eclipse or manually using the axis tools.
 2.  Now write the implementation class that will call the webservice.
 3. Now map the implementation class/method with the OIM adapter.

Attached are the screen shots for better understanding.




Right Click on the wsdl File --->Web Services--->Generate Client. After generating the client stubs it looks like the one below.






On finish you will get the source into the src folder as shown below:


Create a new class as follows :


Using the proxy class that is auto-generated call the required methods after initializing it.


Thats all it requires to call a webservice!!!!
Now this implementation class can be attached to the OIM adapter as usual.