5 Oracle WebCenter Enterprise Capture Custom WLST Commands

This chapter provides detailed descriptions of custom WLST commands for Oracle WebCenter Enterprise Capture, including command syntax, arguments and command examples.

The following sections describe the custom WLST commands for Oracle WebCenter Enterprise Capture. These commands enable you to access and modify various configuration parameters for Oracle WebCenter Enterprise Capture from the command line. Topics include:

To display all the supported Capture commands that can be invoked from WLST, enter the following command at the WLST prompt:

help('capture')

For information about Enterprise Capture workspace console use, see About the Capture Workspace Console in Managing Oracle WebCenter Enterprise Capture.

Note:

To use the Oracle WebCenter Enterprise Capture custom commands, you must invoke the WLST script from the Oracle Common home in which the component has been installed. Either connect to the Oracle WebLogic Server managed server (default port 16400) on which the Oracle WebCenter Enterprise Capture application is deployed, or connect to the Oracle WebLogic Server administration server and change your location to domainRuntime by executing the command: domainRuntime()

Overview of WLST Oracle WebCenter Enterprise Capture Command Categories

WLST Oracle WebCenter Enterprise Capture commands are covered in the following category:

Table 5-1 WLST Oracle WebCenter Enterprise Capture Command Categories

Command Category Description

Configuration Commands

View and manage configuration for Oracle WebCenter Enterprise Capture.

Configuration Commands

Use the commands in Table 5-2 to configure Oracle WebCenter Enterprise Capture.

Table 5-2 WLST Server Oracle WebCenter Enterprise Capture Configuration Commands

Use this command... To... Use with WLST...

listWorkspaces

List all of the Capture workspaces to which the administrator or workspace manager has access.

Online

listBatches

List all of the batches within a specified workspace.

Online

exportBatch

Export a batch including images and metadata to a ZIP file.

Online

exportWorkspace

Export an entire Capture workspace including documents, metadata, scripts, profiles and jobs to an XML file.

Online

exportEWSEmailMessage

This email export method is specific to Microsoft Email Exchange Service. It exports the EWS email message with specified messageId to the specified file. Export File name should be specified along with its complete path and must have .eml extension.

Online

exportIMAPEmailMessage

Exports the IMAP email message with specified messageId to the specified file. Export File name should be specified along with its complete path and must have .eml extension. EmailConnectionSecurity must be an integer, where 0 is for No Security, 1 is for security type SSL_TLS and 2 is for security type STARTTLS. All parameters should be in String format other than EmailConnectionSecurity and Port.

Online

importWorkspace

Import a workspace from an XML file generated with the exportWorkspace command

Online

unlockBatch

Delete the batch lock record for the specified batch.

Online

listLockedBatches

Display a list of locked batches for a specified workspace.

Online

listCaptureConfig

Display the list of all Enterprise Capture configuration attributes with their values.

Online

getCaptureConfig

Fetch the value of the attribute specified as an argument.

Online

setCaptureConfig

Set the value of the Enterprise Capture attribute to the provided value.

Online

scanForClientBundles

Scan the client bundle directory for updated bundles.

Online

deleteBundle

Delete an existing client bundle.

Online

deleteBatches

Deletes the batches with specified IDs.

Online

setObjectProperty

Set the value of a property defined in a Capture object which could be a client profile, processor job, or a commit profile.

Online

getObjectProperty

Print the specific value of a property of a Capture object which could be a client profile, processor job, or a commit profile.

Online

setObjectCredentials

Set the user name and password associated with a Capture object (processor job or commit profile).

Online

updateScript

Update a script within a workspace.

Online

cloneWorkspaceFromID

Copy an existing workspace and create a new workspace.

Online

cloneWorkspaceFromFile

Read an output file created by the exportWorkspace command and create a unique copy of the workspace.

Online

listImportHATokens

Display all the Import Processor tokens for a specific workspace.

Online

deleteImportHAToken

Delete a specific Import Processor HA Token from the ECIMPORTHATOKEN and ECIMPORTHATOKENITEMS tables.

Online

