5 Configuring the Imaging Solution

This chapter describes how to configure the following Imaging solution components:

5.1 Configuring the BPEL Connection

Configuring the BPEL connection for use by an AXF solution involves the following tasks:

5.1.1 Creating a CSF Credential Alias

The Credential Store Framework (CSF) enables you to create a user name/password alias for use in an Oracle I/PM connection configuration. With a CSF alias, you supply a key instead of a user name and password, and use this key in creating an Oracle I/PM connection. (You can use one CSF key for multiple imaging connections.)

For information about creating keys and aliases, see the Oracle Fusion Middleware Administrator's Guide.

5.1.2 Creating a Connection in Oracle I/PM Imaging Connections

Follow these steps to create a connection and specify the CSF alias key, BPEL server name and port.

  1. Log in to the Oracle I/PM imaging system as an administrator.

  2. From Manage Connections in the side pane, click the + (plus) sign document icon for creating a BPEL connection.

  3. Enter a name for the connection, and click Next.

    This name is referenced in the AXF_SOLUTION_ATTRIBUTES table to establish the connection.

  4. On the BPEL Settings step, enter BPEL connection settings.

    • HTTP Front End Address: http://hostname:BPEL server port

    • Credential Alias (previously created, as described in Section 5.1.1)

    • Provider: t3://hostname:BPEL server port

    For example:

    • HTTP Front End Address: http://hostname:port

    • Credential Alias: axf.credential

    • Provider: t3://hostname:port

  5. Click Next, then Submit.

5.1.3 Referencing the Connection in the AXF_SOLUTION_ATTRIBUTES Table

Follow this step to identify the Oracle I/PM imaging connection to the AXF solution, as described in Section 5.1.2. Run the command from SQL Developer (or other suitable tool that can connect to the imaging database schema).

Note:

If using an implementation accelerator (including the HelloBPEL solution), this step is not needed.
  1. Run the configuration row specified below, where:

Insert into AXF_SOLUTION_ATTRIBUTES (SOLUTION_NAMESPACE,PARAMETER_KEY,PARAMETER_VALUE) values \ ('InvoiceProcessing','BPEL_CONNECTION','axfconnection');

5.2 Configuring the AXF Tables or Applying a Solution Accelerator

After completing installation and configuration of the Imaging solution, complete one of the following steps for implementation:

  • Configure the AXF tables and AXF-related Oracle E-Business Suite or Oracle PeopleSoft tables. Table descriptions and example implementations are provided in Appendix A, "Imaging Solution Tables."

    OR

  • Apply a solution implementation accelerator. To obtain an accelerator, contact your systems integrator, Oracle Consulting, or Oracle Support.

5.3 Testing Functionality Using the AXF Driver Page

Access the driver page of the AXF web application to verify functionality. For more information about the driver page, see "Verifying the AXF Installation with HelloWorld" in Oracle Fusion Middleware Installation Guide for Oracle Enterprise Content Management Suite.

5.4 Configuring Imaging Solution Options

This section describes the following optional configurations for the Imaging solution:

5.4.1 Configuring Automatic Oracle I/PM Viewer Login

Follow the steps in this section to prevent users from having to log in to Oracle I/PM the first time they access the Oracle I/PM viewer per session. You set the front end HTTP host and port so that the Oracle I/PM hostname and the AXF server hostname match.

Follow these steps to set the front end HTTP host and port:

  1. Open the Oracle WebLogic Server Administration Console.

  2. On the Home Page, click Servers under the Environment heading.

  3. Click the Oracle I/PM server from the servers listed in the Name column.

  4. Click the Protocols tab, then the HTTP tab.

  5. Make changes in the Frontend Host field and appropriate frontend port field. (If using SSL, specify a value in the Frontend HTTPS Port field. If not using SSL, specify a value in the Frontend HTTP Port field.)

  6. Click Save.

5.4.2 Configuring Autotask Locking

