10.1 Start Activity

The Start activity is the first activity of a workflow. This activity begins execution when the user makes a request to provision a resource. After the user makes the request, the Start activity displays the request form to the user. The request form asks the user can be asked to provide reason for the request.

You can customize the request form to suit your application requirements. For details on customizing forms, see Section III, Working with Forms Catalog.

Before displaying the form to the user, the Start activity performs any pre-activity data mappings specified for the activity.

After the user submits the form, the Start activity performs any post-activity data mappings specified for the activity. These mappings typically include copying data from form fields into the flowdata object.

10.1.1 Properties

The Start activity includes the following properties:

Table 10-1 Start Activity Properties

Property Name

Description

Identifier

A unique string value that identifies the activity. Workflow Builder generates this value automatically in the <Activity>_<N> format, where <Activity> represents the name of the activity and <N> represents an alphanumeric value that contains seven characters.

Name

Provides a name for the activity.

Form

Specifies the name of the request form to display at runtime. Select the name of the form you want to use, or create a new form. For information on how to create a new form using Form Builder, see Creating New Forms.

After you select the form, select the data items to include in the form from the listed data items.

You must associate a form with a Start activity. If you do not specify a form an error message appears at runtime.

Resource Name Override Type

Allows you to specify the resource name type. The name can be either an ECMA expression, or a constant value.

  • Define expressions using the ECMA expression builder. At runtime, the expression is evaluated and replaced with a meaningful value.

  • Type the constant value in the Resource Name Override field. The value is displayed exactly as entered in the field.

Resource Name Override

Allows you to change the name of the workflow at runtime. This name is displayed in the Workflow Monitoring page.

10.1.2 Data Items

To bind the data items associated with the Start activity, you define pre-activity and post-activity mappings. The pre-activity mappings initialize data in the request form with constants or values retrieved from the flowdata object. The post-activity mappings move form data back into the flowdata object.

Table 10-2 Start Activity Data Item Mappings

Setting

Description

Pre Activity

Allows you to specify one or more pre-activity mappings. When you select this option, you can click a cell in the Source Expression column to specify where the initial request form gets data for a particular target form field.

The pre-activity mapping expression is evaluated twice before the form is presented, once during the initial presentation of the form, and again before the post activity to ensure that all the values on the form have a valid type including those that were not initialized. As a result, any calls made to external systems are made twice. For example, a call that retrieves a unique counter for a value makes two calls that allocates two counters, with the last one requested being used.

NOTE:

  • When you select the Pre Activity option, you cannot edit the cells in the Target Form Field column.

  • To make sure the request and approval forms are rendered, while specifying the source expression for the date fields in the Pre-Activity mapping section, you must enter the date in the format given below:

    <YYYY><MM><DD> <time> <GMT offset>

    For example, to specify the date June 1st, 2023, 9.30 AM in the morning (IST,) you must enter it as:

    2023060109300000+0530

Post Activity

Allows you to specify one or more post-activity mappings. When you select this tab, you can click a cell in the Target Expression column to specify where data from a form field should be copied after the form has been processed.

NOTE:When you select the Post Activity option, you cannot edit the cells in the Source Form Field column.

MAP ALL

Allows you to generate data from the Pre Activity column, that is stored in a variable, to the Post Activity column.

Source Expression

Specifies a source expression for a pre-activity mapping. When you click a cell in the Source Expression column, the ECMA expression builder appears to help you define your expression.

Target Expression

Specifies a target expression for a post-activity mapping. When you click a cell in the Target Expression column, the ECMA expression builder appears to help you define your expression.

For details on building ECMA expressions, see Section 11.0, Working with ECMA Expressions

10.1.3 Email Template

Email templates are not supported with this activity.

10.1.4 Problems

The Problems tab provides details of the errors and warnings associated with the activity in a workflow. For more information about validating workflow activities, see Validating a Workflow.