listWorkspaces

Use with WLST: Online.

Description

Lists all Capture workspaces to which the administrator or workspace manager has access.

Syntax

listWorkspaces()

Example

The following example lists all of the workspaces, preceded by their IDs.

listWorkspaces()
4 bills_workspace
2 certificates_workspace
5 receipts_workspace

listBatches

Use with WLST: Online.

Description

Lists all batches for the workspace specified by its ID. Each batch listed has five columns (displayed in this order): Batch ID, Batch Name, Created By (user), Last Updated By (user), and Last Modified (date).

Syntax

listBatches (WORKSPACE_ID)
Argument Definition

WORKSPACE_ID

ID number for a workspace. Can be optionally specified within single quotes. For example, both 3 and '3' are valid arguments for a workspace with ID 3.

Note:

To obtain a list of valid workspace IDs, use the listWorkspaces command.

Example

The following example lists the batches for a specific workspace with ID = 1.

wls:/base_domain/domainRuntime> listBatches(1)
14 ABI1 <anonymous> <anonymous> 4/26/13
15 ABI2 <anonymous> <anonymous> 4/26/13
1 BCP11 captureuser <anonymous> 4/17/13

exportBatch

Use with WLST: Online.

Description

Exports a batch including images and metadata to a ZIP file containing an XML file and the batch item files.

Syntax

exportBatch(BATCH_ID,'FILE_NAME')
Argument Definition

BATCH_ID

ID number for a batch. Can be optionally specified within single quotes. For example, both 3 and '3' are valid arguments for a batch with ID 3.

Note:

To obtain a list of valid batch IDs, use the listBatches command.

FILE_NAME

Name of the ZIP file to which the batch will be exported. The file name must be specified along with its complete path.

Note:

The path should be separated by forward slashes "/" regardless of the operating system.

Example

The following example exports a batch.

exportBatch(8,'/home/abc/batch8.zip')
Batch successfully exported

exportWorkspace

Use with WLST: Online.

Description

Exports an entire workspace including documents, metadata, scripts, profiles and jobs to an XML file.

Note:

Workspace security settings will not be exported into the resulting XML file.

Syntax

exportWorkspace(WORKSPACE_ID,'FILE_NAME')
Argument Definition

WORKSPACE_ID

ID number for a workspace. Can be optionally specified within single quotes. For example, both 3 and '3' are valid arguments for a workspace with ID 3.

Note:

To obtain a list of valid workspace IDs, use the listWorkspaces command.

FILE_NAME

Name of the file to which the workspace will be exported. The file name must be specified along with its complete path.

Note:

The path should be separated by forward slashes "/" regardless of the operating system.

Example

The following example exports the workspace with the ID of 3.

exportWorkspace(3,'/home/abc/workspace3.xml')
Workspace successfully exported

exportEWSEmailMessage

Use with WLST: Online.

Description

Exports the EWS email message with specified messageId to the specified file.

Syntax

exportEWSEmailMessage('<MICROSOFT_EMAIL_EXCHANGE_SERVICE_URL>','<EMAIL_ADDRESS>','<PASSWORD>','<MESSAGE_ID>', '<SEARCH_FOLDER>', 
'<EXPORT_FILE_NAME>')
Argument Definition

MICROSOFT_EMAIL_EXCHANGE_SERVICE_URL

Microsoft Email Exchange Service URL

Email_ADDRESS

Email accounts to be checked for message

PASSWORD

Password for email account

MESSAGE_ID

Unique Id of the message

SEARCH_FOLDER

Folder to be checked for message

EXPORT_FILE_NAME

Export File name along with its complete path, must have .eml extension

Example

The following example exports message with id '12abc-3456-7ddd-e891-b1234567' to location '/home/abc/' with file name 'Exported_Email_Message_.eml'.

exportEWSEmailMessage('https://<hostname>/ews/exchange.asmx','abc.xyz@oracle.com','myEmailPassword','12abc-3456-7ddd-e891-b1234567', 'inbox','/home/abc/Exported_Email_Message_.eml')
 
Email Message successfully exported.