In AXF configurations with multiple simultaneous users, collisions may occur when end users attempt to acquire tasks in Autotask mode. (For details about Autotask mode, see Section A.3.2.) To prevent collisions, enable autotask locking for each named BPEL connection in the AXF database. When locking is enabled, only one user may automatically acquire a task at a given time.

Enabling the lock functionality prevents an error from appearing on the Task List if two users acquire a task simultaneously, and is the recommended setting. In situations where simultaneous acquisition is unlikely, disabling the lock functionality may increase performance.

The setting is configured in the AXF_SOLUTION_ATTRIBUTES Table by inserting the following row:

SOLUTION_NAMESPACE PARAMETER_KEY PARAMETER_VALUE
BPEL.default USE_AUTOTASK_LOCKING TRUE

5.4.3 Updating the Task Payload Using XPATH

The Update Task From Procedure command calls a stored pl/sql procedure using a specified data source and updates the task payload using XPATH, as described in Section A.3.7.

5.4.3.1 Example PL/SQL Procedure For Updating the Task Payload

The pl/sql procedure that follows loads the xml into the DOM, retrieves the invoice ID, queries for the invoice amount for that transaction, and based on that amount, returns a set of users.

To use this example, modify this procedure to retrieve the specific pieces of data from the payload you would like. The only requirement is that the pl/sql function you create must take a VARCHAR2 and return a VARCHAR2. The name of the function is in the AXF configuration.

create or replace FUNCTION axfretrieveuserlist(  xmlPayload IN VARCHAR2 ) RETURN VARCHAR2 IS

    v_node    xmldom.DOMNode;
    v_node2   xmldom.DOMNode;
    v_nl      xmldom.DOMNodeList;
    v_doc     xmldom.DOMDocument;
    v_elem    xmldom.DOMElement;
    v_parser  xmlparser.Parser;
    invoiceID     VARCHAR2(256);
    invoiceAmount NUMBER(8,2);
    userList      VARCHAR2(256);

BEGIN

    v_parser := xmlparser.newParser;
    xmlparser.parseBuffer(v_parser, xmlPayload);
    v_doc := xmlparser.getDocument(v_parser);
    xmlparser.freeParser(v_parser);

    -- Retrieve the invoice ID
    v_nl := xmldom.getElementsByTagName(v_doc, 'invoiceID');
    v_node := xmldom.item(v_nl, 0);
    v_node2 := xmldom.getFirstChild(v_node);
    invoiceID := xmldom.getNodeValue(v_node2);

    -- Retrieve Invoice Amount for given invoice id
    select INVOICE_AMOUNT into invoiceAmount from ap_invoices_all where INVOICE_ID = invoiceid;

    if invoiceamount > 10000 then
      userList := 'jlondon';
    else
      userList := 'jcooper,mtwain';
    end if;

    RETURN userList;

END;

5.4.4 Adding a Validation

The Validate Task command validates BPEL system attribute or BPEL payload data, and based on validation results, executes a subsequent command, as described in Section A.3.9.

The following example and corresponding steps add a validation that verifies that a Transaction ID is present before allowing a task to complete. This example assumes that you have installed the Invoice Processing solution implementation accelerator data.

Note:

