Our good friend and Oracle ACE Director Antonis Antoniou has blogged about how approval controls can be disabled in the Oracle BPM Suite 12c workspace.
This article is not an attempt to splog what Antonis has already shared. In his blog, Antonis provides a mechanism to trick the BPM 12c human workflow engine into disabling the approval controls for a task, visible in the BPM workspace, by manually modifying the .task configuration file. While this is a great workaround, it would become cumbersome if this was to be done for all tasks. This article is intended to provide a code free approach to solve the same problem which is easier to apply globally to all tasks and change through configuration.
The Use Case######
A human task, implemented using Oracle Human Workflow engine, can be actioned from the BPM workspace. Oracle BPM 12c workspace provides a context based inbox to view task headers. The workspace also provides a region to display the task details if it is implemented as a bounded task flow.
The Oracle Human Workflow engine provides a state transition engine for human tasks. Tasks can be assigned, reassigned, delegated, suspended, renewed, started, stopped, etc. In addition to these generic task actions which only changes an active state of the task, the engine also allows configuring Outcomes for a task. A task outcome completes the lifecycle of a task.
The following illustration shows how a bounded task flow appears in the BPM workspace. Notice how the task approval controls are provided at two levels. One from within the bounded task flow region at a task level and the same outcomes are also available from the **Actions **menu at the workspace level.
Approval controls that appear on the task level can be overloaded i.e. you can do additional pre and post processing steps in addition to completing the standard task outcome. For example, if you wanted to build an auditing capability to record which user acted on a task and what fields were entered/modified as part of the corresponding actions, it can be done by extending the default action behavior in the ADF task flow implementation of the human task. However in these cases you would want to disable the approval control at the workspace level.
Approval controls for the BPM workspace can be disabled in two ways and this article provides instructions for these approaches in addition to describing the benefit of one approach over another.
- Option 1 - Task Configuration Change
One way to do so is by modifying the human task definition file (.task file) by switching to source view and inserting into the "preActionMandatoryUserSteps" element the following:
<preActionMandatoryUserStep> <userStep>VIEW_DETAILS</userStep> <outcome></outcome> </preActionMandatoryUserStep>
There are a few limitations of this approach:
If this is critical functionality, there will be an additional manual step to verify that the approval controls do not appear for every task that is accessed from the workspace.
This configuration is embedded in the .task file which is part of the composite assembly, any change in requirement to enable the approval control in the BPM workspace again, will require a redeployment of the composite.
The configuration is part of a .task file and will have to be individually applied to all tasks deployed to the human workflow engine.
Option 2 - Workspace Configuration Change
There is another feature available from within the BPM workspace, albeit still HIDDEN, to disable the task approval controls at the workspace level.
Login to the BPM Workspace as an administrator and navigate to Administration –> Application Preferences. Among the many workspace preferences that can be set or changed from here, the one relevant to disabling approval control in the BPM workspace is the Worklist Action Menu option. Choosing between Show or Hide will either enable or disable the feature at runtime.
By default the value for this option is set to Show. The Action menu will show a list of pre defined workflow actions that are available for the selected task in the workspace.
When the Worklist Action Menu control is set to Hide and saved through the Application Preferences setting, the Action button will be disabled on the workspace.
This is a true runtime change allowing workspace administrators to flick the values to choose their desired behaviour. Once this change is applied, it also affects all tasks that are accessed from this workspace.
This feature is also available in Oracle BPM Suite 11g, but only if you are using 184.108.40.206 (PS6), from the Application Preferences console for workspace administrators.
Approval controls at the workspace level are the only way to action multiple inbox tasks in bulk. For instance, if a user wanted to claim or submit more than one task at a time, he can select these tasks in the inbox and action them from the workspace Actions menu. A potential side-effect of disabling approval controls is that it takes out the 'Bulk' action capabilities from the workspace.
Human task approval controls are important to transition intermediate task states and also capture task outcomes. If the out of the box Oracle BPM Workspace is used for task management there are two mechanisms through which tasks can be actioned.
It is sometimes confusing for the end users to have task approval controls at two places instead of one. In certain scenarios as explained in this article, when approval controls at the task level are overloaded, behavior of the actions from the workspace Actions menu will be different from within the bounded task. In either cases, you may want an ability to hide or disable workspace Actions menu. This article covered two approaches to achieve this by providing details on how they differ and the advantage of using one approach over another.