exportIMAPEmailMessage

Use with WLST: Online.

Description

Exports the IMAP email message with specified messageId to the specified file. Export File name should be specified along with its complete path and must have .eml extension. EmailConnectionSecurity must be an integer, where 0 is for No Security, 1 is for security type SSL_TLS and 2 is for security type STARTTLS. All parameters should be in String format except EmailConnectionSecurity and Port.

Syntax

exportIMAPEmailMessage('<EMAIL_SERVER_NAME>', <PORT>, <IMAP_CONNECTION_SECURITY>, '<Email_ADDRESS>', '<PASSWORD>', '<MESSAGE_ID>', '<SEARCH_FOLDER>', '<EXPORT_FILE_NAME>')
Argument Definition

EMAIL_SERVER_NAME

Email Server Name (DNS name or IP address)

Port

Port number

IMAP_CONNECTION_SECURITY

0 for Security - None, 1 for Security - SSL/TLS, 2 for Security - STARTTLS

Email_ADDRESS

Email accounts to be checked for message

PASSWORD

Password for email account

MESSAGE_ID

Unique Id of the message

SEARCH_FOLDER

Folder to be checked for message

EXPORT_FILE_NAME

Export File name along with its complete path, must have .eml extension.

Example

The following example exports message with id '12abc-3456-7ddd-e891-b1234567' to location '/home/abc/' with file name 'Exported_Email_Message_.eml'.

exportIMAPEmailMessage('stbeehive.oracle.com',993,1,'abc.xyz@oracle.com','myEmailPassword','12abc-3456-7ddd-e891-b1234567', 'inbox','/hom/abc/Exported_Email_Message_.eml')
                
Email Message successfully exported.

importWorkspace

Use with WLST: Online.

Description

Imports a workspace from a XML file generated with the exportWorkspace command. The workspace being imported must not exist in the Oracle WebCenter Enterprise Capture database.

Note:

The security settings are not imported when you import a workspace.

Syntax

importWorkspace('FILE_NAME')
Argument Definition

FILE_NAME

Name of the XML file from which a workspace is imported. The file name must be specified along with its complete path.

Example

The following example imports a workspace with the file name of workspace3.xml.

importWorkspace('/home/abc/workspace3.xml')
Workspace successfully imported

unlockBatch

Use with WLST: Online.

Description

Deletes the batch lock record for the specified batch. The batch will be put into a READY state so that it can be opened by the client.

Syntax

unlockBatch('BATCH_ID')
Argument Definition

BATCH_ID

ID number for a batch. Can be optionally specified within single quotes. For example, both 3 and '3' are valid arguments for a batch with ID 3.

Note:

To obtain a list of locked batches, use the listLockedBatches command.

Example

The following example unlocks a batch with ID = 8.

unlockBatch('8')
Batch successfully unlocked

listLockedBatches

Use with WLST: Online.

Description

Displays the list of locked batches. Each batch listed has six columns (displayed in this order): Workspace ID, Batch ID, Batch Name, Created By (user), Workstation (name/IP address), Last Modified (date).

Syntax

listLockedBatches('WORKSPACE_ID')
Argument Definition

WORKSPACE_ID

ID number for a workspace. Can be optionally specified within single quotes. For example, both 3 and '3' are valid arguments for a workspace with ID 3.

Note:

To obtain a list of valid workspace IDs, use the listWorkspaces command.

Example

The following example lists locked batches for the workspace with ID = 1.

wls:/base_domain/domainRuntime> listLockedBatches(1)
1 14 ABI1 <anonymous> sic01lzz.example.com 4/26/13
1 15 ABI2 <anonymous> slc01lzz.example.xom 4/26/13
1 17 BCP16 <captureuser> 10.159.104.189 4/30/13

listCaptureConfig

Use with WLST: Online.

Description

Displays the list of all Enterprise Capture configuration attributes with their values. If a value cannot be fetched, it will be shown as "VALUE CANNOT BE DISPLAYED". The most likely cause of an unfetched value is insufficient privilege.

Syntax

listCaptureConfig()

Example