Apply this configuration change only in use cases where users must create the business application invoice before completing the task. This configuration would not apply in use cases where users may not create an invoice before completing the task (typically, for example, when the task is being completed with an outcome of SupplierMaintenance).
  1. Add the following row to the AXF_COMMANDS table:

    Table 5-1 Example AXF_COMMANDS Table

    SOLUTION_NAMESPACE COMMAND_CLASS COMMAND_NAMESPACE

    InvoiceProcessing

    oracle.imaging.axf.commands.bpel.ValidateTaskCommand

    ValidateTransactionID


  2. Add the rows shown in Table 5-2 to the AXF_SOLUTION_PARAMETERS table.

    The following configuration validates that the invoice has been saved (Invoice Transaction ID is not 0). If it is 0, the command reports the error message specified in the FAIL_MESSAGE parameter.

    Fields not shown: SOLUTION_NAMESPACE=InvoiceProcessing

    Table 5-2 Example ValidateTask Command in AXF_SOLUTION_PARAMETERS Table

    COMMAND_NAMESPACE CONFIGURATION_NAMESPACE PARAMETER_KEY PARAMETER_VALUE

    ValidateTransactionID

    oracle.imaging.axf.commands.bpel.ValidateTaskCommand

    ATTRIBUTE_TO_VALIDATE

    XPATH:InvoiceProcessing_TransactionID

    ValidateTransactionID

    oracle.imaging.axf.commands.bpel.ValidateTaskCommand

    CMD_ON_PASS

    CompleteInvoice

    ValidateTransactionID

    oracle.imaging.axf.commands.bpel.ValidateTaskCommand

    REGULAR_EXPRESSION

    [^0]

    ValidateTransactionID

    oracle.imaging.axf.commands.bpel.ValidateTaskCommand

    FAIL_MESSAGE

    Please save the transaction before completing the task.


  3. In the AXF_ACTIONS Table, edit the row in which the Complete Task is configured, replacing the Complete action's COMMAND_NAMESPACE column with the ValidateTransactionID's command namespace.

    Table 5-3 AXF_ACTIONS Table

    ACTION_ID VIEW_ID DISPLAY_NAME COMMAND_NAMESPACE MENU_ORDER

    CompleteInvoice

    /TaskViewer.jspx

    Complete Invoice

    ValidateTransactionID

    3


5.4.5 Deploying Custom Commands

You can also deploy custom commands to work within the AXF infrastructure. Custom commands must implement the oracle.imaging.axf.commands.AxfCommand interface. The execute(AxfRequest) method is invoked by the infrastructure. Configure the implementation to execute in the AXF configuration database.

In addition, commands may implement the oracle.imaging.axf.commands.ValidatableCommand interface, which provides a way for the AXF infrastructure to validate the configuration and operation of a command without executing it to provide a system command status.

5.4.6 Configuring Chained Commands and Web Tools

Some AXF commands have parameter keys that specify what occurs after the command completes, allowing you to chain them. For example, Table 5-4 shows a portion of the AXF_SOLUTION_PARAMETERS table. After the CompleteTask command executes, additional AXF commands are executed (StartInvoiceProcessing and AutoOpenTask, based on program logic).

Table 5-4 Example AXF_SOLUTION_PARAMETERS Table for CompleteTask Command (InvoiceProcessing Solution)

COMMAND_NAMESPACE CONFIGURATION_NAMESPACE PARAMETER_KEY PARAMETER_VALUE

DuplicateInvoice

oracle.imaging.axf.commands.bpel.CompleteTaskCommand

CMD_AUTOTASK_OFF

StartInvoiceProcessing

DuplicateInvoice

oracle.imaging.axf.commands.bpel.CompleteTaskCommand

CMD_AUTOTASK_ON

AutoOpenTask

DuplicateInvoice

oracle.imaging.axf.commands.bpel.CompleteTaskCommand

OUTCOME

DUPLICATE_INVOICE


5.4.7 Configuring a Dynamic Data Table

In the Task Viewer, you can display a table of dynamic data from the BPEL payload XML, such as General Ledger lines for an invoice processing solution, as shown in the bottom tabs in Figure 1-5. You configure the table in the AXF_METADATA_BLOCKS Table and its data lines in the AXF_METADATA_ATTRIBUTES Table. For information on formatting XML data in the BPEL payload, see Section 5.4.7.1; also see Section A.2.2, "Task Viewer Web Tool."

The bottom row of Table 5-5 shows an example dynamic data table called GL Lines configured.

Table 5-5 Example AXF_METADATA_BLOCKS Table

