11 Performing Advanced Functions

While the Capture system administrator performs Capture system installation, configuration, and overall monitoring, you may need to occasionally perform advanced functions on workspaces to which you have workspace manager access. For example, you might import or export a workspace configuration, or release or export stuck batches.

This chapter includes the following sections:

11.1 Using Workspace Manager WLST Commands

Table 11-1 provides a subset of Capture WLST commands, and includes those commonly used by Capture workspace managers. See Configuration Commands in WebCenter WLST Command Reference.

To run Capture WLST commands:

  1. Install and run the Weblogic Scripting Tool (WLST).
  2. Run Capture-specific WLST commands by invoking the wlst script (wlst.sh or wlst.cmd, depending on platform) located in the Capture Home directory inside Middleware Home (MIDDLEWARE_HOME/Oracle_ECM1/common/bin/wlst.sh or wlst.cmd).

    Below is an example Windows location:

    C:\Oracle\Middleware\Oracle_ECM1\common\bin\wlst.cmd

    Below is an example Linux location:

    /home/middleware/Oracle_ECM1/common/bin/wlst.sh

    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()

  3. Use the commands listed in Table 11-1 that begin with list to identify the workspace or batch to act on by its ID.
  4. Use the export, import, or unlock commands to act on the specified batch or workspace, as described in the sections that follow.

Table 11-1 Capture WLST Commands Typically Used by Workspace Managers

Capture WLST Command Description Syntax Example

listWorkspaces

Lists all workspaces (preceded by their IDs) to which you have access.

listWorkspaces()

Command: listWorkspaces()

Output: 4 bills_workspace

2 certificates_workspace

5 receipts_workspace

listBatches

Lists all batches for the workspace specified by its ID.

listBatches(WORKSPACE_ID)

Command:

listBatches(3)

Output:

CERT000000001

CERT000000002

CERT000000007

listLockedBatches

Displays a list of all locked batches for the workspace specified by its ID.

listLockedBatches(WORKSPACE_ID)

Command:

listLockedBatches(3)

Output:

3 1 EXP1 AUSER AUSER_PC 01/01/13

exportWorkspace

Exports an entire workspace's configuration, including scripts, profiles, and jobs, to a specified xml file at the specified location.

exportWorkspace(WORKSPACE_ID,'FILE_NAME')

Command:

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

Output:

Workspace successfully exported

importWorkspace

Imports a workspace from an xml file generated with the exportWorkspace command. The workspace you import cannot exist in the Capture database.

importWorkspace('FILE_NAME')

Command:

importWorkspace('/home/abc/workspace3.xml')

Output:

Workspace successfully imported

exportBatch

Exports a specified batch, including images, documents, attachments, and metadata, to a specified XML file at a specified location.

exportBatch(BATCH_ID,'FILE_NAME')

Command: exportBatch(8,'/home/abc/batch8.xml')

Output:

Batch successfully exported

unlockBatch

Deletes the batch lock record for the specified batch, and changes the batch to a Ready state so users can open it in the client.

Use the listLockedBatches command to display a list of locked batches for a workspace.

unlockBatch('BATCH_ID')

Command: unlockBatch('8')

Output:

Batch successfully unlocked

setObjectProperty

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

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

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

Output:

Property successfully updated.

getObjectProperty

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

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

Command: getObjectProperty('TEST-WORKSPACE','oracle.odc.importprocessor.ImportJob','jobName=ImportEmail','serverName')

Output:

Property successfully retrieved as: mail.oracle.com

setObjectCredentials

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

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

Command: setObjectCredentials('TEST-WORKSPACE','oracle.odc.importprocessor.ImportJob','jobName=import Email','xyz@oracle.com','welcome123')

Output:

Credentials successfully updated.

updateScript

Update a script within a workspace.

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

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

Output:

Script successfully updated.

cloneWorkspaceFromID

Copies an existing workspace and creates a new workspace.

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

Command:cloneWorkspaceFromID(3,'Expenses','Expenses Workspace')Output: Workspace successfully copied

Output:

Workspace successfully copied.

cloneWorkspaceFromFile

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

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

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

Output:

Workspace successfully copied.

listImportHATokens

Displays all the Import Processor tokens for a specific workspace.

listImportHATokens(WORKSPACE_ID)

Command:listImportHATokens(3)

Output:

Token ID: d:\bills\ha_token.lst

Source Class Name: oracle.odc.importprocessor.listfile.ListFileSource

Date Created: 11/10/14

Date Modified: 11/11/14

deleteImportHAToken

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

deleteImportHAToken('TOKEN_ID')

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

Output:

Import Processor HA Token deleted successfully.

11.2 Exporting a Workspace Configuration

The exportWorkspace command allows you to output an entire workspace's configuration, including its definition, profiles, jobs, and scripts, to an XML file. When used with the importWorkspace command, the exportWorkspace command can be useful for transferring workspace configurations between environments, such as for testing purposes.

Note:

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

To export a workspace to an XML file:

  1. After connecting to the managed server or navigating to the domainRuntime, execute the listWorkspaces command to identify the ID of the workspace to export.
  2. Execute the exportWorkspace command, specifying the workspace ID to export and the file and location of the XML file to be written. See Table 11-1 for command details and an example.

