9 Oracle Managed File Transfer Utilities

This chapter summarizes WLST (Oracle WebLogic Scripting Tool) commands that perform Oracle Managed File Transfer (MFT) operations.

This chapter includes the following sections:

For more detailed descriptions and examples of the MFT WLST commands, see the Oracle Managed File Transfer Custom WLST Commands in WLST Command Reference for SOA Suite.

9.1 Running WLST Commands

Before you can run WLST commands, you must start WLST and connect to the Oracle WebLogic Server managed server dedicated to MFT.

The steps for this process are:

  1. Go to the Oracle WebLogic Server command directory for MFT:
    cd ${MW_HOME}/mft/common/bin
    
  2. Run the Oracle WebLogic Scripting Tool:
    ./wlst.sh
    
  3. Connect to the Oracle WebLogic Server managed server dedicated to MFT:
    connect("username","password","t3://hostname:port")
    

    For example:

    connect("weblogic","weblogic1","t3://localhost:7011")
    
  4. Run WLST commands as needed.

    Use this command to list MFT WLST commands:

    help("mft")
    

    Use this command to list short names for MFT WLST commands:

    help("mft-shortcuts")
    

    The commands work in the same way whether you use the long or short names.

  5. Disconnect and exit.
    disconnect()
    exit()
    

9.2 MFT WLST Command Summary

Table 9-1 summarizes the MFT WLST commands. It is intended as a quick reference and not as a complete description of each command. For a complete description of these commands, see "Oracle Managed File Transfer Custom WLST Commands" in WLST Command Reference for SOA Suite.

Table 9-1 MFT WLST Command Summary

Command Shortcut Syntax Description

bulkDeployArtifact

buDepAF

bulkDeployArtifact('TRANSFER|SOURCE|TARGET',
'artifact_names', 'comment')

Deploys a comma-separated list of source, transfer, or target artifacts or * for all. A comment is optional.

createMftCredential

 
createMftCredential(password, key) 

Create the credential for mftapp. Enter the password for which credential needs to be created and the key for the credential.

deleteArtifact

delAF

deleteArtifact('TRANSFER|SOURCE|TARGET',
'artifact_name')

Deletes a source, transfer, or target artifact.

deleteArtifactDeployment

delDepAF

deleteArtifactDeployment('TRANSFER|SOURCE|TARGET',
'artifact_name', 'label')

Deletes an undeployed source, transfer, or target artifact. Use Show Deployment Details on the Deployment tab to view the label.

deployArtifact

depAF

deployArtifact('TRANSFER|SOURCE|TARGET',
'artifact_name', 'comment')

Deploys a source, transfer, or target artifact. A comment is optional.

disableArtifact

disAF

disableArtifact('TRANSFER|SOURCE|TARGET',
'artifact_name', 'comment')

Disables a deployed and previously enabled source, transfer, or target artifact. A comment is optional.

enableArtifact

enAF

enableArtifact('TRANSFER|SOURCE|TARGET',
'artifact_name', 'comment')

Enables a deployed and previously disabled source, transfer, or target artifact. A comment is optional.

exportDeployedArtifact

expDepAF

exportDeployedArtifact('<ArtifactType>','<ArtifactName>',<Label>,'<ArchiveFilePath>',generateConfigPlan, longFormat) 

Exports a deployed source, transfer, or target artifact to a ZIP file. Use Show Deployment Details on the Deployment tab to view the label. If you are connecting to WLST remotely, the ZIP file is created on the remote server.

GenerateConfigPlan(optional, default false): Indicates whether to generate the mftConfig XML. Config plan is generated in same folder where archive file is generated.

LongFormat(optional, default false): If "true", most of the attributes will be included in the config plan xml; otherwise, only the key attributes will be listed in the config plan XML.

isArtifactInMDS

isAFinMDS

isArtifactInMDS('TRANSFER|SOURCE|TARGET',
'artifact_name')

Checks whether a source, transfer, or target artifact exists in the MDS (Metadata Store) and returns TRUE or FALSE.

undeployArtifact

undepAF

undeployArtifact('TRANSFER|SOURCE|TARGET',
'artifact_name', 'comment')

Undeploys a source, transfer, or target artifact without deleting it from the configuration. A comment is optional.

exportMftMetadata

expMD

exportMetadata('<ArchiveFile>', generateConfigPlan, longFormat)

Exports the entire MFT configuration, excluding passwords, to a ZIP file. If you are connecting to WLST remotely, the ZIP file is created on the remote server.

GenerateConfigPlan(optional, default false): Indicates whether to generate the mftConfig XML. Config plan is generated in same folder where archive file is generated.

