HP Structured Records Management Solution Tutorial, August 2011

HP Structured Records Management Solution
Tutorial 35
Substitution path specifications for archive files
In the SRMS Loader call in your Groovy script, a path specification indicates a
substitution path to apply to the HP Database Archiving metadata files.
DEFAULT_PATH indicates that the existing paths in the metadata files can be
used as is. This setting is best when both HP Database Archiving and HP
TRIM are on MS Windows systems with shared file systems and identical
path specifications.
A path specification, such as
c:\\temp\\mydir\\, indicates that the paths
in the metadata files should be replaced with this path. Notice that the
backslash must be escaped by entering it twice. This setting is best when HP
Database Archiving is on a UNIX system. If HP Database Archiving is
running on a UNIX system, the metadata files will contain UNIX paths that
are not usable by HP TRIM, which runs on MS Windows. This setting can
convert those paths to ones that are usable on MS Windows.
If you enter a path specification in your SRMS Loader call, you must ensure that it
matches the actual location of the archive data files. Otherwise, you will get an
error similar to the following when you run the business flow:
Exception while executing a Groovy script
You can ensure that the archive files reside in the specified location in one of two
ways:
In the Web Console, create a new location,
Web Console > Environment >
Locations > New
, that matches the path specification in your SRMS Loader
call. Choose that location as the destination location when you run your
business flow. HP Database Archiving will generate the files in that location.
This method is the preferred way to ensure that the archive files end up in the
location where the SRMS Loader is expecting them.
Manually move the archive files from wherever HP Database Archiving
generated them to the path you specified in your SRMS Loader call. This
method requires an additional step, but, in some cases, it may be your only
option.
Example SRMS Loader calls
This first example illustrates an asynchronous call to the loader with an MS
Windows path specification. It will spawn the SRMS Loader and finish, and
override the path to the data files in the metadata file to be
c:\temp\mydir.
SrmsMetadata.sendToSRMS("TRIM", CURRENT_GROUP_RUN_ID,
ENVIRONMENT_NAME, REPOS_DB,
srmsMetadata.getdefaultConfigFile(),
"ASYNCHRONOUS","c:\\temp\\mydir\\",
"LOCAL")
This example illustrate an asynchronous call to the loader with an alternative MS
Windows path specification. It will spawn the SRMS Loader and finish, and
override the path to the data files in the metadata file to be
c:\temp\mydir.
SrmsMetadata.sendToSRMS("TRIM", CURRENT_GROUP_RUN_ID,
ENVIRONMENT_NAME, REPOS_DB,