10 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:

10.1 Using Workspace Manager WLST Commands

Table 10-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_common/common/bin/wlst.sh or wlst.cmd).

    Below is an example Windows location:

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

    Below is an example Linux location:

    /home/middleware/oracle_common/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 10-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 10-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

deleteBatches

Deletes the specified batches.

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

Command:

deleteBatches(3,7)

Output:

Batches successfully deleted

exportIMAPEmailMessage

Exports the IMAP email message with specified message ID to the specified file.

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

Command:

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

Output:

Email message successfully exported

exportEWSEmailMessage

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

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

Command:

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

Output:

Email message successfully exported

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.

10.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 10-1 for command details and an example.

10.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 10-1 for command details and an example.

10.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 10-1 for command details and an example.

10.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 10-1 for command details and an example.

10.6 Deleting Batches

The administrator may occasionally want to delete some batches that are no longer needed, especially certain batches (created by other users) which are erroneous or stuck in the processing stage endlessly. The deleteBatches command allows the administrator to perform bulk deletion of the specified batches.

Using this command, the administrator can delete both locked and unlocked batches. Use with WLST: Online. This is an administrator-specific command and it must not be used by other Capture users. To delete specified batches:
  1. After connecting to the managed server or navigating to the domainRuntime, use the listLockedBatches command or the listBatches command to verify the IDs of the batches to delete.
  2. Execute the deleteBatches command, specifying the IDs of the batches to delete. See Table 10-1 for command details and an example.

10.7 Exporting an IMAP Email Message

The exportIMAPEmailMessage command allows you to export an IMAP email message with specified message ID to the specified file. Use with WLST: Online.

All parameters must be in string format except parameters for email connection security and port.

After connecting to the managed server or navigating to the domainRuntime, execute the exportIMAPEmailMessage command by specifying the following:
  • Name of the email server (DNS name or IP address)
  • Port number
  • Security settings in integer format such as 0 for no security, 1 for SSL/TLS security type, and 2 for STARTTLS security type.
  • Email account to be checked for message
  • Password for email account
  • Unique ID of message
  • Folder to be checked for message
  • Export file name along with its complete path. It must have .eml extension.

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

10.8 Exporting an EWS Email Message

The exportEWSEmailMessage command allows you to export an EWS email message with specified message ID to the specified file. Use with WLST: Online.

This command is specific to Microsoft Email Exchange Service.

After connecting to the managed server or navigating to the domainRuntime, execute the exportEWSEmailMessage command by specifying the following:
  • Microsoft Email Exchange Service URL
  • Email account to be checked for message
  • Password for email account
  • Unique ID of message
  • Folder to be checked for message
  • Export file name along with its complete path. It must have .eml extension.

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

10.9 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 10-1 for command details and an example. See Capture Object Properties and setObjectProperty in WebCenter WLST Command Reference.

10.10 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 10-1 for command details and an example. See getObjectProperty in WebCenter WLST Command Reference.

10.11 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 10-1 for command details and an example.

10.12 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 10-1 for command details and an example.

10.13 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 10-1 for command details and an example.

10.14 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 10-1 for command details and an example.

10.15 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 10-1 for command details and an example.

10.16 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 10-1 for command details and an example.