Skip Headers
Oracle® Fusion Middleware Administrator's Guide for E-Business Suite Adapter for Oracle Enterprise Content Management
11g Release 1 (11.1.1)
E15865-01
  Go To Documentation Library
Library
Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
 
Next
Next
 

3.4 AXF Commands

AXF commands include:

AXF command-related topics include:

3.4.1 Open Task Command

This command acquires a task from BPEL (human work flow) for a given task ID; the specific task is likely selected from the task list. If the task can be acquired by the user, the command obtains the details of the task and displays the specified web page.

3.4.1.1 Open Task Command Parameters

Table 3-33 lists configuration parameters for this command. These parameters are used in the AXF_SOLUTION_PARAMETERS Table to configure commands.

Table 3-33 Parameters for OpenTask Command

Parameter Key Description

TASK_VIEW_URL

This task flow is returned in the response command upon executing this command.

The value for the TASK_VIEW_URL parameter uses one of the following strings to represent task flows. Each string can be thought of as a special URL where taskflow: is the protocol instead of http.

  • taskflow://WEB-INF/taskflows/axf-tasklist-tfd.xml#axf-tasklist-tfd (displays the Task List)

  • taskflow://WEB-INF/taskflows/axf-taskviewer-tfd.xml#axf-taskviewer-tfd (displays the Task Viewer)

  • taskflow://WEB-INF/taskflows/axf-identity-picker-tfd.xml#axf-identity-picker-tfd (displays the Identity Picker)

  • taskflow://WEB-INF/taskflows/axf-enumeration-picker-tfd.xml#axf-enumeration-picker-tfd (displays the Enumeration Picker)

  • taskflow://WEB-INF/taskflows/axf-comments-tfd.xml#axf-comments-tfd (displays Comments)


3.4.1.2 Example Implementation

This example uses the OpenTask command to display the Task Viewer for the Invoice Processing solution.

Fields not shown: SOLUTION_NAMESPACE=InvoiceProcessing

Table 3-34 Example Open Task Command in AXF_SOLUTION_PARAMETERS Table

COMMAND_NAMESPACE CONFIGURATION_NAMESPACE PARAMETER_KEY PARAMETER_VALUE

OpenTask

oracle.imaging.axf.commands.bpel.OpenTaskCommand

TASK_VIEW_URL

taskflow://WEB-INF/taskflows/axf-taskviewer-tfd.xml#axf-taskviewer-tfd


3.4.2 Autotask Command

This command initializes autotask mode, in which a new human workflow task is automatically claimed for the user.

3.4.2.1 Autotask Command Parameters

These parameters are used in the AXF_SOLUTION_PARAMETERS Table to configure Autotask commands.

Table 3-35 Autotask Command Parameters in AXF_SOLUTION_PARAMETERS Table

Parameter Key Description

TASK_VIEW_URL

Task flow returned in the response command upon executing this command.

CMD_ON_NO_TASKS

COMMAND_NAMESPACE executed when there are no tasks.

BPEL_TRY_AUTO

Time in milliseconds between attempts to get the next task from the Human workflow system.


3.4.2.2 Example Implementation

This example uses the Autotask command to automatically claim tasks and display them in the Task Viewer for the Invoice Processing solution.

Fields not shown: SOLUTION_NAMESPACE=InvoiceProcessing

Table 3-36 Autotask Command Parameters in AXF_SOLUTION_PARAMETERS Table

COMMAND_NAMESPACE CONFIGURATION_NAMESPACE PARAMETER_KEY PARAMETER_VALUE

AutoOpenTask

oracle.imaging.axf.commands.bpel.AutotaskCommand

TASK_VIEW_URL

taskflow://WEB-INF/taskflows/axf-taskviewer-tfd.xml#axf-taskviewer-tfd

AutoOpenTask

oracle.imaging.axf.commands.bpel.AutotaskCommand

CMD_ON_NO_TASKS

StartInvoiceProcessing

AutoOpenTask

oracle.imaging.axf.commands.bpel.AutotaskCommand

BPEL_TRY_AUTO

3000


3.4.2.3 Configuring Autotask Locking