The following example lists Enterprise Capture configuration attributes and values.

listCaptureConfig()
CaptureSystemID CAPTURE_01
BatchRefreshLimit 5

getCaptureConfig

Use with WLST: Online.

Description

Fetches the value of the attribute specified as an argument. Use the listCaptureConfig command to list possible attribute names.

Syntax

getCaptureConfig(['NAME_OF_ATTRIBUTE'])
Argument Definition

NAME_OF_ATTRIBUTE

Name of attribute (as a string) for Enterprise Capture configuration.

Example

The following example fetches the value of the attribute for the Enterprise Capture system ID.

getCaptureConfig('CaptureSystemID')
CAPTURE_01

setCaptureConfig

Use with WLST: Online.

Description

Sets the value of the Enterprise Capture attribute to the provided value.

Syntax

setCaptureConfig(['NAME_OF_ATTRIBUTE'],['VALUE_OF_ATTRIBUTE'])
Argument Definition

NAME_OF_ATTRIBUTE

Name of Enterprise Capture configuration attribute to configure.

VALUE_OF_ATTRIBUTE

Value to set for the Enterprise Capture configuration attribute.

Example

The following example sets the CaptureSystemID attribute to the value CAPTURE_02.

setCaptureConfig('CaptureSystemID','CAPTURE_02')
Attribute 'CaptureSystemID' changed to "CAPTURE_02'

scanForClientBundles

Use with WLST: Online.

Description

Scans the client bundle directory for bundles. Data for existing bundles will be updated and information for new bundles will be loaded and cached in the database.

Syntax

scanForClientBundles()

Example

The following example scans for bundles and lists processed bundles.

scanForclientBundles()
Processed capture bundle.jar

deleteBatches

Use with WLST: Online.

Description

Deletes the batches with specified IDs.

Syntax

deleteBatches(<BATCH_ID_1>,<BATCH_ID_2>,...<BATCH_ID_N>)
Argument Definition

BATCH_ID

Id number for a batch. Should be only in integer format. For example, 1

Example

The following example deletes batch with ID 3 and 7.

deleteBatches(3,7)
Batch(es) successfully deleted.

deleteBundle

Use with WLST: Online.

Description

Deletes an existing bundle.

Syntax

deleteBundle('bundlename')
Argument Definition

bundlename

Name of an existing bundle to delete.

Example

The following example deletes the specified bundle.

deleteBundle('Example')

setObjectProperty

Use with WLST: Online.

Description

Sets the value of a property defined in a Capture Object, which could be a client profile, processor job, or a commit profile.

For information on the properties that can be set for each Capture object, see Capture Object Properties.

Syntax

setObjectProperty('<WORKSPACE_NAME>','<CLASS_NAME>','<OBJECT_IDENTIFIER>','<PROPERTY_ASSIGNMENT_STRING>')

This command requires the following parameters:

Argument Definition

WORKSPACE_NAME

The name of the Capture workspace that contains the objects that will be modified. If the calling user has rights to more than one workspace with the specified name, the first workspace found will be used.

Note:

To obtain a list of workspaces, use the listWorkspaces command.

CLASS_NAME

The name of the class that defines the client profile, processor job, or commit profile.

OBJECT_IDENTIFIER

A key/value pair consisting of the name of a property that can be used to locate the object and the expected value of that property.

PROPERTY_ASSIGNMENT_STRING

The name and value of the property to update, separated by an equal sign.

Points to Note

