20 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 Oracle Fusion Middleware 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()

See "Using Custom WLST Commands" in Oracle Fusion Middleware Administrator's Guide.

20.1 Overview of WLST Oracle WebCenter Enterprise Capture Command Categories

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

Table 20-1 WLST Oracle WebCenter Enterprise Capture Command Categories

Command Category Description

Configuration Commands

View and manage configuration for Oracle WebCenter Enterprise Capture.


20.2 Configuration Commands

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

Table 20-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

importWorkspace

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

Online

unlockBatch

Delete the batch lock record for the specified batch.

Online

listLockedBatches

Display the list of locked batches.

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

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 value of a specific 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 (client profile, processor job, or commit profile).

Online

updateScript

Update a script within a workspace.

Online


20.2.1 listWorkspaces

Use with WLST: Online.

20.2.1.1 Description

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

20.2.1.2 Syntax

listWorkspaces()

20.2.1.3 Example

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

listWorkspaces()
4 bills_workspace
2 certificates_workspace
5 receipts_workspace

20.2.2 listBatches

Use with WLST: Online.

20.2.2.1 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).

20.2.2.2 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.

20.2.2.3 Example

The following example lists the batches for the workspace ID 3.

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

20.2.3 exportBatch

Use with WLST: Online.

20.2.3.1 Description

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

20.2.3.2 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.
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.

20.2.3.3 Example

The following example exports a batch.

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

20.2.4 exportWorkspace

Use with WLST: Online.

20.2.4.1 Description

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

20.2.4.2 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.
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.

20.2.4.3 Example

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

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

20.2.5 importWorkspace

Use with WLST: Online.

20.2.5.1 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.

20.2.5.2 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.

20.2.5.3 Examples

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

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

20.2.6 unlockBatch

Use with WLST: Online.

20.2.6.1 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.

20.2.6.2 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.

20.2.6.3 Example

The following example unlocks a batch ID 8.

unlockBatch('8')
Batch successfully unlocked

20.2.7 listLockedBatches

Use with WLST: Online.

20.2.7.1 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).

20.2.7.2 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.

20.2.7.3 Example

The following example lists locked batches for the workspace ID 3.

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

20.2.8 listCaptureConfig

Use with WLST: Online.

20.2.8.1 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.

20.2.8.2 Syntax

listCaptureConfig()

20.2.8.3 Example

The following example lists Enterprise Capture configuration attributes and values.

listCaptureConfig()
CaptureSystemID CAPTURE_01
BatchRefreshLimit 5

20.2.9 getCaptureConfig

Use with WLST: Online.

20.2.9.1 Description

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

20.2.9.2 Syntax

getCaptureConfig(['NAME_OF_ATTRIBUTE'])
Argument Definition
NAME_OF_ATTRIBUTE Name of attribute (as a string) for Enterprise Capture configuration.

20.2.9.3 Example

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

getCaptureConfig('CaptureSystemID')
CAPTURE_01

20.2.10 setCaptureConfig

Use with WLST: Online.

20.2.10.1 Description

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

20.2.10.2 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.

20.2.10.3 Example

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

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

20.2.11 scanForClientBundles

Use with WLST: Online.

20.2.11.1 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.

20.2.11.2 Syntax

scanForClientBundles()

20.2.11.3 Example

The following example scans for bundles and lists processed bundles.

scanForclientBundles()
Processed capture bundle.jar

20.2.12 deleteBundle

Use with WLST: Online.

20.2.12.1 Description

Deletes an existing bundle.

20.2.12.2 Syntax

deleteBundle('bundlename')
Argument Definition
bundlename Name of an existing bundle to delete.

20.2.12.3 Example

The following example deletes the specified bundle.

deleteBundle('Example')

20.2.13 setObjectProperty

Use with WLST: Online.

20.2.13.1 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 Appendix A.

20.2.13.2 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.
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.

20.2.13.3 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.

20.2.13.4 Example

  • The following is an example of <Object Identifier> that would apply to client 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','corporate.odc.entity.CommitProfileEntity','profileName=Commit to CS','serverURL=http://myhost.example.com:16200/cs/idcplg/')
    

20.2.14 getObjectProperty

Use with WLST: Online.

20.2.14.1 Description

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

20.2.14.2 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.
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.

20.2.14.3 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')
    

20.2.15 setObjectCredentials

Use with WLST: Online.

20.2.15.1 Description

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

20.2.15.2 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.
CLASS_NAME The name of the class that defines the profile or the job.
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.

20.2.15.3 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')
    

20.2.16 updateScript

Use with WLST: Online.

20.2.16.1 Description

Updates a script within a workspace.

20.2.16.2 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.
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.

20.2.16.3 Example

The following example updates a script within a workspace:

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