CentraSite 10.5 | CentraSite Developer's Guide | Importing Objects Using API | Invoking Importer from Java Program | Importing XPDL File
 
Importing XPDL File
 
setOrganization
SetOriginalFilename
setProductConcept
setVersion
The XPDL importer imports a process definition from an XPDL file and from the XPDL file, the importer produces a Process object and related components (for example, Process Steps, Process Pools and Process Swimlanes). If the XPDL process references a web service, the importer adds the web service to the registry if it is not already present and associate it with the Process object.
This 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 or 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 uses to
// log on to CentraSite
String user = "";
String password = "";
 
// 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 or 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.