The following list provides some additional points to note when you use the setObjectProperty command:

  • Modifiable objects expose their properties using the standard JavaBean getter/setter pattern. In the example below it is assumed the methods getProfileDesc and setProfileDesc exist in the Profile class.

  • The value being assigned to the property should be compatible with the property's data type. If a value is not compatible with the property's data type, an exception will occur.

  • The following are valid class names:

    • oracle.oddc.data.Profile (Capture object being modified: Client Profile)

    • oracle.odc.recognition.RecognitionJob (Capture object being modified: Recognition Processor Job)

    • oracle.odc.importprocessor.ImportJob (Capture object being modified: Import Processor Job)

    • oracle.odc.entity.CommitProfileEntity (Capture object being modified: Commit Profile)

    • oracle.odc.docconverter.DocConverterJob (Capture object being modified: Document Conversion Job)

  • In cases where a value needs to be set on an object nested within a profile or job, “dot" notation can be used to access the nested property: propertyName.propertyName=value.

  • Multiple levels of nesting are supported. The following could be used to modify the barcodeName property of a Recognition Processor job's docTypeBarcode property: docTypeBarcode.barcodeName=value.

  • To support accessing a property of an object contained in a collection, the following “angle bracket" notation can be used: propertyName<identifierPropertyName=value>.propertyName=value.

    • The value between the angle brackets will be used to locate the object to modify within the collection. The identifierPropertyName is the name of a property that can be used to identify the object in the collection and value is the value that property should contain to be considered a match. For example: barcodes<barcodeName=barcode 1>.barcodeName=barcode 2.

Example

  • The following is an example of <Object Identifier> that would apply to commit profiles:

    profileName=Commit to CS
    
  • The following is an example of <Property Assignment String> for updating the property profileDesc for a client profile:

    profileDesc=Test Profile Desc
    
  • The following is an example of setting the property <serverURL> associated with a WebCenter Content commit profile named Commit to CS:

    setObjectProperty('TEST_WORKSPACE','oracle.odc.entity.CommitProfileEntity','profileName=Commit to CS','serverURL=http://myhost.example.com:16200/cs/idcplg/')

getObjectProperty

Use with WLST: Online.

Description

Prints the value of a specific property of a Capture Object (client profile, processor job, or commit profile).

For information on the properties that can be printed for each Capture object, see Capture Object Properties.

Syntax

getObjectProperty('<WORKSPACE_NAME>','<CLASS_NAME>','<OBJECT_IDENTIFIER>','<PROPERTY_NAME>')

This method requires the following parameters:

Argument Definition

WORKSPACE_NAME

The name of the Capture workspace that contains the object that will be modified. If the calling user has rights to more than one workspace with the specified name, the first workspace found will be used.

Note:

To obtain a list of workspaces, use the listWorkspaces command.

CLASS_NAME

The name of the class that defines the client profile, processor job or commit profile.

OBJECT_IDENTIFIER

A key/value pair consisting of the name of a property that can be used to locate the object and the expected value of that property.

PROPERTY_NAME

The name of the property to access. The “dot" notation and “angle bracket" notation described in setObjectProperty can be used to isolate the property to access.

Note:

The backing MBean method for this command can be used in automated tests to validate if the changes made with the setObjectProperty command have taken effect.

Example

  • The following are valid class names:

    oracle.oddc.data.Profile
    oracle.odc.recognition.RecognitionJob
    oracle.odc.importprocessor.ImportJob
    oracle.odc.entity.CommitProfileEntity
    oracle.odc.docconverter.DocConverterJob
    
  • The following is an example of <Object Identifier> that would apply to import jobs:

    jobName=Import Email
    
  • The following is an example for retrieving the value of the property <serverName> associated with an email import job.

    getObjectProperty('TEST-WORKSPACE','oracle.odc.importprocessor.ImportJob','jobName=Import Email','serverName')
    

setObjectCredentials

Use with WLST: Online.

Description

It is used to set the user name and password associated with a profile or job.

Syntax

setObjectCredentials('<WORKSPACE_NAME>','<CLASS_NAME>','<OBJECT_IDENTIFIER>','<USER_NAME>','<PASSWORD>')

This method requires the following parameters:

Argument Definition

WORKSPACE_NAME

The name of the Capture workspace that contains the credential that will be modified. If the calling user has rights to more than one workspace with the specified name, the first workspace found will be used.

Note:

To obtain a list of workspaces, use the listWorkspaces command.

CLASS_NAME

The name of the class required to modify the credentials.

OBJECT_IDENTIFIER

A key/value pair consisting of the property name of the object to modify and the expected value.

USER_NAME

The user name to assign to the object's credential.

PASSWORD