11.3 Importing a Workspace Configuration

Note:

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

The importWorkspace command allows you to import an entire workspace, including its configuration (profiles, jobs, and scripts) and data (images, documents, and metadata) from an XML file created using the exportWorkspace WLST command. This can be useful for transferring workspace configurations between environments, such as for testing purposes.

To import a workspace from an XML file:

  1. After connecting to the managed server or navigating to the domainRuntime, use the listWorkspaces command to verify that the workspace to import does not already exist in the Capture system.

    If a workspace already exists, changes in the xml file are merged into the workspace.

  2. Execute the importWorkspace command, specifying the location and XML file to import. See Table 11-1 for command details and an example.

11.4 Releasing Locked Batches

You may occasionally need to free a batch that is locked to another user, so that it can be worked on.

To release a batch:

  1. After connecting to the managed server or navigating to the domainRuntime, use the listLockedBatches command to verify the ID of the batch to release.
  2. Execute the unlockBatch command, specifying the ID of the batch to unlock. See Table 11-1 for command details and an example.

11.5 Exporting a Batch

You may find it useful to export a batch, including its images, documents, attachments, and metadata, particularly for troubleshooting purposes.

To export a batch:

  1. After connecting to the managed server or navigating to the domainRuntime, use the listBatches command to verify the ID of the batch to export.
  2. Execute the exportBatch command, specifying the ID of the batch to export. See Table 11-1 for command details and an example.

11.6 Setting the Value of an Object Property

The setObjectProperty command allows you to set the value of a property defined in a Capture Object. The Capture Object could be a client profile, a processor job, or a commit profile.

After connecting to the managed server or navigating to the domainRuntime, execute the setObjectProperty command by specifying the following:

  • Workspace name that contains the object to modify

  • Class name that defines the object

  • Object identifier which is a key/value pair consisting of the property name of the object to modify and the expected value

  • Name and value of the property to update separated by an equal sign

See Table 11-1 for command details and an example. See Capture Object Properties and setObjectProperty in WebCenter WLST Command Reference.

11.7 Displaying the Value of an Object Property

The getObjectProperty command allows you to display the value of a property defined in a Capture Object. The Capture Object could be a client profile, a processor job, or a commit profile.

After connecting to the managed server or navigating to the domainRuntime, execute the getObjectProperty command by specifying the following:

  • Workspace name that contains the object

  • Class name that defines the object

  • Object identifier which is a key/value pair consisting of the property name of the object to print and the expected value

  • Name of the property to access

See Table 11-1 for command details and an example. See getObjectProperty in WebCenter WLST Command Reference.

11.8 Setting the Credentials for an Object

The setObjectCredentials command allows you to set the user name and password associated with a Capture object (client profile, processor job, or commit profile).

After connecting to the managed server or navigating to the domainRuntime, execute the setObjectCredentials command by specifying the following:

  • Workspace name that contains the credentials to modify

  • Class name that defines the object

  • Object identifier which is a key/value pair consisting of the property name of the object to modify and the expected value

  • User name to assign to the object's credential

  • Password to assign to the object's credential

See Table 11-1 for command details and an example.

11.9 Updating a Script within a Workspace

The updateScript command allows you to update a script within a workspace.

After connecting to the managed server or navigating to the domainRuntime, execute the updateScript command by specifying the following:

  • Workspace name that contains the script to update

  • Name of the script to update

  • Absolute path to the new script file. The script will be updated with the contents of this file.

See Table 11-1 for command details and an example.

11.10 Copying an Existing Workspace

The cloneWorkspaceFromID command allows you to make a copy of an existing workspace.

After connecting to the managed server or navigating to the domainRuntime, execute the cloneWorkspaceFromID command by specifying the following:

  • Workspace ID of the workspace to copy

  • Workspace name for the new workspace that will be created

  • Description describing the new workspace

See Table 11-1 for command details and an example.

11.11 Cloning a Workspace from a File

The cloneWorkspaceFromFile command allows you to read an output file created by the exportWorkspace command and creates a unique copy of the workspace.

After connecting to the managed server or navigating to the domainRuntime, execute the cloneWorkspaceFromFile command by specifying the following:

  • File name that contains the full path to the source XML file that will be used to create the new workspace

  • Workspace name for the new workspace that will be created

  • Description that describes the new workspace

See Table 11-1 for command details and an example.

11.12 Displaying Import Processor Tokens

The listImportHATokens command allows you to display all the Import Processor tokens for a specific workspace.

After connecting to the managed server or navigating to the domainRuntime, execute the listImportHATokens command by specifying the following:

  • Workspace ID

See Table 11-1 for command details and an example.

11.13 Deleting an Import Processor Token

The deleteImportHAToken command allows you to delete a specific Import Processor HA token from the ECIMPORTHATOKEN and ECIMPORTHATOKENITEMS tables.

After connecting to the managed server or navigating to the domainRuntime, execute the deleteImportHAToken command by specifying the following:

  • Token ID that contains the unique identifier of the Import Processor HA Token to be deleted

See Table 11-1 for command details and an example.