Export Service
The Export service automates exporting resources from the application.
The following table provides an overview of the Export service:
Category | Description |
---|---|
System name | ExportService |
Graphical Process Modeler (GPM) category | All Services |
Description | The Export service automates exporting resources
from the application. You specify the resources to be exported and
the various options in the Export service input XML file. Alternatively,
you can specify a resource tag (which defines all the resources to
be exported) in the input XML file. Resource tags can be created using
the Admin Console. See Using Proper Syntax for syntax information.
You can export resources to an XML file or to an installable bundle.
If you want to export resources to be used on a new installation of
your application, use an installable bundle. You can then load the
installable bundle as part of the new system installation. See Using
Proper Syntax for syntax information. The input XML file can also
be used to specify the export type: standard or advanced.
|
Business usage | The Export service can be used with the scheduler to automate the process of exporting application resources. You define the resources to be exported in an XML file. |
Usage example | The Export service is typically used in the following
situations:
|
Preconfigured? | No |
Requires third party files? | No |
Platform availability | All supported platforms for your application |
Related services | Import service |
Application requirements | None |
Initiates business processes? | No |
Invocation | Generally, this service is invoked by the Scheduler. |
Business process context considerations | None |
Returned status values | Success –Successfully exported Error –there
are two basic errors:
|
Restrictions | None |
Persistence level | Full |
Testing considerations | Use the Export option from the Deployment > Resource Manager menu to export a set of resources. Save the status report from that export. Next, use the Export service to export the same set of resources. Compare the status reports for the two exports to determine if the Export service is successfully exporting all of the resources you specified. |
How the Export Service Works
The Export service works based on an XML input file that you create. The input file must contain the context and identity values from a security context (only if trading partner identities are included), whether or not to export information based on resource tags, the resource tags or names, the output type (XML or installable bundle), and the export type (standard or advanced). It can contain much more information, however. There are many parameters and expressions that can be used to select just the resources you want. See Regular Expressions and Options for more information.
Example Business Scenario
- Create a resource tag (Supplier_Update) that will contain the
trading partner profile and the service configuration.
From the Deployment menu, select Resource Manager > Resource Tags > New Resource Tag. Select the resources to associate.
- Create a security context for this export operation:
install_dir\bin>securityContext.sh set Suppliers dec01 leopard
See Using the Security Context Utility .
- Create a well-formed XML file to be used as input for the Export
service. To test that the XML file is well-formed, open the file with
Internet Explorer. Internet Explorer will open an XML file only if
it is well-formed:
<?xml version="1.0"?> <ExportConfiguration> <OutputFormatType>XML Document</OutputFormatType> <ExportResourcesBasedOnTagName>Yes</ ExportResourcesBasedOnTagName> <Tags> <Tag Name="Supplier_Update" /> </Tags> <ExportType>Standard</ExportType> <Passphrase> <SecurityContext>Suppliers</SecurityContext> <SecurityIdentity>dec01</SecurityIdentity> <ExportCertificate>Yes</ExportCertificate> </Passphrase> </ExportConfiguration>
- Create an Export service configuration and a File System adapter configuration to use in your business process. In the File System adapter configuration, specify the extraction folder (where the File system adapter will place the export file at the end of the business process).
- Create a business process to export the files. The Export service
and File System adapter will be used to export the resources and then
extract the export file to a location on your system:
To enter the information for the Security context, click Advanced and add two entries, Context and Identity. Enter the values for each from the security context you created earlier:
Use the File System adapter configuration you created earlier in this business process. Select Extraction as the action in the GPM:
Implementing the Export Service
- Identify the resources to be exported. If there are several types
of resources (maps, services, trading partner information, for example),
you can create a resource tag that includes all of the resources.
For a list of resources that can be exported, see Resources That Can Be Exported .
- Create a security context and passphrase for this export operation, if required for the type of data you are exporting. For information, see Using the Security Context Utility .
- Create an XML file to use as input for the Export service. This file defines the resources and type of export. For information, see Creating an Input XML File.
- Create an Export service configuration. See Managing Services and Adapters.
- If you want to have the export file placed in a folder on your system, create a File System adapter configuration. Specify the folder to which the file should be extracted. For XML output, specify .xml as the file extension.
- Use the Export service and File System adapter in a business process.
Example Input XML Files
The following examples show how an XML file can be used as input for the Export service. The first example illustrates using resource tags; the second example illustrates using resource names.
Example 1–Using Resource Tags
An easy way to create an export file is to create resource tags in the Admin Console and write an input file that refers to them. The file can include one or more resource tags. This example exports all the resources identified by two tags:
<?xml version="1.0"?>
<ExportConfiguration>
<OutputFormatType>XML Document</OutputFormatType>
<ExportResourcesBasedOnTagName>Yes</ExportResourcesBasedOnTagName>
<Tags>
<Tag Name="bp1"/>
<Tag Name="maps1"/>
</Tags>
<ExportType>Standard</ExportType>
<Passphrase>
<SecurityContext>secret1</SecurityContext>
<SecurityIdentity>secret2</SecurityIdentity>
<ExportCertificate>Yes</ExportCertificate>
</Passphrase>
</ExportConfiguration>
Example 2–Using Resource Names
The following example specifies that resource names are used, rather than resource tags, and uses inclusions and exclusions to customize the data selected for the export:
<?xml version="1.0" ?>
<ExportConfiguration>
<OutputFormatType>XML Document</OutputFormatType>
<ExportResourcesBasedOnTagName>No</ExportResourcesBasedOnTagName>
<ExportType>Standard</ExportType>
<Resources>
<Resource>
<Name>Code Lists</Name>
<PatternSet>
<include>*</include>
</PatternSet>
</Resource>
</Resources>
<Passphrase>
<SecurityContext>Suppliers</SecurityContext>
<SecurityIdentity>dec01</SecurityIdentity>
<ExportCertificate>Yes</ExportCertificate>
</Passphrase>
</ExportConfiguration>
Using the Security Context Utility
- Trading Partner Identities
- Trading Partner Envelopes
- PGP profiles
- Service configurations
- Communities
- Certain SSH resources: Host Identity Keys, User Identity Keys, and SSH Remote Profiles
- Web services
- Security tokens
- Proxy netmaps
- System digital certificates
The Export service works with the Security Context utility in the application. The utility is called securityContext.sh (for Unix) or securityContext.cmd (for Windows). It is located in the bin directory of your application installation. The security context utility can be used to store the passphrase and to retrieve it. The security context and security identity values are used to retrieve the associated passphrase. The passphrase is used to encrypt sensitive information (such as trading partner identities) in the export file.
- Context = CompanyA
- Identity = Apr15
- Passphrase = secret_phrase
When the utility is used to store the passphrase, provide the following three parameters:
securityContext.sh set CompanyA Apr15 secret_phrase
To check on the existence of a passphrase, use the following command:
securityContext.sh get CompanyA Apr15
The retrieve the list of contexts, use the following command:
securityContext.sh list_context
The context and identity need to be specified in the input XML file to direct the Export service to retrieve the appropriate passphrase from the database, as shown in the following example:
<Passphrase>
<SecurityContext>CompanyA</SecurityContext>
<SecurityIdentity>Apr15</SecurityIdentity>
<ExportCertificate>Yes</ExportCertificate>
</Passphrase>
Creating an Input XML File
In the XML files you create for input to the Export service, you can customize export operations by using the expressions and various options described in this section.
Using Proper Syntax
This section illustrates the correct syntax to use when specifying resource tags, output types and standard or advanced exports.
Use the following syntax when referencing a resource tag:
<Tags><Tag Name="Test2" /></Tags>
Use the following syntax when specifying the output type for the export:
- For Install Bundle: <OutputFormatType>Install Bundle</OutputFormatType>
- For XML Document: <OutputFormatType>XML Document</OutputFormatType>
Use the following syntax when specifying the export type:
- For Standard : <ExportType>Standard</ExportType>
The following example shows a sample standard export file:
<ExportType>Standard</ExportType> <Resources> <Resource> <Name>Maps</Name> <PatternSet include= "^acme"/> </Resource> </Resources>
- For Advanced : <ExportType>Advanced</ExportType> The following example shows an advanced export that specifies all versions of versioned resources for map names that include acme should be exported:
<ExportType>Advanced</ExportType> <Resources> <Resource> <Name>Maps</Name> <PatternSet include= "^acme"/> <AllVersions>true</AllVersions> </Resource> </Resources>
Regular Expressions
You can use regular expressions to filter and selectively export resources such as business processes, contracts, and identities.
The following example XML fragment could be used in an XML file to export all business processes whose names begin with wssd:
<Resource>
<Name>Business Process</Name>
<PatternSet include= "^wssd"></PatternSet>
</Resource>
If using multiple includes, they are handled on separate lines, as shown in this example:
<Resource>
<Name>Business Process</Name>
<PatternSet>
<include>^[a-m]</include>
<include>wssd</include>
</PatternSet>
</Resource>
The following example exports all business processes whose names begin with wssd except those whose names end with enu:
<Resource>
<Name>Business Process</Name>
<PatternSet include= "^wssd" exclude= "enu$"></PatternSet>
</Resource>
Options
You can customize exports using the options described in this section:
Characters
The following table contains the characters that you can use with the Export service:
Character | Description |
---|---|
UnicodeChar | Matches any identical unicode character |
\ | Used to quote a meta-character (like '*') |
\\ | Matches a single '\' character |
Character Classes
The following table contains the character classes that you can use with the Export service:
Class | Description |
---|---|
[abc] | Simple character class |
[a-zA-Z] | Character class with ranges |
[^abc] | Negated character class |
The following example exports all business processes whose names begin with letters A through M:
<Resource>
<Name>Business Process</Name>
<PatternSet include= "^[a-m]"></PatternSet>
</Resource>
The following example exports all business processes whose names begin with letters A through C:
<Resource>
<Name>Business Process</Name>
<PatternSet include= "^[abc]"></PatternSet>
</Resource>
Portable Operating System Interface Character Classes
The following table contains the standard Portable Operating System Interface (POSIX) character classes that you can use with the Export service:
Class | Description |
---|---|
[:alnum:] | Alphanumeric characters. |
[:alpha:] | Alphabetic characters. |
[:blank:] | Space and tab characters. |
[:cntrl:] | Control characters. |
[:digit:] | Numeric characters. |
[:graph:] | Characters that are printable and are also visible. (A space is printable, but not visible, while an `a' is both.) |
[:lower:] | Lower-case alphabetic characters. |
[:print:] | Printable characters (characters that are not control characters.) |
[:punct:] | Punctuation characters (characters that are not letter, digits, control characters, or space characters). |
[:space:] | Space characters (such as space, tab, and formfeed, to name a few). |
[:upper:] | Upper-case alphabetic characters. |
The following example exports all business processes whose names contain a numeric character:
<Resource>
<Name>Business Process</Name>
<PatternSet include= "[:digit:]"></PatternSet>
</Resource>
The following example exports all business processes whose names begin with a lower-case character:
<Resource>
<Name>Business Process</Name>
<PatternSet include= "^[:lower:]"></PatternSet>
</Resource>
Logical Operators
The following table contains the logical operators that you can use with the Export service:
Operator | Description |
---|---|
AB | Matches A followed by B |
A|B | Matches either A or B |
(A) | Used for subexpression grouping |
(?:A) | Used for subexpression clustering (similar to grouping but no backrefs) |
The following example exports all business processes whose names begin with letters E, M, or W:
<Resource>
<Name>Business Process</Name>
<PatternSet>
<include>^e|^m|^w</include>
</PatternSet>
</Resource>
If you are searching for non-ASCII characters, such as é or ìå, save the input file as UTF-8.
Resources That Can Be Exported
- Application configurations
- Business processes
- Communities
- Contracts
- Control numbers
- Code lists
- Documents
- ebXML BPSS
- ebXML CPA
- Group permissions
- Groups
- HTML files
- Identities
- Images
- Javascript files
- JSP files
- Mailbox META
- Mailbox routing
- Mailbox
- Maps
- Other files
- Perimeter servers
- Permissions
- Property files
- Schedules
- Schemas
- SCI packages
- Service configurations
- Stylesheets
- XML files
- Xslts
- User groups
- User permissions
- Users
- Web services
- WSDL