The password to assign to the object's credential.

Example

  • Valid class names include the following:

    oracle.odc.importprocessor.ImportJob
    oracle.odc.entity.CommitProfileEntity
    
  • The following is an example for setting credentials associated with an Email Import Job:

    setObjectCredentials('TEST-WORKSPACE','oracle.odc.importprocessor.ImportJob','jobName=import Email','xyz@example.com','welcome123')
    
  • The following is an example for setting credentials associated with a WebCenter Imaging commit profile:

    setObjectCredentials('TEST-WORKSPACE','oracle.odc.entity.CommitProfileEntity','profileName=commit to Imaging','admin','welcome123')

updateScript

Use with WLST: Online.

Description

Updates a script within a workspace.

Syntax

updateScript('<WORKSPACE_NAME>','<SCRIPT_NAME>','<SCRIPT_FILE>')

This command requires the following parameters:

Argument Definition

WORKSPACE_NAME

The name of the workspace that contains the script. The name should be used to lookup the unique identifier of the workspace. If the name is not found, an error message is displayed.

Note:

To obtain a list of workspaces, use the listWorkspaces command.

SCRIPT_NAME

The name of the script to update. If the script cannot be found, an error message is displayed.

SCRIPT_FILE

The absolute path to the script file that should be updated. The script should be updated with the contents of this file.

Example

The following example updates a script within a workspace:

updateScript('TEST-WORKSPACE','Client_Script','/scratch/aime/scripts/client.txt')

cloneWorkspaceFromID

Use with WLST: Online.

Description

Creates a unique copy of a workspace specified by its ID.

Syntax

cloneWorkspaceFromID(WORKSPACE_ID, 'WORKSPACE_NAME', 'WORKSPACE_DESCRIPTION')

This command requires the following parameters:

Argument Definition

WORKSPACE_ID

The ID number of the workspace to be copied. Can be optionally specified within single quotes. For example, both 3 and '3' are valid arguments for a workspace with ID 3.

Note:

To obtain a list of valid workspace IDs, use the listWorkspaces command.

WORKSPACE_NAME

Name for the new workspace being created.

WORKSPACE_DESCRIPTION

Description for the new workspace being created.

Example

The following example clones an existing workspace:

cloneWorkspaceFromID(3,'Expenses','Expenses Workspace')

cloneWorkspaceFromFile

Use with WLST: Online.

Description

Reads an output file created by the exportWorkspace command and creates a unique copy of the workspace.

Syntax

cloneWorkspaceFromFile('FILE_NAME', 'WORKSPACE_NAME', 'WORKSPACE_DESCRIPTION')

This command requires the following parameters:

Argument Definition

FILE_NAME

The name of the output file from which the content has to be copied.

WORKSPACE_NAME

Name for the new workspace being created.

WORKSPACE_DESCRIPTION

Description for the new workspace being created.

Example

The following example reads an output file to create a workspace:

cloneWorkspaceFromFile('/home/bills/expense1.xml','Expenses','Expenses Workspace')

listImportHATokens

Use with WLST: Online.

Description

Displays all the Import Processor tokens for a specific workspace.

Syntax

listImportHATokens(WORKSPACE_ID)

This command requires the following parameters:

Argument Definition

WORKSPACE_ID

The ID number of the workspace for which the tokens have to be displayed. Can be optionally specified within single quotes. For example, both 3 and '3' are valid arguments for a workspace with ID 3.

Note:

To obtain a list of valid workspace IDs, use the listWorkspaces command.

Example

The following example displays Import Processor tokens for the workspace with ID = 3:

listImportHATokens(3)

deleteImportHAToken

Use with WLST: Online.

Description

Deletes a specific Import Processor HA token from the ECIMPORTHATOKEN and ECIMPORTHATOKENITEMS tables.

Syntax

deleteImportHAToken('TOKEN_ID')

This command requires the following parameters:

Argument Definition

TOKEN_ID

ID of the token to be deleted.

Example

The following example deletes a specific Import Processor HA token:

deleteImportHAToken('d:\bills\ha_token.lst')