6.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 6-2 Valid Actions

Action Name

Form Type

Description

ApprovalAction

Approval

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

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

CancelAction

Request and Approval

Cancels a request. Returns an approval to the previous state.

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 or the form fails validation on deploy.

HINT:A DenyAction requires the Approval Activity associated with the form to have an 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 or the form fails validation on deploy.

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. You typically have a text area associated with an apwaComment. 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). This example shows a text area and an update action button (labeled UpdateAction):

NOTE:The form must contain a field named apwaComment or 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 6-3 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, or 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 will encounter a validation error and will not be able to deploy it.