In AXF configurations with multiple simultaneous users, collisions may occur when attempting to acquire tasks in Autotask mode. You can enable or disable 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:

NAMESPACE PARAMETER_TYPE PARAMETER_NAME PARAMETER_VALUE
BPEL.default connection USE_AUTOTASK_LOCKING true

3.4.3 Release Task Command

The Release Task command releases a human workflow task and displays the AXF Task List web tool, regardless of autotask mode.

3.4.3.1 Release Task Command Parameters

Table 3-37 lists configuration parameters for this command. These parameters are used in the AXF_SOLUTION_PARAMETERS Table to configure commands.

Table 3-37 Release Task Command Parameters

Parameter Key Description

CMD_AUTOTASK_OFF

Specify the command (COMMAND_NAMESPACE) to be executed when AUTOTASK mode is off.

CMD_AUTOTASK_ON

Specify the command (COMMAND_NAMESPACE) to be executed when AUTOTASK mode is on.


3.4.3.2 Example Implementation

Fields not shown: SOLUTION_NAMESPACE=InvoiceProcessing

Table 3-38 Example Release Task Commands in AXF_SOLUTION_PARAMETERS Table

COMMAND_NAMESPACE CONFIGURATION_NAMESPACE PARAMETER_KEY PARAMETER_VALUE

SkipTask

oracle.imaging.axf.commands.bpel.ReleaseTaskCommand

CMD_AUTOTASK_OFF

StartInvoiceProcessing

SkipTask

oracle.imaging.axf.commands.bpel.ReleaseTaskCommand

CMD_AUTOTASK_ON

AutoTaskOpen

ReleaseTask

oracle.imaging.axf.commands.bpel.ReleaseTaskCommand

CMD_AUTOTASK_OFF

StartInvoiceProcessing

ReleaseTask

oracle.imaging.axf.commands.bpel.ReleaseTaskCommand

CMD_AUTOTASK_ON

StartInvoiceProcessing


3.4.4 Complete Task Command

The Complete Task command updates the list of attributes and outcome for a specified task in the human task workflow. This command also takes the parameters defined for the Update Task Command.

In addition, the Complete Task command can also update BPEL payload attribute values using request parameters to the command. If auto-task mode is active, the command claims the next available task and displays in the Task Viewer. If auto-task mode is not active, the command displays the Task List.

3.4.4.1 Complete Task Command Parameters

Table 3-39 lists configuration parameters for this command. These parameters are used in the AXF_SOLUTION_PARAMETERS Table to configure commands.

Table 3-39 CompleteTask Command Parameters

Parameter Key Description

OUTCOME

Specify the outcome defined for the human work flow system. Default bpel outcomes are singular, APPROVE, or REJECT.

CMD_AUTOTASK_ON

Specify the command (COMMAND_NAMESPACE) to be executed when AUTOTASK mode is on.

CMD_AUTOTASK_OFF

Specify the command (COMMAND_NAMESPACE) to be executed when AUTOTASK mode is off.


3.4.4.2 Example Implementation

Fields not shown: SOLUTION_NAMESPACE=InvoiceProcessing

Table 3-40 Example Complete Task Command in AXF_SOLUTION_PARAMETERS Table

COMMAND_NAMESPACE CONFIGURATION_NAMESPACE PARAMETER_KEY PARAMETER_VALUE

DeleteInvoice

oracle.imaging.axf.commands.bpel.CompleteTaskCommand

CMD_AUTOTASK_OFF

StartInvoiceProcessing

DeleteInvoice

oracle.imaging.axf.commands.bpel.CompleteTaskCommand

CMD_AUTOTASK_ON

AutoOpenTask

DeleteInvoice

oracle.imaging.axf.commands.bpel.CompleteTaskCommand

OUTCOME

DELETE_INVOICE


3.4.5 Redirect Command

The Redirect command redirects the browser to an AXF web tool or other URL. The request parameters included in this URL are:

  • CID (Conversation ID)

  • PID (ParameterSet ID)

Any user defined request parameters should be stored as part of the PID.

The base URL comes from the database configuration. This command returns the URL in the response command.

Table 3-41 lists configuration parameters for this command. These parameters are used in the AXF_SOLUTION_PARAMETERS Table to configure commands.

3.4.5.1 Redirect Command Parameters

Table 3-41 RedirectCommand Parameters

Parameter Key Description

REDIRECT_URL

This URL is returned in the response command upon executing this command.

EXTERNAL

If this has a value of TRUE, then the redirect page does not have a CID and PID appended to it. The re-direct URL is an external Web site and all request parameters are appended in the URL.


3.4.5.2 Example Implementation

Fields not shown: SOLUTION_NAMESPACE=InvoiceProcessing

Table 3-42 Example Redirect Command in AXF_SOLUTION_PARAMETERS Table

COMMAND_NAMESPACE CONFIGURATION_NAMESPACE PARAMETER_KEY PARAMETER_VALUE

SearchIPM

oracle.imaging.axf.commands.system.RedirectCommand

EXTERNAL

TRUE

StartInvoiceProcessing

oracle.imaging.axf.commands.system.RedirectCommand

REDIRECT_URL

taskflow://WEB-INF/taskflows/axf-tasklist-tfd.xml#axf-tasklist-tfd


3.4.6 Update Task Command

The Update Task command updates the list of attributes in the BPEL task or updates values in the XML payload using XPATH. (For an XPATH example, see "Example Implementation".)

You can create your own parameter keys for the Update Task command and use either a system attribute or an XPATH for the parameter value. AXF searches the request parameters and finds all the values that match the parameter keys (besides outcome), and pulls parameter keys for the list of attributes to use in that task payload.

To update a non-payload attribute in the BPEL task, use a system attribute from those listed in "System Attributes". For example, the UpdateTask command can take the value of outcome (defined as PARAMETER_KEY) from the request parameter and update the OUTCOME (defined as PARAMETER_VALUE) attribute value in the task.

3.4.6.1 Update Task Parameters

Table 3-43 Parameters for UpdateTaskCommand

Parameter Key Description

outcome

Specify the outcome defined for the human work flow system. Default bpel outcomes are singular, APPROVE, or REJECT.


3.4.6.2 System Attributes

System Attributes
ACQUIREDBY
APPROVERS
ASSIGNEDDATE
ASSIGNEDGROUP //Cannot be updated
ASSIGNEDUSER //Cannot be updated
CREATEDATE
CREATOR
DATEATTRIBUTE1-DATEATTRIBUTE5
EXPIREDDATE
ENDDATE
FORMATTRIBUTE1-FORMATTRIBUTE5
FROMUSER
NUMBERATTRIBUTE1-NUMBERATTRIBUTE5
OUTCOME
OWNERGROUP
OWNERUSER
PRIORITY
STATE
TASKID
TASKNUMBER //Cannot be updated
TITLE
TASKDEFINITIONNAME
TEXTATTRIBUTE1-TEXTATTRIBUTE10
UPDATEDBY
URLATTRIBUTE1 - URLATTRIBUTE5

3.4.6.3 Example Implementation

This XPATH example updates transactionID in the payload: the parameter key InvoiceTransactionID is the key defined in the request parameter. The value is XPATH:TransactionID where XPATH defines that the attribute TransactionID is defined in the AXF_XPATH_ATTRIBUTES Table.

Fields not shown: SOLUTION_NAMESPACE=InvoiceProcessing

Table 3-44 Example UpdateTaskCommand Parameters in AXF_SOLUTION_PARAMETERS Table

COMMAND_NAMESPACE CONFIGURATION_NAMESPACE PARAMETER_KEY PARAMETER_VALUE

AttachSupplemental

oracle.imaging.axf.commands.bpel.UpdateTaskCommand

InvoiceTransactionID

XPATH:InvoiceProcessing_TransactionID

SaveInvoice

oracle.imaging.axf.commands.bpel.UpdateTaskCommand

InvoiceTransactionID

XPATH:InvoiceProcessing_TransactionID


3.4.7 Update Task From Procedure Command

The Update Task From Procedure command calls a stored pl/sql procedure using a specified data source and updates the task payload using XPATH.

