A.5.8. Custom Dialog Node Type

Engineering Knowledge Manager

User's Guide | Appendix A. Defining a Process Template Using XML | A.5. Defining Nodes |

A.5.7. Update Analysis Project Node Type |  | A.6. Defining Transitions
Prev |  | Next

### A.5.8. Custom Dialog Node Type

A custom dialog node has the following required attributes:

`name`

  specifies the name of the node. It has the same character restrictions as the `name` attribute of the node type. This name will be displayed in the graph and the elements tree. Same restrictions apply as for Node Type.

A custom dialog node has the following optional attributes:

`description`

  specifies the description of the node.

`assignee`

  specifies the name of the user or group who will be assigned the task corresponding to this node. Refer to the definition of `assignee` in Node Type for details. Only the assigned user can view, execute, or cancel the custom dialog task or get notified by email when the custom dialog task execution completes.

`assigneeModifiable`

  specifies whether or not the assignee can be changed. If set to `true`, the process creator or an `admin` user can change the task's assignee in the Process Monitor. This attribute is optional; if not specified, the default value is `true`.

A custom dialog node has the following required child element:

`step`

  specifies a step that will be executed for this dialog. Refer to the dialog step definition in Dialog Step. Each custom dialog node can contain one or more steps. The order that the steps are defined will determine the order when execution takes place. The last step in the sequence will be treated as the completion step.

A custom dialog node has the following optional child element:

`validation`

  specifies the validation that must be performed before the task can be completed. It has the same behavior as the `validation` element for a Node Type.

#### A.5.8.1. User Interface Component Definitions

This section contains definitions for user interface components that are available for a custom dialog.

- Dialog Step

- Panel Grid

- Image

- Spacer

- Upload File

- Command Link

- Command Button

- Table

#### A.5.8.2. Dialog Step

A dialog step definition does not have any required attributes but has the following optional attributes:

`name`

  specifies the name of the step that will be displayed in the process view when the step is executed.

`description`

  specifies the description of the step. This will be displayed in the process view when the step is executed.

`updateMacro`

  specifies the name of the macro that will be executed just before this step is rendered.

`actionMacro`

  specifies the name of the macro name that will be executed on completion of this step. Step completion is accomplished by clicking the Next or Complete button in the custom dialog.

A dialog step definition has the following specifies child elements:

`panel`

  specifies the grid for the panel and can have any number of elements in any order. Refer to Panel Grid for the panel grid definition. Underlying elements can either be a variable or any user interface component that does not require binding such as a spacer.

#### A.5.8.3. Panel Grid

A panel grid definition does not have any required attributes but has the following optional attributes:

`columnCount`

  specifies the number of columns that the panel grid will contain. After the specified `columnCount`, a new row is added for each of the remaining elements. For example, if 10 child elements are added to a panel grid and the `columnCount` is set to 3, then the 10 elements will be rendered in 4 rows, with the first three rows containing 3 elements and a fourth row containing one element.

`id`

  specifies the id of the panel grid.

`displayStyle`

  specifies the CSS style that will be applied to the rendered panel grid component. It can be specified in a similar way in which HTML is specified. For example: `border:2px solid green`.

A panel grid definition has the following optional child elements that can occur any number of times in any order:

`var`

  specifies the name of the variable for the user interface component that will be rendered. If the `readOnly` variable is any type except Reference, a label will be rendered. For a `readOnly` Reference type variable, a command link will be rendered. Table 1: User Interface Components That are Rendered for Different Variables shows the user interface components that will be rendered for the different types of variables.

  Table 1: User Interface Components That are Rendered for Different Variables

  Variable Type | readOnly="False" | readOnly="True"
  --- | --- | ---
  String | Text Box | Label
  Boolean | Check Box | Label
  Double | Text Box | Label
  Long | Text Box | Label
  Date | Date Selection Widget (Text Box + Calendar Button) | Label
  Reference | File Browse widget (Text Box + Browse Button) | Command Link

  If the variable has enumerations defined, it will be rendered as a drop-down list if it is single-valued or a combo-list if it is multi-valued.

`image`

  specifies an image in the dialog. Refer to Image for the definition.

`spacer`

  specifies a blank space between two components in the dialog for layout purposes. Refer to Spacer for the definition.

`uploadFile`

  specifies a file browse component in the dialog. Refer to Upload File for the definition. This component renders as a Text Box and Browse button. When the component is rendered, the corresponding variable will be created and used to manage the uploaded file.

`table`

  specifies a data table in the dialog. Refer to Table for the definition.