LongFormat(optional, default false): If "true", most of the attributes will be included in the config plan xml; otherwise, only the key attributes will be listed in the config plan XML.

exportTransferMetadata

expXfrMD

exportTransferMetadata('<ArchiveFile>', '<TransferName>', generateConfigPlan, longFormat )

Exports a transfer artifact and related metadata to a ZIP file. If you are connecting to WLST remotely, the ZIP file is created on the remote server.

GenerateConfigPlan(optional, default false): Indicates whether to generate the mftConfig XML. Config plan is generated in same folder where archive file is generated.

LongFormat(optional, default false): If "true", most of the attributes will be included in the config plan xml; otherwise, only the key attributes will be listed in the config plan XML.

importMftMetadata

impMD

importMetadata('<ArchiveFile>',<MftConfigPlanXML>, previewMode)

Imports a previously exported MFT configuration from a ZIP file.

GenerateConfigPlan(optional, default false): Indicates whether to generate the mftConfig XML. Config plan is generated in same folder where archive file is generated.

resetMetadata

resMD

resetMetadata('preserve_preferences')

Resets the MFT configuration, deleting all artifacts and resetting all administrative settings to their defaults, while preserving user preferences if optional preserve_preferences is set to TRUE.

deleteCSFKey

delKey

deleteCSFKey('SSH|PGP', 'PRIVATE|PUBLIC', 'alias')

Deletes a key alias from the MFT keystore.

exportCSFKey

expKey

exportCSFKey('SSH|PGP', 'PRIVATE|PUBLIC', 
'key_file_path')

Exports keys from the MFT keystore to a key file.

generateKeys

genKeys

generateKeys('SSH|PGP', 'password', 
'key_file_path')

Generates keys and saves them to one or more key files. The key type is RSA and the key size is 1024 bits. The private key password is optional.

For SSH, the path must include the key file name.

For PGP, two files are generated under the specified path: the secret.asc file contains the PGP private key, and the pub.asc file contains the PGP public key.

For additional key generation options that are not supported by generateKeys, external key generation applications like ssh-keygen or gpg are recommended.

importCSFKey

impKey

importCSFKey('SSH|PGP', 'PRIVATE|PUBLIC', 'alias',
'key_file_path')

Imports a key to the MFT keystore from a key file and creates an alias.

listCSFKeyAliases

lsKeyAliases

listCSFKeyAliases('SSH|PGP', 'PRIVATE|PUBLIC',
'alias')

Lists key aliases in the MFT keystore.

updateCSFKey

updKey

updateCSFKey('SSH|PGP', 'PRIVATE|PUBLIC', 'alias',
'key_file_path')

Deletes a key alias from the MFT keystore and generates a new key file.

getSourceDeploymentHistory

getSrcDH

getSourceDeploymentHistory('source_name')

Returns the deployment history of a source artifact.

getTargetDeploymentHistory

getTrgtDH

getTargetDeploymentHistory('target_name')

Returns the deployment history of a target artifact.

getTransferDeploymentHistory

getXfrDH

getTransferDeploymentHistory('transfer_name')

Returns the deployment history of a transfer artifact.

getTransferInfo

getXfrInfo

getTransferInfo('transfer_name', 'label')

Returns information about a transfer artifact. Use Show Deployment Details on the Deployment tab to view the label.

pauseTransfer

pauseXfr

pauseTransfer('instance_id', 'comment')

Pauses an in-progress transfer. Open the Advanced section of the target report to view the instance ID. For information about the target report, see Interpreting Source_ Transfer_ and Target Reports. A comment is optional.

resubmit

resub

resubmit('resubmit_type', 'instance_ids',
'comment')

Resubmits a transfer. The resubmit_type type is SOURCE, TRANSFER_INSTANCE, TARGET, or TARGET_INSTANCE.Open the Advanced section of the target report to view the instance ID. For information about the target report, see Interpreting Source_ Transfer_ and Target Reports. A comment is optional.

resubmitMessages

resMsgs

resubmitMessages(<ResubmitType>, <state>, <artifactName>, <startDate>, <endDate>, <chunkSize>, <chunkDelay>, <ignoreIds>, <comments>, <previewMode>)

Bulk resubmits of transfers. The ResubmitType is the type of artifact for which resubmit is invoked. Possible values are source, transfer_instance, target, target_instance. State (optional) includes Active, Failed or Completed. The start/end dates enable you to resubmit all failed messages within a specified date range. When the command is run in preview mode, it lists the count of messages that will be resubmitted for given criteria.

resumeTransfer

resXfer

resumeTransfer('instance_id', 'comment')

