Oracle® Fusion Middleware Administrator's Guide for E-Business Suite Adapter for Oracle Enterprise Content Management 11g Release 1 (11.1.1) E15865-01 |
|
![]() Previous |
![]() Next |
Home > Administrator's Guide for E... > AXF Tables > AXF Commands
AXF commands include:
AXF command-related topics include:
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.
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.
|
This command initializes autotask mode, in which a new human workflow task is automatically claimed for the user.
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. |
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 |
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 |
The Release Task command releases a human workflow task and displays the AXF Task List web tool, regardless of autotask mode.
Table 3-37 lists configuration parameters for this command. These parameters are used in the AXF_SOLUTION_PARAMETERS Table to configure commands.
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 |
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.
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. |
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 |
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.
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. |
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 |
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.
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 |
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 |
The Update Task From Procedure command calls a stored pl/sql procedure using a specified data source and updates the task payload using XPATH.
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. |
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 |
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;
The Terminate Conversation Command is used by an external client to terminate a conversation with AXF.
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.
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. |
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. |
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). |
Add the following row to the AXF_COMMANDS table:
Add the rows shown in Table 3-48 to the AXF_SOLUTION_PARAMETERS table.
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.
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.
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 |