`commandLink`

  specifies a command link in the dialog which on-click will execute a specified macro and will re-render specified components. Refer to Command Link for the definition.

`commandButton`

  specifies a command button in the dialog which on-click will execute a specified macro and re-render specified components. Refer to Command Button for the definition.

`panelGrid`

  specifies a nested panel grid as a child of this panel grid. This can be used when you want to define a data table that contains another data table within one of its cells. It has same schema definition as Panel Grid.

#### A.5.8.4. Image

An image definition has the following required attributes:

`id`

  specifies the id of the image element.

`path`

  specifies the relative path of the location where the image is stored. For example: `/images/tank.jpg`. You will need to define the image file as a resource archive in the process definition. See Assigning Custom Dialog Resource Files to a Process Template for details.

An image definition has the following optional attributes:

`height`

  specifies the required height of the rendered image in pixels (px). For example, `200px`.

`width`

  specifies the required width of the rendered image in pixels (px). For example, `100px`.

`displayStyle`

  specifies the CSS style that will be applied to the rendered image. It can be specified in a similar way in which HTML is specified. For example: `border:2px solid green`.

#### A.5.8.5. Spacer

A spacer can be used to define a blank space of specified dimensions between two components. It has following required attributes:

`id`

  specifies the id of the spacer element.

A spacer definition has the following optional attributes:

`height`

  specifies required height to be mentioned in pixels (px). For example, `200px`.

`width`

  specifies required width to be mentioned in pixels (px). For example, `100px`.

`displayStyle`

  specifies the CSS style that will be applied to the rendered spacer element. It can be specified in a similar way in which HTML is specified. For example: `border:2px solid green`.

#### A.5.8.6. Upload File

An upload file component can be used when you want to browse, select, and upload a file. It renders as a Text Box and Browse button and has following required attributes:

`name`

  specifies the name of the variable that will be used to get the uploaded file. For example, if `uploaded_file` is the name, you need to call the `dialog.getVar("uploaded_file")` macro to get this file variable.

An upload file definition has the following optional attributes:

`id`

  specifies the id that is associated with the upload file component.

  The `id` of an upload file cannot contain space characters.

`displayStyle`

  specifies the CSS style that will be applied to the rendered upload file component. It can be specified in a similar way in which HTML is specified. For example: `border:2px solid green`.

#### A.5.8.7. Command Link

A command link can be used to execute a macro when a command link is clicked. It has following required attributes:

`name`

  specifies the text that will be displayed for the command link. For example, `OK`, `Submit`, and so on.

`macro`

  specifies the name of the macro that will be executed on-click of the command link.

A command link has following optional attributes:

`id`

  specifies the id that is associated with the rendered command link.

`displayStyle`

  specifies the CSS style that will be applied to the rendered command link element. It can be specified in a similar way in which HTML is specified. For example: `border:2px solid green`

`updateOnChange`

  specifies a comma-separated list of component ids that will be re-rendered on-click of command link.

#### A.5.8.8. Command Button

A command button can be used when you want a macro to execute when a button is clicked. It has the same attributes as command link.

#### A.5.8.9. Table

A table can be used to define a data table. It does not have any required attributes but has the following optional attributes:

`name`

  specifies the name of the table element.

`id`

  specifies the id of the table element.

`displayStyle`

  specifies the CSS style that will be applied to the rendered table. It can be specified in a similar way in which HTML is specified. For example: `border:2px solid green`.

A table can contain any number of columns, and every column is specified by a multi-valued variable. When a data table is rendered, the number of rows that will display is determined by the minimum number of values present in each column. For example, suppose we have 3 columns, `Col1`, `Col2` and `Col3` with corresponding variables `Var1`, `Var2`, `Var3`. Now, if `Var1` has 5 values, `Var2` has 4 values, and `Var3` has 6 values, 4 rows will be rendered.

The value that is rendered in a cell(X, Y) of a data table is determined by the position of the `X` variable among the `Y` variable values. For example, if `Var Y` has values (3, 1, 5, 8, 3), then `X=2` implies a value of `1`.

A table definition has the following required child element and must contain at least one column:

`column`

  A column contains two child elements, both of which permit space characters:

  `var`

    specifies the multi-valued variable id that the column is bound to.

  `name`

    specifies the column header that will be displayed at the top of the table.

  For example:

      <column>
          <var>Col 1</var>
          <name>Access Or Download</name>
      </column>

Contains proprietary and confidential information of ANSYS, Inc. and its subsidiaries and affiliates.

Prev | Up / Contents | Next

Release 18.2 - © ANSYS, Inc. All rights reserved.