Resumes a paused transfer. Open the Advanced section of the target report to view the instance ID. For information about the target report, see Interpreting Source_ Transfer_ and Target Reports. A comment is optional.

configureHomeDir

confHmDir

configureHomeDir('directory_path', 'user_name')

Assigns the specified directory to the user as home directory where that user is located on login to embedded servers.

grantPermissionToDirectory

grPermDir

grantPermissionToDirectory('directory_path',
'principal_name', 'principal_type',
'permissions', 'server_type', 'include_subfolder')

Grants permission to an embedded server directory. Users and groups can be assigned a set of permissions to an existing directory on an embedded server.

listAllPermissions

lsPerms

grantPermissionToDirectory('directory_path',
'server_type')

Lists all permissions available for a given principal and server type. The server type can be FTP or sFTP.

createArtifacts

crtAF

\createArtifacts('<xmlFilePath>',previewMode,updateIfExists)

Create Artifacts from an input xml file containing artifact definition.

revokePermissionForDirectory

revPermDir

revokePermissionForDirectory('directory_path',
'principal_name', 'principal_type', 'permissions',
'server_type', 'include_subfolder')

Revokes a set of permissions from an embedded server directory.

startEmbeddedServer

startES

startEmbeddedServer('FTP|FTPS|SFTP')

Starts an embedded FTP, FTPS (FTP over SSL), or sFTP (SSH-FTP) server that was stopped.

stopEmbeddedServer

stopES

stopEmbeddedServer('FTP|FTPS|SFTP')

Stops an embedded FTP, FTPS (FTP over SSL), or sFTP (SSH-FTP) server that is running.

updatePorts

updPorts

updatePorts('server_instance_name',
'FTP|FTPS|SFTP', 'port')

Updates the port for an embedded FTP, FTPS (FTP over SSL), or sFTP (SSH-FTP) server, which is a service of an Oracle WebLogic Server managed server dedicated to MFT.

createCallouts

crtCalls

createCallouts('def_file_path')

Creates callouts based on an XML file that defines them.

deleteCallout

delCalls

deleteCallout('callout_name')

Deletes a callout.

listCallouts

lsCalls

listCallouts()

Lists callouts.

updateCallouts

updCalls

updateCallouts('def_file_path')

Updates callouts with the same names based on an XML file that defines them.

addContactToNotification

addContNote

addContactToNotification('event',
'Email|PHONE|FAX|SMS', 'value')

Adds a contact to a specific event notification. The value is an email address or phone number.

The event is RUNTIME_ERROR_EVENT, DELETE_ARTIFACT_EVENT, DEPLOY_ARTIFACT_EVENT, EXPORT_IMPORT_EVENT, PURGE_EVENT, or ARCHIVE_RESTORE_EVENT.

createContact

crtCont

createContact('Email|PHONE|FAX|SMS', 'value')

Creates a contact for event notifications. The value is an email address or phone number.

deleteContact

delCont

deleteContact('Email|PHONE|FAX|SMS', 'value')

Deletes a contact. The value is an email address or phone number.

listContacts

lsConts

listContacts('Email|PHONE|FAX|SMS')

Lists contacts.

removeContactFromNotification

remContNote

removeContactFromNotification('event',
'Email|PHONE|FAX|SMS', 'value')

Removes a contact from a specific event notification. The value is an email address or phone number.

The event is RUNTIME_ERROR_EVENT, DELETE_ARTIFACT_EVENT, DEPLOY_ARTIFACT_EVENT, EXPORT_IMPORT_EVENT, PURGE_EVENT, or ARCHIVE_RESTORE_EVENT.

updateEvent

updEvt

updateEvent('event', 'enabled')

Enables or disables a specific event notification. Set enabled to TRUE or FALSE.

The event is RUNTIME_ERROR_EVENT, DELETE_ARTIFACT_EVENT, DEPLOY_ARTIFACT_EVENT, EXPORT_IMPORT_EVENT, PURGE_EVENT, or ARCHIVE_RESTORE_EVENT.

archiveInstanceData

arcData

archiveInstanceData(archiveFileName='filename',
startDate='date', endDate='date',
batchId='batchId', status='C|F|A|*',
testMode='TRUE|FALSE', comments='text',
runInSync='FALSE|TRUE',
fsArchiveFolderPath='path')

Archives runtime instances to a .dmp file. The archiveFileName is required. Dates are in dd-MM-yyyy H:m:s:S format. The batchId is an identifier in the output of a previous archiveInstanceData command. The status is completed (default), failed, active, or all. To archive runtime instances, set testMode=FALSE. Set runInSync=TRUE to run immediately and block execution of other WLST commands. The fsArchiveFolderPath is required if archiving the corresponding payloads.

