Wednesday Mar 26, 2014

OIM11gR2: Uninstall connector utility

Unlike earlier version of OIM, you can now uninstall a connecter that is installed using a connector bundle or created on an environment directly.

Note: Before deleting a connector, navigate to Resource Object and click Create Reconciliation profile before deleting connector. Otherwise you see the connector delete is unsuccessful.

The following are the steps involved in uninstalling a connector:

 1. Set up the properties file with appropriate information. Location: $OIM_HOME/bin/ConnectorUninstall.properties

2. Execute the uninstall script. Location: $OIM_HOME/bin/uninstallConnector.bat or uninstallConnector.sh

Almost all the properties on the ConnectorUninstall.properties file are explained in the OOB file. The focus here would be on ObjectType and ObjectValues properties.

If the connector is installed using a connector bundle and you wanted to uninstall it, ignore these properties.  If a connector is installed using Deployment Manager --> Import then these properties are helpful.

By providing ObjectType=Resource and ObjectValue=<Name of RO>, a few of the important connector components can be deleted.

If a connector is uninstalled using the Resource Object Name and it is value, the objects like Process Definition, Process Form, IT Resource, Application Instance are deleted. Note that the request dataset is not deleted.

Monday Nov 19, 2012

How do you test an ICF based connector using Connector Facade Standalone?

The following code helps in writing a standalone java program to test an ICF based connector. The sample code in this example takes into account an ICF based flatfile connector. It is possible to test various operations like create, update, delete, search etc... It is also possible to set values to the connector configuration parameters, add/remove attributes and their values.

public class FlatFile {

private static final java.lang.String BUNDLE_NAME = "<PACKAGE_NAME>";

//Ex: org.info.icf.flatfile

private static final java.lang.String BUNDLE_VERSION = "1.0.0";

private static final java.lang.String CONNECTOR_NAME = "org.info.icf.flatfile.FlatFileConnector";

// Name of connector class i.e. the class implemting the connector SPI operations

public ConnectorFacade getFacade() throws IOException {

ConnectorInfoManagerFactory fact = ConnectorInfoManagerFactory

.getInstance();

File bundleDirectory = new File("<BUNDLE_LOCATION>");

//Ex: /usr/oracle/connector_bundles/

URL url = IOUtil.makeURL(bundleDirectory,

"org.info.icf.flatfile-1.0.0.jar");

ConnectorInfoManager manager = fact.getLocalManager(url);

ConnectorKey key = new ConnectorKey(BUNDLE_NAME, BUNDLE_VERSION,

CONNECTOR_NAME);

ConnectorInfo info = manager.findConnectorInfo(key);

// From the ConnectorInfo object, create the default APIConfiguration.

APIConfiguration apiConfig = info.createDefaultAPIConfiguration();

// From the default APIConfiguration, retrieve the

// ConfigurationProperties.

ConfigurationProperties properties = apiConfig

.getConfigurationProperties();

// Print out what the properties are (not necessary)

List propertyNames = properties.getPropertyNames();

for (String propName : propertyNames) {

ConfigurationProperty prop = properties.getProperty(propName);

System.out.println("Property Name: " + prop.getName()

+ "\tProperty Type: " + prop.getType());

}

properties

.setPropertyValue("fileLocation",

"/usr/oracle/accounts.csv");

// Set all of the ConfigurationProperties needed by the connector.

// properties.setPropertyValue("host", FOOBAR_HOST);

// properties.setPropertyValue("adminName", FOOBAR_ADMIN);

// properties.setPropertyValue("adminPassword", FOOBAR_PASSWORD);

// properties.setPropertyValue("useSSL", false);

// Use the ConnectorFacadeFactory's newInstance() method to get a new

// connector.

ConnectorFacade connFacade = ConnectorFacadeFactory.getInstance()

.newInstance(apiConfig);

// Make sure we have set up the Configuration properly

connFacade.validate();

return connFacade;

}

public static void main(String[] args) throws IOException {

FlatFile file = new FlatFile();

ConnectorFacade cfac = file.getFacade();

Set attrSet = new HashSet();

attrSet.add(AttributeBuilder.build(Name.NAME, "Test01"));

attrSet.add(AttributeBuilder.build("FIRST_NAME", "Test_First"));

attrSet.add(AttributeBuilder.build("LAST_NAME", "Test_Last"));

//Create

Uid uid = cfac.create(ObjectClass.ACCOUNT, attrSet, null);

//Delete

Uid uidP = new Uid("Test01");

cfac.delete(ObjectClass.ACCOUNT, uidP, null);

}

}

About

OIM11gR2 Blog by NA-TAG Offshore IDAM team

Search

Categories
Archives
« July 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
  
       
Today