Version:

MarketplaceSupport

Script

Using a script for transformation allows for complex logic to be applied before sending changes to the destination. If you choose to use a script only, without attribute mappings, the transformation gets all change events sent by the capture connector. The script logic must filter out events that you do not want to process. If you use attribute mappings in conjunction with a script, a source event filter can be configured in the mappings to dictate which captured events to process.

  1. On the Main Control Panel > Global Sync tab, select the topology on the left.
  2. Select Configure next to the pipeline on the right.
  3. Select the Transformation component and choose either Script or Script and Mappings from the Transformation Type drop-down list.
  4. Expand the Script section that appears below the Transformation Type and select Edit.
  5. You can edit and test the script in the window provided. Basic validation is checked when using the script window. For more advanced script editing, you can use a Java IDE to customize scripts.
  6. After the script compiles successfully, select Save. Scripts are saved at: {RLI_HOME}\vds_server\custom\src\com\rli\scripts\fidsync\{PIPELINE_NAME}

Use a Java IDE to customize scripts

You can use our own Java IDE to customize scripts instead of using the Main Control Panel. Import the RadiantOne Custom project into your Java IDE. An example is described below using Eclipse IDE.

  1. Install Eclipse IDE for Java developers.
  2. Launch Eclipse and select File > Import. Option to Import Projects into Eclipse IDE
  3. Expand the General folder, select Existing Projects into Workspace and select Next. Option to Import Existing Projects into Workspace
  4. Select Browse next to Select Root Directory and navigate to {RLI_HOME}/vds_server/custom. Importing RadiantOne Custom Project
  5. Select Finish.
  6. Navigate below the Custom folder to src.com.rli.scripts.fidsync.{PIPELINE_NAME}. The script associated with the pipeline appears below. Double-click on the script to open it in the Eclipse IDE editor. Example Script Associated with o_ldap_sync_object_suppliers_o_hrdatabase Pipeline shown below Example Transformation Script Name
  7. Edit the script.
  8. Save the script.
  9. On the RadiantOne machine, rebuild the fidsync.jar with ANT using the following syntax: C:\radiantone\vds\vds_server\custom>c:\radiantone\vds\ant\bin\ant.bat buildjars
  10. Restart the RadiantOne service. If deployed in a cluster, restart it on all nodes.

Leverage existing Java classes

To leverage existing classes in your transformation scripts, perform the following:

  • The jar file must be copied in {RLI_HOME}/vds_server/custom/lib.
  • The class must be imported in the transformation script.
    • Example of importing the class in your transformation script:
    • import com.rli.connectors.changeevent.ChangeOperation;

Custom logging in the transformation script

The add your own log statements into the script, use the following:

log(Level.INFO, "Some message");


Test the script

When your script has been modified, you can test it by emulating changes from the source.

  1. On the Main Control Panel > Global Sync tab, select the topology on the left.
  2. Select Configure next to the pipeline on the right.
  3. Select the Transformation component and choose either Script or Script and Mappings from the Transformation Type drop-down list.
  4. Expand the Script section that appears below the Transformation Type and select Edit.
  5. Select Test.
  6. Select the source event type (e.g. INSERT, UPDATE, DELETE) to test.
  7. Enter an Event ID. This is a DN that matches the location in the RadiantOne namespace for the source entries. (e.g. uid=Aaron_Medler,ou=Accounting,o=companydirectory assuming o=companydirectory is the source naming context in RadiantOne).
  8. Add source attribute names and values. Attribute names are in the left column and corresponding value in the right column. Select in the cell, type the value and select Enter. Attribute types can be simple or complex. The definitions for "simple" and "complex" are based on SCIM (http://www.simplecloud.info/specs/draft-scim-core-schema-01.html). Use the red X button next to the attribute to remove it from the test. Example - Entering Attributes for Testing Script
  9. Select Test
  10. The results of the script logic are shown in the Output section.
  11. When you are finished testing the mappings, select CLOSE to go back to the "Configure Pipeline" screen.

IN THIS PAGE