restoreInstanceData

resData

restoreInstanceData(archiveFilePath='path',
fileNamePrefix='prefix', fsFolderPath='path',
runInSync='FALSE|TRUE')

Restores previously archived runtime instances. The archiveFilePath is required.The fileNamePrefix (usually batchId) and fsFolderPath are required if restoring the corresponding payloads. Set runInSync=TRUE to run immediately and block execution of other WLST commands.

archivePayloads

arcPLs

archivePayloads(batchId='batchId',
archivePath='path', runInSync='FALSE|TRUE')

Archives payloads corresponding to runtime instances to batchId_n.zip files. The batchId is an identifier in the output of a previous archiveInstanceData command and is required. The archivePath to the payload archive directory is also required. Set runInSync=TRUE to run immediately and block execution of other WLST commands.

restorePayloadsByName

resPLbyN

restorePayloadsByName(fileNames='filename',
folderPath='path',  runInSync='FALSE|TRUE')

Restores previously archived payloads by file name. The fileNames argument (usually batchId) is required. The folderPath to the payload archive directory is also required. Set runInSync=TRUE to run immediately and block execution of other WLST commands.

restorePayloadsByPrefix

resPLbyP

restorePayloadsByPrefix(fileNamePrefix='prefix',
folderPath='path',  runInSync='FALSE|TRUE')

Restores previously archived payloads by file name prefix. The fileNamePrefix argument (usually batchId) is required. The folderPath to the payload archive directory is also required. Set runInSync=TRUE to run immediately and block execution of other WLST commands.

purgeInstanceData

prgData

purgeInstanceData(startDate='date',
endDate='date', batchId='batchId',
status='C|F|A|*', testMode='TRUE|FALSE',
comments='text', runInSync='FALSE|TRUE',
runPayloadPurge='FALSE|TRUE', <transferNames>, <namesDelimiter>) 

Purges runtime instances. All arguments are optional. Dates are in dd-MM-yyyy H:m:s:S format. The batchId is an identifier in the output of a previous archiveInstanceData or purgeInstanceData command. The status is completed (default), failed, active, or all. To archive runtime instances, set testMode=FALSE. Set runInSync=TRUE to run immediately and block execution of other WLST commands. Set runPayloadPurge=TRUE to purge the corresponding payloads.

purgePayloads

prgPLs

purgePayloads(batchId='batchId',
detailedAudit='TRUE|FALSE',
runInSync='FALSE|TRUE')

Purges payloads corresponding to runtime instances. The batchId is an identifier in the output of a previous archiveInstanceData or purgeInstanceData command and is required. Set detailedAudit=FALSE to turn off auditing of purged files. Set runInSync=TRUE to run immediately and block execution of other WLST commands.

createUserContact

crtUCont

createUserContact(<userName>,<deliveryChannel>) 

Create a new user contact, which can be used for event notification. .

deliveryChannel (optional): possible values Email/SMS. If not specified, it will use the user preferred delivery channel configured in the weblogic user.

createUserGroupContact

crtUGCont

createUserGroupContact(<userGroupName>,<deliveryChannel>) 

Create a new user group contact, which can be used for event notification.

deliveryChannel (optional): possible values Email/SMS. If not specified, it will use the user preferred delivery channel configured in the weblogic user.

addUserContactToNotification

addUContNote

addUserContactToNotification(<Event>, <userName>, <deliveryChannel>)

Add user contact for notification event.

Event values: RUNTIME_ERROR_EVENT, DELETE_ARTIFACT_EVENT, DEPLOY_ARTIFACT_EVENT, EXPORT_IMPORT_EVENT

deliveryChannel (optional): possible values Email/SMS

Note: Before adding an internal contact make sure that the email address/contact number is present in the user setting.

addUserGroupContactToNotification

addUGContNote

addUserGroupContactToNotification(<Event>, <userGroupName>, <deliveryChannel>)

Add user group contact for notification event.

Event values: RUNTIME_ERROR_EVENT, DELETE_ARTIFACT_EVENT, DEPLOY_ARTIFACT_EVENT, EXPORT_IMPORT_EVENT

deliveryChannel (optional): possible values Email/SMS

deleteUserContact

delUCont

deleteUserContact(<userName>,<deliveryChannel>)

Delete an existing user contact.  Note: If the contact is in use (assigned to an event), the user will get an error message.

deleteUserGroupContact

delUGCont

deleteUserGroupContact(<userGroupName>,<deliveryChannel>)

Delete an existing user groupcontact.  Note: If the contact is in use (assigned to an event), the user will get an error message.

removeUserContactfromNotification

remUContNote

