CentraSite Documentation : CentraSite Administrator’s Guide : Importing Objects Using the API : Invoking an Importer from a Java Program : Importing an XPDL File
Importing an XPDL File
 
setOrganization
SetOriginalFilename
setProductConcept
setVersion
The XPDL importer imports a process definition from an XPDL file. From the XPDL file, the importer produces a Process object and related components (e.g., Process Steps, Process Pools and Process Swimlanes). If the XPDL process references a Web service, the importer will add the Web service to the registry if it is not already present and associate it with the Process object.
The following example demonstrates how to import an XPDL file into CentraSite using the CentraSite Java API:
import com.centrasite.jaxr.JAXRAccessor;
import com.centrasite.jaxr.xpdl.ImportXPDL;
 
// Set URL for CentraSite Registry/Repository
String dbURL = "http://localhost:53307/CentraSite/CentraSite";
 
// Specify the location of the XPDL file.
String xpdlFile = "c:/temp/MyXPDL.xpdl";
 
// Specify the user account and password that the importer will use to
// log on to CentraSite
String user = "ctambrose";
String password = "jm6A1999";
 
// Build the connection to CentraSite
JAXRAccessor jaxr = new JAXRAccessor(dbURL, user, password);
 
try
{
// Instantiate XPDL importer object with specified XPDL file and
// connection info and then execute the import method.
 
ImportXPDL xpdl = new ImportXPDL(xpdlFile, jaxr);
xpdl.doImport();
}
catch (Exception e)
{
// Handle error
...
}
finally
{
// Close connection to CentraSite Registry/Repository
jaxr.close();
}
The ImportXPDL class provides the following optional setter methods that you can use to specify certain properties in the Process object. If you want to use these setter methods, you must call them before you call the doImport() method.
Copyright © 2005-2016 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback