Defining a Task

  

DEVELOPER

To create, amend, delete Tasks, add functions to the task, map function parameters and view function links,follow these steps:

  1. Click Create a New PROIV Object icon on the main PROIV Toolbar.

  2. Select the New Task menu option.

  3. The Name the New Task window appears.

  4. Enter the name of the Task in the Task Name field.

  5. Enter the description of the Task in the Task Description field.

  6. You can click the icon to view a window containing existing Tasks. This is useful in that it shows the pre-existing Task names enabling you to select a unique name for the Task.

  7. Click OK to save the details.

Complete the fields using the following table as a guide:

Item

Description

Task Name

Enter a unique name for the new Task. Do not include spaces in the name. PROIV attaches the three-character prefix TK_ to the name, consequently, do not enter more than 29 characters for the Task name.

Task Description

Enter a description of the task

  1. Enter the name of the Task in the Task Name field. Do not include spaces in the name. PROIV attaches the three-character prefix TK_ to the name, consequently, do not enter more than 29 characters for the Task name.

  2. Enter the description of the Task in the Task Description field.

  3. You can click the magnifying glass icon to view a window containing existing Tasks. This is useful in that it shows the pre-existing Task names enabling you to select a unique name for the Task.

  4. Click OK to save the details.

  5. The Editing Tasks window appears. This window enables you to create, amend, delete Tasks. You can also add functions to the task, map function parameters and view function links.

  6. Complete the fields using the following table as a guide:

Item

Description

Task Definition Toolbar

 

Click to open a new Task Definition. The Open Object window appears.

Click to create a new Task Definition. The Name the New Task window appears.

or

Click to Toggle Automatic Book In.

Click to display the Back up and Restore Task utility which saves and restores Tasks.

Sends the Task details to a PDF which can printed if required.

 

 

Definition Tab

This tab enables you to define the functions that are called by the Task.

Task Being Edited

Displays the name of the Task currently being edited.

Task Description

Displays the description of the Task being edited.

Start Function

Enter the first function that is run when Task is called. You can either enter the function name, or click the ... to display the Function Selection window and locate the function.

Note: It is advisable that Tasks call non-Global Functions only.

Mandatory

Exit Function

Enter the last function that is run when Task is called. You can either enter the function name, or click the ... to display the Function Selection window and locate the function. The Exit function has a dual purpose. If the Task ends, then the function is executed, or if the function is executed, the Task ends.

Error Function

If an error occurs during the Task, this function is executed. You can either enter the function name, or click the ... to display the Function Selection window and locate the function

The Exit function is a function or Task that is executed before control is passed back to the caller. If the application or PROIV VM detects a fatal error, the Error function rather than Exit function is taken. However, in case of a rollback, @RFUNCT executes before the Task Error function.

Task XML Tag

Enter an XML tag for the Task. Any function level XML tags are nested within this. This relates to the Report Print Output options -XML to the Bus & Tasks API only.

Description

Field is automatically populated from the Name the New Task window.

Function List Type

Selection determines the context of the functions that are displayed on the Function List tab.

Exclusive

If you select the Exclusive check box, the Task can run any function except for those on the Function List. The functions listed do not belong to the Task and cause its termination. All other functions can be executed. An exclusive list can be empty allowing all functions to be executed. An Exit function is mandatory when the Exclusive check box is selected.

Inclusive

If you select the Inclusive check box, the Task can only run those functions that you include on the Function List. If a function is linked to (other than a called function) the Task terminates just prior to that function’s execution. This is the default option.

 

 

Parameters Tab

The tab enables you to set up the variables that are supplied as parameters to the functions called by the Task.

The Parameters tabParameters tab on the Function Definition window is useful for non-Global Functions in that the second line for each parameter on the Parameters tab contains the name of the Task variable to be mapped to that parameter.

Note: It is advisable that Tasks call non-Global Functions only.

I/O

Select the Parameter Type:

I – Input - used for transferring information from a third party program into PROIV.

O – Output - used to transfer information from PROIV to the third party program.

B – Both  - used as an input parameter or output parameter.

G – Global - available to any function run by this Task.

 

Click here to view examples of parameters usage.

Variable

The name of the Task variable to be passed in the parameter.

Type

Enter the type of variable:

A - Alpha, N - Numeric, or W – Wide

Len

Enter the length of the variable.

Dim

If the variable is an array, enter the number of elements.

Parameter Description

Enter a description of how the parameter is used.

 

 

Function List Tab

This tab enables you to set up a Function List. Options here are determined by the selections made on the Definitions tab in the Function Type List section.

If you define the Function List Type as Inclusive, the Task can only run those functions selected for the Function List. If you define the Function List Type as Exclusive, the Task can run any function except those selected for the Function List.

Included/Excluded Functions

Enter either the full name or a partial name for the function. Click on the icon to toggle between full and partial name matches.

Click ... to display the Function Selection window. Click here to learn more about the window's options.

Name

Displays the name of the selected function.

Type

Displays the object type.

Description

Displays the description of the selected function.

Advanced Button

Click Advanced to display the Select Functions window. Use this window to build selection criteria for the functions that you want to add to the Function List.

Delete

Click Delete the highlighted functions from the Function List.

Delete All

Click Delete All to clear the Function List.

 

 

Note Tab

This tab enables you to create a free format description of the Task.

Sequence Number

Displays automatically generated sequence number.

Note

Enter a free format description of the Task.

  1. Click OK to save the Task details and to close the Editing Task window.

Comment on this topic

Topic ID: 540035