removeUserContactFromNotification(<Event>, <userName>, <deliveryChannel>)

Remove the given user contact from the notification event.

Event values: RUNTIME_ERROR_EVENT, DELETE_ARTIFACT_EVENT, DEPLOY_ARTIFACT_EVENT, EXPORT_IMPORT_EVENT

deliveryChannel (optional): possible values Email/SMS

removeUserGroupContactfromNotification

remUGContNote

removeUserGroupContactFromNotification(<Event>, <userGroupName>, <deliveryChannel>)

Remove the given user group contact from the notification event.

Event values: RUNTIME_ERROR_EVENT, DELETE_ARTIFACT_EVENT, DEPLOY_ARTIFACT_EVENT, EXPORT_IMPORT_EVENT

deliveryChannel (optional): possible values Email/SMS

updateTriggerEventStatus updTrgEvtSt
updateTriggerEventStatus(<status>, <sourceName>, <eventSessionId>)
Update the TriggerEvent status of the eventSessionId provided.

If no eventSessionId is provided then most recent event status of the given source is updated.

activatePurgeSchedule actPurgeSch
activatePurgeSchedule(schedule_name)
Used to activate a purge schedule. Provide the purge schedule name to activate. Default scheduleName is the default purge schedule. If no purge schedule name is provided, the command will activate the default purge schedule. Only one purge schedule can be activated using this command.
deactivatePurgeSchedule deactPurgeSch
<scheduleName>
Used to deactivate a purge schedule. Provide the purge schedule name to deactivate it. Default scheduleName is the default purge schedule. If no purge schedule name is provided, the command will deactivate the default purge schedule. Only one purge schedule can be deactivated using this command.
modifyPurgeSchedule modifyPurgeSch
modifyPurgeSchedule(<startDate>, <endDate>, <scheduleTime>, <frequency>, <retentionPeriod>, <status>, <transferNames>, <namesDelimiter>, <include>, <comment>)
Used to modify an existing purge schedule.

startDate in dd-mm-yyyy format, scheduleTime in hh:mm:ss format, frequency values are Daily, Weekly, Monthly, or Yearly,

retentionPeriod values are any non-negative number, status values are Completed and/or Failed, transferNames can be Transfer names whose instances need to be purged, namesDelimiter value is single character string, include values are True or False, comment value is any string.
updateAppProperties updAppPrt
updateAppProperties('<propertiesNameValuePair>', '<delimeter>') 
Used to update Application properties of MFT system. The supported properties are Server, HA, Performance and Advanced properties. Allows to update more than one property at a time where property is a name/value pair, name is the property name and value is the property value and each separated by a delimiter. Supported parameters are: physicalstoragedirectory:String - Directory Path, calloutdirectory: String - Directory Path, storeonlinepayload: String - {fileSystem, database}, storereferencepayload: Boolean - true/false, generatechecksum: Boolean - true/false, sourceprocessors: Number - non zero, non negative number, instanceprocessors: Number - non zero, non negative number,targetprocessors: Number - non zero, non negative number, controldirectory: String - Directory Path,inbounddatasource: String - MFT Data Source Name, outbounddatasource: String - MFT Data Source Name, internaladdress: String - IP Address of Load Balancer (LB), internalFTPS: Number - Port number of FTPS in LB, internalSFTP: Number - Port number of SFTP in LB, internalFTP: Number - Port number of FTP in LB, externaladdress: String - IP Address of LB, externalFTPS: Number - Port number of FTPS in LB, externalSFTP: Number - Port number of SFTP in LB, externalFTP: Number - Port number of FTP in LB.
updateSFTPServer updSFTPSvr
updateSFTPServer('<enableSFTP>', '<keyAlias>', '<privateKeyPassword>') 
Used to enable/disable the Embedded SFTP Server. To enable SFTP server, SSH key alias name is mandatory along with the optional private key password. If the key is not password protected, then private key password is not required. To disable, both key alias and password are not required. Supported parameters are: enableSFTP: Boolean to enable/disable SFTP, keyAlias: SSH private key alias, privateKeyPassword: Optional password of the SSH private key.

Note:

MFT WLST command shortcuts are shorthand aliases for the MFT WLST commands. These can be substituted for the full command names if preferred. There is no difference in the command behavior between using the full command names or the shortcut command names.

9.3 Oracle Managed File Transfer EJBs

WLST commands are also exposed as EJBs and the commands are available in one of the following EJBs:

  • oracle.tip.mft.j2ee.ejb.KeyManagerService

  • oracle.tip.mft.j2ee.ejb.MDSService

  • oracle.tip.mft.j2ee.ejb.RuntimeService