This blog
guides you to add functionality to the existing composites. There are 3
different type of actions configurable with Oracle provided AP Solution
Accelerator.
- Invoke “outcome” of human task
- Do validations, like Transaction id is blank.
- Allow user to pick user/ Group from list.
The below
description focuses on “invoke outcome”. Remaining type of actions and its
details will follow on next blogs.
For each solution namespace (can be analogous to BPEL
composite, most of the times) that you create, there is an AXF Tasklist page (url
has “cmd=Start<SOLN_NAMESPACE>&sol=<SOLN_NAMESPACE>” – assuming that you
have already made the database entries for Start<SOLUTION_NAMESPACE>. If
not, do not worry, there will soon be another article explaining how to do that)
where the end user is provided with the option to take any of the actions that
you have configured in your BPEL Human Task. The AXF task list page for a
particular Solution Namespace and Command Namespace provides you with all the
instances of invoices currently under a particular view.
View Task opens the AXF Task Details page, which has some actions in the left side bar.
In case you want more flexibility with these actions, you
need to do some data manipulations in the AXF Database, using the DEV_IPM
schema.
Let us first look at the tables in this story:
1. AXF_ACTION_MENU
In this table, the entry for Solution_Namespace is made.
Menu_ID is auto incremented using a sequence (AXF_ACTION_MENU_SEQ).
Rest all the entries are to be done
as they are for other rows.
2.
AXF_ACTIONS

Action_ID is again auto incremented using the sequence AXF_ACTIONS_SEQ.
Display_Text is the label you want to give your action on the UI.
Menu_Order acts as a rendering switch – 0 means visible and other
values means not rendered.
Menu_ID is the same as the one in the AXF_ACTION_MENU table, for
the Solution_Namespace.
3.
AXF_COMMANDS

SOLUTION_NAMESPACE
|
COMMAND_CLASS
|
COMMAND_NAMESPACE
|
<Your_Solution_Namespace>
|
oracle.imaging.axf.commands.bpel.AutotaskCommand
|
AutoOpenTask
|
<Your_Solution_Namespace>
|
oracle.imaging.axf.commands.bpel.ReleaseTaskCommand
|
CancelTask
|
<Your_Solution_Namespace>
|
oracle.imaging.axf.commands.bpel.CompleteTaskCommand
|
<Command Namespace you entered in
AXF_ACTIONS>
|
<Your_Solution_Namespace>
|
oracle.imaging.axf.commands.bpel.OpenTaskCommand
|
OpenTask
|
<Your_Solution_Namespace>
|
oracle.imaging.axf.commands.bpel.ReleaseTaskCommand
|
SkipTask
|
4.
AXF_SOLUTIONS

5.
AXF_SOLUTION_PARAMETERS

For each Command Namespace (i.e.
the action you want to add to the UI), there will be 3 entries, which will have
the following values:
On the AXF Worklist page, there is
an Auto Task button, clicking which open up all tasks in the list in serial
order for appropriate actions to be taken by the user. The CMD_AUTOTASK_OFF parameter key’s value will redirect AXF view to
the default starting point of your AXF flow in the case when the Auto Task
function is not available to the user.
CMD_AUTOTASK_ON points to AutoOpenTask, which is nothing but
another Command Namespace created as a part of the
Start<Solution_Namespace> entries. The details for AutoOpenTask are as
follows:
If you are creating a new composite
and don’t have the Start<SolutionNamespace> entries in place, then you
will have to do that first.
OUTCOME maps to the value which your BPEL flow is expecting as a
return value from the Human Task in this case.
PS: Please note that you are not supposed to create the entries for
AutoOpenTask as a part of this exercise. It is a separate topic, and will be
addressed in another post.
6.
AXF_SOLUTION_ATTRIBUTES
SOLUTION_NAMESPACE
|
PARAMETER_KEY
|
PARAMETER_VALUE
|
< SolutionNamespace>
|
BPEL_CONNECTION
|
SOA Server
|
< SolutionNamespace>
|
CONNECTION_PROVIDER
|
oracle.imaging.axf.servicemodules.bpel.workflow.AxfWorkflowServiceModule
|
< SolutionNamespace>
|
USE_AUTOTASK_LOCKING
|
FALSE
|
The keys CONNECTION_PROVIDER and
USE_AUTOTASK_LOCKING are given the standard values, as in the snapshot.
BPEL_CONNECTION is the name of the connection that is created for the SOA
Server in IPM UI.
Once
the entries are made using values that we are supposed to enter in various
tables as described above, there is one final step that remains to be done for
the changes to reflect on the AXF Task details page.
Open
the IPM Drivers UI (http://<your_server_ip>:16000/imaging/faces/Driver.jspx).
The page that looks like this:
Enter
the Solution Namespace, Command Namespace (Remember, the
Start<SolutionNamespace> command namespace. And yes, it is a Command
Namespace, though it is never shown as an action on the Task details page!!!)
and the user name.
Click
on Execute Request.
Click
on Clear Configuration Cache.
Click
on Reset DMS Metrics.
Click
on Execute Response. This shall open your AXF Tasklist page in a new tab, and
you should be able to see the newly added action on the details page.
Thanks all for reading!
Thanks all for reading!