Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
© Copyright Informatica LLC 2013, 2017. Informatica Corporation. No part of this document may be reproduced or
transmitted in any form, by any means (electronic, photocopying, recording or otherwise) without prior consent of
Informatica Corporation.
Abstract
The session object defines the run-time attributes of PowerCenter mappings. The workflow object defines the
orchestration of one or more PowerCenter sessions and other workflow tasks. This article explains how to build
PowerCenter session and workflow objects using the Mapping SDK for mappings generated by Mapping Architect for
Visio.
Supported Versions
• Informatica PowerCenter 8.6.1, 9.0.1, 9.1.0, 9.5.0, 9.5.1
Table of Contents
Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Scenario. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Configuration Tasks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Step 1. Download the Mapping SDK Sample .Zip File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Step 2. Edit and Run the Setup.bat File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Step 3. Run the Mapping SDK Sample Program. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Overview
You can use the Mapping SDK to programmatically create sessions and workflows for the multiple mappings that the
Mapping Architect for Visio generates.
You can use Mapping Architect for Visio to generate multiple mappings at one time to improve productivity and provide
consistency. After you generate mappings using Mapping Architect for Visio, you can use the Mapping SDK to create
sessions and workflows.
Scenario
You use the Mapping Architect for Visio to generate multiple mappings that have similar structure. You need to create
sessions and workflows for the generated mappings.
Use the Mapping SDK sample program to create workflows and sessions for the mappings that the Mapping Architect
for Visio generates. You can use the Mapping SDK sample program to generate an XML file of the workflows and
sessions or to import the generated XML file into the PowerCenter repository.
Configuration Tasks
Create workflow objects and session objects for the mappings using the Mapping SDK and import the session and
workflow objects into the Workflow Manager.
To implement this scenario, you must export the Mapping Architect for Visio mappings from the PowerCenter
repository. The Mapping SDK sample program uses the XML file that contains the mappings to create the
corresponding workflows and sessions.
2
Step 1. Download the Mapping SDK Sample .Zip File
The Mapping SDK sample .zip file consists of the setup.bat file, GenSession.jar file, and powrmart.dtd file.
The setup.bat file sets the environment variables that the Mapping SDK sample program requires to run. The
GenSession.jar file contains the Mapping SDK sample program to create workflow objects and session objects. When
you import repository objects, the PowerCenter Client validates the XML file against powrmart.dtd.
1. Create a folder to save the setup.bat, GenSession.jar, and the powrmart.dtd files. For example, create the
folder GenerateSession in the C drive.
2. Download the 0484-MappingSDKGenSessionSample.zip file from the following location:
https://kb.informatica.com/proddocs/Product%20Documentation/6/0484-
MappingSDKGenSessionSample.zip.
The zip file contains the setup.bat, GenSession.jar, and powrmart.dtd files.
3. Extract the contents on the zip file to the directory that you created to store the sample files.
From the command prompt, run the following command to create sessions and workflows:
C:\GenerateSession>"%JAVA_HOME%\bin\"java -classpath %CLASSPATH% GenSession.jar GenSession
3
The following table describes the Mapping SDK sample program arguments:
Argument Description
file_name Required. Specify the name of the XML file that contains the
mappings imported from the PowerCenter repository.
For example, run the following command from the command prompt to generate workflows and import the workflows
into the PowerCenter repository.
C:\GenerateSession>"%JAVA_HOME%\bin\"java -classpath %CLASSPATH% GenSession.jar GenSession 1
Staging_Pattern_Mappings.XML
Author
Muthuramalingam S
Technical Writer
Acknowledgements
The author would like to acknowledge Tarik Zaakour for his contributions to this article.