Record to Record service takes inputs record by record and processes them according to the defined logic using java programming construct, and gives the output one record at a time. User can write Java logic that will be executed in this service. The Java logic has access to Record to Record script service, context of the process flow this service belongs to, input and output Stream handlers, which allow Java logic to access and manipulate input data to generate output and pass it to another service in the process flow.
Prerequisites
- Layouts service must be created before creating Record to Record Service.
Steps to create Record to Record service
Click Configure > DATA TRANSFORMATION > Record to Record.
Click Create Record to Record.
On the Create Record to Record window, enter the name and description of the new Record to Record service in the Name and Description fields.

- Enter the sample Java script as explained below to perform the desired transformation.
Template Script:
Note: the complete script is executed for each record.
context.put( "nextRecord" , "no" );
context.put( "RecordData" ,record);
while ( true )
{
try
{
String recordExist = (String)context.get( "nextRecord" );
if (recordExist.equalsIgnoreCase( "no" ))
{ Thread.sleep( 1000 ); }
else
{ break ; }
}
catch (InterruptedException e)
{ e.printStackTrace(); }
}
|
- Select input and output format as either XML or Native (non XML) from the Input Format and Output Format drop-down lists respectively.
Select the source layout service from the Schema Name (Input data) drop-down list.
Expand the Advanced Properties section and select the Project from Project drop-down list.
Click Save.