Monday, 21 January 2019

OIM - How to Create Prepopulate Adapter for Generating Full Name(Concatenating two Strings) through Utility Task?


Login to design console and open adapter factory.

Provide required details as highlighted in below screenshot.


Create two adapter variables - "firstName and lastName" 





Create new adapter task for concatenating first name and space .


Select Utility Task and continue.


Continue...


Select below details and then save it:

API Name - java.lang.String
Constructor - public java.lang.String(java.lang.String)
Method - public java.lang.String concat(java.lang.String)

Variable Mappings:
Constructor Input  => First Name
Method Input => " "
Method Output => Return Variable


Now first task has been created.

Select first utility task and then create new task for concatenating output of first task and last name.


Select Utility Task then continue.


Continue...


Select below details and then save it:

API Name - java.lang.String
Constructor - public java.lang.String(java.lang.String)
Method - public java.lang.String concat(java.lang.String)

Variable Mappings:
Constructor Input  => Output of first task
Method Input => Last Name
Method Output => Return Variable


Build adapter.


Now we can use this adapter for generating full name.


Happy Learning!!!

OIM API - Get RoleCategory Details through RoleCategory Name.


public RoleCategory getRoleCategoryDetails(String roleCategoryName) {
final String logp = CLASS_NAME + " #getRoleCategoryDetails - ";
LOGGER.info(logp + "START");
RoleCategory roleCategory = null;
try {
RoleCategoryManager roleCategoryManager = Platform.getService(RoleCategoryManager.class);

List<RoleCategory> list = roleCategoryManager.search(new SearchCriteria(RoleManagerConstants.RoleCategoryAttributeName.NAME.getId(), roleCategoryName, SearchCriteria.Operator.EQUAL),
null, null);

if (list.size() == 1) {
roleCategory = list.get(0);
LOGGER.info("Category Name :: " + roleCategory.getName());
LOGGER.info("Category Description :: " + roleCategory.getDescription());
}
} catch (AccessDeniedException e) {
e.printStackTrace();
} catch (RoleCategorySearchException e) {
e.printStackTrace();
}
LOGGER.info(logp + "END");
return roleCategory;
}

Thursday, 10 January 2019

OIM - How to Clone OOTB Disconnected SOA Composite?

Login to OIM linux machine and go to below location:

$MW_HOME/Oracle_IDM1/server/workflows/composites




Download DisconnectedProvisioning.zip to your local machine.


Unzip it.





Open JDeveloper and Create new Application.


Provide Application Name.


Leave same project name and click on Finish.


Import OOTB Disconnected Composite as "SOA Archive into SOA Project". 

Follow below steps:

Select newly created Application.


Go to File and click on Import.


Select "SOA Archive Into SOA Project".


Provide Project Name. 


Browse and select OOTB Disconnected SOA Composite.



Change Composite Name "DisconnectedProvisioning" to some other name.


Click on Finish.


Delete "Project1" which was created with Application.




Open "Composite.xml".


Go to source.


Search for below tag and change serviceName from "DefaultManualProvADFService" to some other name and save it.

<binding.adf registryName="registryName" serviceName="DefaultManualProvADFService" />




Open "ManualProvisioningTask.task" and go to source.


Search for below tag and change "ManualProvisioningTask" to some other name and save it.

<taskDefinition targetNamespace="http://xmlns.oracle.com/DefaultProvisioningComposite/DisconnectedProvisioning/ManualProvisioningTask




We have done all configuration changes, now we can deploy newly created composite on server. 

Follow below steps for deployment:

Right click on Project and then click on deploy.


Select "Deploy to SAR"


Click Next.


Click Finish.


Jar will be created on location : <APPLICATION_NAME>/<PROJECT_NAME>/Deploy folder.


Login to EM Console(http://<HOST_NAME>:7001/em) with weblogic credential. 


Select composite jar.




Select Partition "default" and then click Next.


Click Deploy.


New Disconnected Composite is deployed successfully, now we can use it in process task.


Change Composite Name in Adapter Mapping for all below highlighted Process Task.





Happy Learning!!!