3.4.7.1 Update Task From Procedure Parameters

Table 3-45 Parameters for UpdateTaskFromProcedure Command

Parameter Key Description

XPATH_USERS

Specifies an XPATH variable contained in the AXF_XPATH_ATTRIBUTES Table that refers to the XPATH where the list of returned data is to be stored.

CMD_EMPTY_LIST

Specifies the command to be executed if no results are returned from the pl/sql function.

CMD_NON_EMPTY_LIST

Specifies the command to be executed if results are returned from the pl/sql function.

JNDI_DS

Specifies the name of the JNDI data source, configured on the Application Server, to use for execution of the pl/sql function.

PLSQL_PROC

Specifies the name of the pl/sql function to call.


3.4.7.2 Example Implementation

Fields not shown: SOLUTION_NAMESPACE=InvoiceProcessing

Table 3-46 Example UpdateTaskFromProcedureCommand Parameters in AXF_SOLUTION_PARAMETERS Table

COMMAND_NAMESPACE CONFIGURATION_NAMESPACE PARAMETER_KEY PARAMETER_VALUE

RetrieveUserList

oracle.imaging.axf.commands.bpel. UpdateTaskFromProcedureCommand

XPATH_USERS

XPATH:InvoiceProcessing_InvoiceApprovalAssignment

RetrieveUserList

oracle.imaging.axf.commands.bpel. UpdateTaskFromProcedureCommand

CMD_NON_EMPTY_LIST

InvoiceApprovalEdit

RetrieveUserList

oracle.imaging.axf.commands.bpel.UpdateTaskFromProcedureCommand

CMD_EMPTY_LIST

CompleteInvoice

RetrieveUserList

oracle.imaging.axf.commands.bpel.UpdateTaskFromProcedureCommand

JNDI_DS

jdbc/AXFEBS11DataSource

RetrieveUserList

oracle.imaging.axf.commands.bpel.UpdateTaskFromProcedureCommand

PLSQL_PROC

AXFRETRIEVEUSERLIST


3.4.7.3 Example PL/SQL Procedure

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;

3.4.8 Terminate Conversation Command

The Terminate Conversation Command is used by an external client to terminate a conversation with AXF.

3.4.9 Validate Task Command

The Validate Task command validates BPEL system attribute data or BPEL payload data, and based on validation results, executes a subsequent command.

Table 3-47 lists configuration parameters for this command. These parameters are used in the AXF_SOLUTION_PARAMETERS Table to configure commands.

3.4.9.1 Validate Task Command Parameters

Table 3-47 ValidateTaskCommand Parameters

Parameter Key Description

ATTRIBUTE_TO_VALIDATE

Specifies the attribute in the BPEL task to validate. This can be either a system attribute or a payload attribute. If specifying a payload attribute, use a prefix value of XPATH: and reference a value from the AXF_XPATH_ATTRIBUTES Table.

REGULAR_EXPRESSION

Defines a standard Regular Expression for validating the specified attribute.

CMD_ON_PASS

Specifies the command to execute after this command, if the validation is successful.

CMD_ON_FAIL

Specifies the command to execute after this command if the validation fails.

FAIL_MESSAGE

Specifies the message to display if the validation fails.


3.4.9.2 Example Implementation

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 3-48 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.4.9.3 Example Implementation Instructions

Follow these steps to add a validation that verifies that a Transaction ID is present before allowing a task to be completed.


Note:

This example assumes that you have installed the Invoice Processing template data.


Note:

This configuration change should be applied only in use cases where users must create the business application invoice before the task can be completed. 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 3-49 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 3-48 to the AXF_SOLUTION_PARAMETERS table.

  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 3-50 AXF_ACTIONS Table

    ACTION_ID VIEW_ID DISPLAY_NAME COMMAND_NAMESPACE MENU_ORDER

    CompleteInvoice

    /TaskViewer.jspx

    Complete Invoice

    ValidateTransactionID

    3


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

3.4.11 Configuring Chained Commands and Web Tools

Some AXF commands have parameter keys that specify what occurs after the command is completed, allowing you to chain them. For example, Table 3-51 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 3-51 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