BLOCK_ID BLOCK_LOCATION LABEL DISPLAY_ORDER TASK_FLOW_ID SOLUTION_NAMESPACE BLOCK_TYPE METADATA_STYLE

1

LEFT_SIDEBAR

Summary

1

axf-taskviewer-tfd

InvoiceProcessing

METADATA

null

2

LEFT_SIDEBAR

Comments

2

axf-taskviewer-tfd

InvoiceProcessing

COMMENT

null

3

BOTTOM_PANEL

GL Lines

3

axf-taskviewer-tfd

InvoiceProcessing

METADATA

TABLE


Table 5-6 shows the GL Lines table's data lines configured. This example results in three data columns in the table. It assumes that the XPATH attributes exist in the AXF_XPATH_ATTRIBUTES Table.

Fields not shown include: DATA_TYPE=String

Table 5-6 Example AXF_METADATA_ATTRIBUTES Table for Dynamic Data Table

BLOCK_ID ATTRIBUTE_ID LABEL ATTRIBUTE_KEY IS_XPATH DISPLAY_ORDER

2

8

Line Number

DistributionLines_LineNumber

TRUE

0

2

9

Dist Account

DistributionLines_DistributionAccount

TRUE

1

2

10

Amount

DistributionLines_Amount

TRUE

2


5.4.7.1 Formatting XML Data For a Dynamic Data Table

After adding the table in the AXF_METADATA_BLOCKS Table and configuring its data lines in the AXF_METADATA_ATTRIBUTES Table, follow the guidelines below to ensure that the XML data in the BPEL payload is correctly formatted for display in the table.

Below is an XML sample for display at any level within the XML payload. The First column XPATH retrieves the parent and its peer elements (collectionItem). Each of the configured XPATHs point to an itemValue element used to retrieve the cell values for the table from each collectionItem.

Note:

All columns must display within the same direct parent element.
<rootElement>
  <collectionContainerElement>
    <collectionItem>                                        <--First row for table
      <itemValue1>value1</itemValue1>                       <--First column XPATH
      <itemValue2>value2</itemValue2>
      <itemValue3>value3</itemValue3>
    </collectionItem>
    <collectionItem>                                        <--Second row
      <itemValue1>value1</itemValue1>
      <itemValue2>value2</itemValue2>
      <itemValue3>value3</itemValue3>
    </collectionItem>
    <collectionItem>
      <itemValue1>value1</itemValue1>
      <itemValue2>value2</itemValue2>
      <itemValue3>value3</itemValue3>
    </collectionItem>
  </collectionContainerElement>
</rootElement>

The first column XPATH for the above XML should be similar to the following:

/task:payload/task:rootElement/collectionContainerElement/collectionItem/itemValue1

5.4.8 Reenabling PaperClip Attachments (Oracle E-Business Suite and Imaging Only)

Installing and configuring the Managed Attachments solution automatically disables the Oracle E-Business Suite attachments paperclip icon and functionality. To reenable the paperclip functionality for an Imaging Solution only configuration, follow these steps to disable the Managed Attachments solution:

Note:

This section applies to Oracle E-Business Suite use only.
  1. Open the AXF_CONFIGS table (Oracle E-Business Suite) table.

  2. In the FORMFUNCTION field, rename the AXF_MANAGED_ATTACHMENTS entry. For details, see Section A.4.2.2, "Example Implementation."

    For example, rename the entry as follows:

    AXF_MANAGED_ATTACHMENTS-DISABLED

    Note:

    To reenable the Managed Attachments solution, change the FORMFUNCTION field back to the following entry:

    AXF_MANAGED_ATTACHMENTS

  3. Verify that the AXF_PAPERCLIP property in the AXF_PROPERTIES table is set to TRUE. For more information, see Section A.4.5.

    Table 5-7 AXF_PROPERTIES Values For PaperClip Use

    PROPNAME PROPVALUE

    AXF_PAPERCLIP

    Set to TRUE to enable the paperclip option, or FALSE to disable it.