This chapter describes how to add and use Action Buttons in reports that you create in Oracle Business Activity Monitoring (Oracle BAM) Active Studio, to allow report users to take some action with selected data in the reports.
This chapter contains the following topics:
Action Buttons let you manually take some action on data in a report. Action Buttons can take data from an Action List or an Action Form to execute a read/write action on data input or selections from that action list or form. Action Buttons can also invoke actions without any data inputs if they are defined without reference to an Action List or Action Form.
Action Buttons can appear in any report, but some actions can be defined only in the Action List view. In order to do some action with the selected data in an Action List or Action Form you must create Action Buttons.
This section provides information about creating Action Buttons. It contains the following topics:
Section 9.2.3, "Configuring Constant Value Update Action Types"
Section 9.2.4, "Configuring Edit Column Update Action Types"
Section 9.2.10, "Configuring Show a Confirmation Message Action Types"
Create a report with an Action List view.
Click Change Report Properties in the Actions list.
The Report Properties dialog box opens.
Select the Action Buttons tab.
Click New.
The Action Button Creation and Edit dialog box opens.
Enter a Name and Description for the Action Button.
The text you enter in the Name field is displayed as the button text in the report.
Select Commit all actions in a single transaction to have all of the actions configured in this Action Button take place as a single transaction.
Click Next.
Click Add to define an action for this Action Button.
The Action Editor opens.
Select an Action Type from the list and click Next. Many action types only apply to Action List views as described in Table 9-1.
Action Type | Description |
---|---|
Insert |
Inserts a row into the specified data object and populates the column values of that row according to the defined mappings |
Constant Value Update |
Updates fields in the selected rows of the specified Action List with the defined value (Action List only) |
Edit Column Update |
Commits all edits made in editable columns from the specified Action Lists (Action List only) |
Delete |
Deletes all selected rows for the specified Action List (Action List only) |
Open a URL |
Opens a URL in a separate window. The URL is constructed by concatenating each of the specified terms. |
View a Report |
Opens a report and enables you to map values from the current report to parameters in the destination report. |
Reset a Form |
Clears any edits made to form inputs in the specified Action Form view or editable columns in the Action List view (Action Form and Action List only) |
Refresh a View |
Reloads the specified views |
Show a confirmation message |
Displays a confirmation message dialog box before performing any of the other actions configured for this Action Button. |
Define the action.
See the action type configuration sections for more information:
When you have finished adding actions, you can put them in order using the Arrange arrow buttons.
Click Next.
Width specifies the width of the Action Button. Auto fit makes the button as wide as the button text or you can specify the width in pixels.
Button Location displays the button as part of the report or as part of a view.
For Open a URL action types, when you display the button as part of a view you can alternatively choose to Display as a column of formatted links in the selected view. This option creates a hyperlink out of the values in the selected column instead of placing a button in the view. You can then choose to open a separate window, replace the view, or replace the report when a user clicks the link.
Alignment displays the button at the top or bottom of the report or view.
Click OK to close the Action Button Creation and Edit dialog box.
Click OK to close the Report Properties dialog box.
The Action Button appears in the report.
The Insert action type enables you to insert a row into a target data object and populate the column values of that row according to the defined mappings.
To configure the Insert action type:
Select the Insert action type in the Action Editor.
Click Next.
Click Browse to select the target data object for the insert. The mappings table is populated with the columns and data types of the target data object.
Select a column and click Edit Mapping.
The Value Mapping Creation and Edit dialog box opens.
For each column, select a mapping type from the list.
Table 9-2 Mapping Types for Insert Action Type
Mapping Type | Description |
---|---|
None |
No mapping is done between the current and target data objects. |
Constant Value |
A constant value is inserted in the target data object. The specified value is validated against the data type of the column populated by this mapping. If you specify a string value for an integer column, an error message occurs. |
Prompt/Parameter |
The value held by the prompt or parameter is used as the value to insert in the target data object. It always retrieves the current value of a prompt or parameter even if it is changed by driving or surface prompts. To use this option the report must contain a prompt or parameter which is assigned to a filter in a view, or a custom parameter must be created in Server BAM Architect. See Chapter 8 |
Client Cookie |
Maps the value of a cookie that resides on the client where this report is viewed. |
Unique button click ID |
Maps a unique ID number (randomly generated) to the target field. |
Value from an ActionList view |
A value from the selected rows in an Action List is inserted into the target data object. The Insert a separate row for each into the Destination Data Object option causes there to be multiple result sets. In the Insert action type this results in multiple rows inserted in the target data object. A special case arises when there are multiple Value from an ActionList view mappings used in a single Action Button, and if more than one of those mappings have the Insert a separate row option selected. For example, if there are two rows selected in one Action List and three rows selected in another Action List, it results in 6 rows inserted into the target data object. |
Value from an ActionForm view |
A value from the selected input field in an Action Form is inserted into the target data object. Any inputs that have an rtsEnabledID attribute in the HTML is represented in the list of values. |
To populate the inserted row in the target data object with values, each column can be mapped to a different source of data.
If a column is mapped to None, null is inserted for that column. If the column is non-nullable, the default value for the data type is used. For example, if there is no mapping specified for a non-nullable integer column, zero (0) is inserted. String is the only data type that does not have a default value. Therefore, if you attempt to insert null into a non-nullable string column, the action fails.
Click Next.
Enter the definition for the type you selected.
Click OK to close the Value Mapping Creation and Edit dialog box.
Edit the mappings for any of the other columns.
Click OK to close the Action Editor.
The Constant Value Update action type enables you to update fields in the selected rows of the specified Action List with a specified value. This action type is used in Action List views only.
To configure the Constant Value Update action type:
Select the Constant Value Update action type in the Action Editor.
Click Next.
Select an Action List view.
Select a field in the Column list and enter a value in the Value field. Select Null if you want the value to be null.
Click OK to close the Action Editor.
The Edit Column Update action type commits all edits made in editable columns from the specified Action Lists. The user does not have to select the checkboxes to specify which rows should be updated. This action type is used in Action List views only.
To configure the Edit Column Update action type:
Select the Edit Column Update action type in the Action Editor.
Click Next.
Select one or more Action List views with editable columns.
Click OK to close the Action Editor.
The Delete action type deletes all selected rows in the specified Action List. This action type is used in Action List views only.
To configure the Delete action type:
Select the Delete action type in the Action Editor.
Click Next.
Select one or more Action List views.
If only one Action List is selected, and there are no other actions defined for the Action Button, you are given the choice to display the Action Button either as a regular button or a trashcan icon in the final step of the Action Button Creation and Edit dialog box.
Click OK to close the Action Editor.
The Open a URL action type opens a URL in a separate window. The URL is constructed by concatenating each of the specified terms.
To open a report URL, you should use the View a Report action described in Section 9.2.7, "Configuring View a Report Action Types."
To configure the Open a URL action type:
Select the Open a URL action type in the Action Editor.
Click Next.
Click New Term.
The Value Mapping Creation and Edit dialog box opens.
Choose a mapping type to create a term.
Table 9-3 Mapping Types for Open a URL Action Type
Mapping Type | Description |
---|---|
Constant Value |
A constant value is inserted in the target data object. The specified value is validated against the data type of the column populated by this mapping. If you specify a string value for an integer column, an error message occurs. |
Prompt/Parameter |
The value held by the prompt or parameter is used as the value to insert in the target data object. It always retrieves the current value of a prompt or parameter even if it is changed by driving or surface prompts. To use this option the report must contain a prompt or parameter which is assigned to a filter in a view, or a custom parameter must be created in Server BAM Architect. See Chapter 8 |
Client Cookie |
The value of a cookie that resides on the client where this report is viewed. |
Unique button click ID |
A unique ID number (randomly generated). |
Value from a List view |
A selected value in any List view. This is made possible when you elect to display a column as hyperlinks instead of creating a button for an action. See Section 9.2, "Creating Action Buttons" |
Value from an Action Form view |
The value of the selected input field. Any inputs that have an rtsEnabledID attribute in the HTML is represented in the list of values. |
Click Next.
Enter the definition for the type you selected.
Click OK to close the Value Mapping Creation and Edit dialog box.
Select the Encode checkbox to encode the term.
Create more terms if necessary.
Select Click here to edit window features to change the browser window properties if necessary.
Enter a maximum number of windows to open.
When you use the Value from an Action List view mapping type and the user selects multiple rows in the list, you can open a separate URL for every checked row in the Action List. The maximum specified here limits the total number of windows that can be opened simultaneously. Opening too many windows simultaneously can cause the client system to malfunction.
Arrange the terms in the correct order using the Arrange arrow buttons.
Click OK to close the Action Editor.
The View a Report action type opens a report and enables you to map values from the current report to parameters in the destination report.
To configure the View a Report action type:
Select the View a Report action type in the Action Editor.
Click Next.
Click Browse to select the target report to open.
Define mappings for each parameter in the target report.
Select a parameter or prompt in the parameter column.
Click Edit Mapping. The Value Mapping Creation and Edit dialog box opens.
Select a mapping type from the list
Table 9-4 Mapping Types for View a Report Action Type
Mapping Type | Description |
---|---|
None |
No mapping is done. |
Constant Value |
A constant value. The specified value is validated against the data type of the column populated by this mapping. If you specify a string value for an integer column, an error message occurs. |
Prompt/Parameter |
The value held by the prompt or parameter is used as the value for the target parameter. It always retrieves the current value of a prompt or parameter even if it is changed by driving or surface prompts. To use this option the report must contain a prompt or parameter which is assigned to a filter in a view, or a custom parameter must be created in Server BAM Architect. See Chapter 8 |
Client Cookie |
The value of a cookie that resides on the client where this report is viewed. |
Unique button click ID |
A unique ID number (randomly generated). |
Value from an ActionList view |
A value from the selected rows in an Action List. |
Value from an ActionForm view |
A value from the selected input field in an Action Form. Any inputs that have an rtsEnabledID attribute in the HTML is represented in the list of values. |
Click Next.
Enter the definition for the type you selected.
Click OK to close the Value Mapping Creation and Edit dialog box.
Edit the mappings for any of the other parameters.
Select Click here to edit window features to change the browser window properties if necessary. This is the browser window that the target report opens in.
Enter a maximum number of browser windows that can open.
Click OK to close the Action Editor.
The Reset a Form action type clears any edits made to form inputs in the specified Action Form view or editable columns in the Action List view.
To configure the Reset a Form action type:
Select the Reset a Form action type in the Action Editor.
Click Next.
Select one or more Action Form or Action List views.
Click OK to close the Action Editor.
The Refresh a view action type reloads the specified views. This action is not needed for most views because they support active data and automatically update when the data changes. This action is useful for views that do not support active data:
External Content. This view can display any external URL, and it might be useful to supply a refresh button in the view if the content changes.
Action List with editable columns. Action Lists do not support active data when one or more columns is editable, so it is useful to supply a refresh button to display any changes to the data.
To configure the Refresh a view action type:
Select the Refresh a view action type in the Action Editor.
Click Next.
Select one or more views.
Click OK to close the Action Editor.
The Show a confirmation message action type displays a confirmation message dialog box before performing any of the other actions configured for this Action Button.
To configure the Show a confirmation message action type:
Select the Show a confirmation message action type in the Action Editor.
Click Next.
Enter the text to display in the confirmation dialog box.
Click OK to close the Action Editor.