HP Structured Records Management Solution Tutorial, August 2011

36 Chapter 5: Creating a business flow
srmsMetadata.getdefaultConfigFile(),
"ASYNCHRONOUS","c:/temp/mydir/",
"LOCAL")
This example call loads the output generated by all cartridges within the current
business flow into HP TRIM:
import groovy.sql.Sql
import com.hp.ilm.db.extensions.srms.infrastructure.*
SrmsMetadata.sendToSRMS("TRIM", CURRENT_GROUP_RUN_ID,
ENVIRONMENT_NAME, REPOS_DB,
SrmsMetadata.getdefaultConfigFile(),
"SYNCHRONOUS","DEFAULT_PATH",
"LOCAL")
This example call also loads the output generated by all cartridges within the
current business flow into HP TRIM, but it allows users access to perform
additional processing at intermediate points:
import groovy.sql.Sql
import com.hp.ilm.db.extensions.srms.infrastructure.*
//Generate the metadata file(s) required by the
//srmsLoader, but do not initiate the load
def srmsMetadataPayload=SrmsMetadata.generateSRMSMetadata
"TRIM", CURRENT_GROUP_RUN_ID,
ENVIRONMENT_NAME, REPOS_DB,
SrmsMetadata.getdefaultConfigFile(),
"DEFAULT_PATH")
//Do some intermediate processing here e.g. FTP files.
//initiate loading the files
SrmsMetadata.callSRMSLoader (srmsMetadataPayload,
"SYNCHRONOUS", "LOCAL")
Summary and next steps
In this chapter you learned to:
Create a business flow
Add a cartridge to the business flow
Add a Groovy script to call the SRMS loader from the business flow.
The next step is to deploy and run this business flow, which also deploys and runs
your cartridge.