5.4 Action Reference

This section describes the actions you can add to forms. The actions are implemented as buttons. You can specify a custom display label for each button.

Table 5-3 Valid Actions

Action Name

Form Type

Description

ApprovalAction

Approval

Causes the Approval activity to complete and follow the approved flow path to the next activity. When you use this action, you must set the Hide If Read Only form property to True; otherwise the form fails validation when you it.

HINT:An ApprovalAction requires the Approval Activity associated with the form to have an approved flow path exiting the activity.

CancelAction

Request and Approval

For request forms, Cancel returns the user to the Request Resource Search Criteria form. For approval forms, Cancel returns the user to the My Tasks list.

CommentAction

Approval forms

Generates a button with the default label set to View Comment History. The button launches a Comments dialog box displaying the processing history for each activity from the workflow start to the present time. Data displayed includes Date, Activity Name, User, and Comment as shown in the following example.

Comments are updated and persisted to the workflow database through the UpdateAction (described below).

NOTE:Any forms containing this action must also contain a field named apwaComment.

DenyAction

Approval

Causes the Approval activity to complete and follow the denied flow path. When you use this action, you must set the Hide If Read Only form property to True; otherwise, the form fails validation when you it.

HINT:A DenyAction requires the Approval Activity associated with the form to have a deny flow path exiting the activity.

RefusalAction

Approval

Causes the Approval activity to complete and follow the refused flow path. When you use this action, you must set the Hide If Read Only form property to True; otherwise, the form fails validation on.

HINT:A RefusalAction requires the Approval Activity associated with the form to have a refusal flow path exiting the activity.

SubmitAction

Request and Approval

Initiates the workflow and causes the workflow to execute the forward flow type. The workflow passes any user-entered data to the next activity in the workflow.

UpdateAction

Approval

Causes the Approval activity to write a user comment to the workflow database. There is typically a text area associated with an apwaComment form field. If the user enters text in this field and clicks this action, it is persisted to the afcomment table in the workflow database. The comment can be retrieved and viewed through the CommentAction (described above). The following example shows a text area and an update action button (labeled UpdateAction):

NOTE:The form must contain a field named apwaComment; otherwise, the provisioning request definition fails validation.

For more information about apwaComment, see Controls for User-Entered Comments.

The following table describes the properties you can set on actions.

Table 5-4 Action Properties

Property Name

Description

Display Label

Specifies the text to display on the button.

Visible

If True, specifies whether the action is visible at runtime.

Block On Error

If True, specifies that the action is blocked if any of the form’s controls fail validation. This is recommended for the SubmitAction.

Do not set to False if the action button submits data; otherwise, invalid data can be submitted, causing unexpected results.

Hide If Read Only

If True, specifies that the action is hidden when the form is read-only. A form can be read-only when the user opens a task without claiming it first. If your form contains the ApprovalAction, DenyAction, or RefusalAction, this property must be set to true. If it is set to False, you encounter a validation error and cannot the form.