Workflow (Tree View)

Page ID: (AU201030)

For a customized or custom workflow for a particular screen (that is, a form in MYOB Advanced), you use the Workflow page to define states, transitions, and actions. The page has a tree view, described in this topic, and a diagram view (also referred to as the Workflow Visual Editor), which is described in Workflow (Diagram View).

You open the Workflow page by clicking Default Workflow or the name of the customized or custom workflow under the screen ID (of the form for which you are adding or modifying workflows) in the navigation pane of the Customization Project Editor. You can also open the page by clicking the link in the Workflow Name column of the Workflows page. The name that appears on the page consists of the screen ID, the screen name in parentheses, and State Diagram: <Workflow Name> Workflow. (This name is also used for the tree view of the workflow.)

Tip: If a particular form has only one predefined workflow, the workflow name of the predefined workflow is Default workflow. If the form has multiple predefined workflows, different workflow names are assigned to each predefined workflow.

Page Toolbar and More Menu

The page toolbar includes standard buttons and page-specific buttons and commands. For the list of standard buttons, see Page Toolbar. The page-specific commands can be shown as buttons on the page toolbar, as commands on the More menu, or in both places. These commands are listed in the following table in alphabetical order.

Command Description
Add Predefined State

Opens the Add Predefined State dialog box, which you use to add a predefined state to the workflow.

This command is not available for a predefined workflow

Add State

Opens the Add State dialog box, which you use to add a new state to the workflow.

This command is not available for a predefined workflow

Add Transition

Opens the Add Transition dialog box, which you use to add a transition to the workflow.

This command is available only if you select a state or one of the nodes under Transitions in the States and Transitions pane.

This command is not available for a predefined workflow

Change Parent State

Opens the Change Parent State dialog box, which you use to select the parent state for the current state.

This command is available only if you select a state in the States and Transitions pane.

This command is not available for a predefined workflow

Diagram View

Changes the view of the workflow from the tree view to the diagram view. (In the diagram view, you can click the Tree View button to return to this view.)

Note: This command is unavailable if the selected workflow has composite states.
View Changes

Opens the Changes dialog box, which you use to view the changes in the workflow. This command is available only if the workflow is inherited (that is, based on a predefined workflow).

This command is not available for a predefined workflow

Table 1. Add State Dialog BoxYou use the Add State dialog box, which opens when you click Add State, to add a new state to the workflow.
Element Description

The dialog box contains the following elements.

Identifier

A single-letter identifier of the state (for example, H for On Hold).

Description

The display name of the state (for example, On Hold).

Parent State

The parent state of the current state.

If you select a parent state, the state you are creating becomes a nested one for this parent state. If this parent state is not a composite state yet (that is, if it does not contain any nested states), the parent state becomes a composite state.

If you leave this box empty, the created state is added to the bottom of the list of states on the States and Transitions pane.

The dialog box has the following buttons.

OK

Closes the dialog box and adds the state to the workflow.

Cancel

Closes the dialog box without adding the state.

Table 2. Change Parent State Dialog BoxYou use the Change Parent State dialog box, which opens when you click Change Parent State, to select the parent state for the current state.
Element Description

The dialog box has the following elements.

State

Read-only. The name of the current state.

Parent State

The parent state of the current state.

If this box is empty and you select a value in it, the current state becomes a nested one. If the box contains a value and you remove it, the current state becomes an ordinary state (that is, neither composite nor nested). If you modify the value in this box, the current nested state moves to another composite state.

The dialog box has the following buttons.

OK

Closes the dialog box and changes the parent state.

Cancel

Closes the dialog box without saving your changes to the parent state.

Table 3. Add Predefined State Dialog BoxYou use the Add Predefined State dialog box to add a predefined state to the workflow. This dialog box opens when you click Add Predefined State on the form.
Element Description

The dialog box has the following elements.

State

The name of the predefined state.

Parent State

The parent state for the predefined state.

If you leave this box empty, the state is added to the bottom of the list of states on the States and Transitions pane.

The dialog box has the following buttons.

OK

Closes the dialog box and adds the predefined state to the workflow.

Cancel

Closes the dialog box without adding the predefined state.

Table 4. Add Transition Dialog BoxYou use the Add Transition dialog box, which opens when you click Add Transition, to add a transition to the workflow.
Element Description

The dialog box contains the following elements.

Original State

Read-only. The name of the state from which the transition is being created.

Triggered by Action

An option button that indicates that the transition is triggered by an action.

Triggered by Event Handler

An option button that indicates that the transition is triggered by an event handler.

Trigger Name

The name of the action or event handler that triggers the transition. You can select a name from the drop-down list or click Create (right of the box) and add the action.

Create

A button that you click to open the New Action dialog box, so that you can specify the settings of the new action.

This button is available if you select the Triggered by Action option button.

Condition

Optional. The condition that must be fulfilled for the transition to take place.

Target State

The target state of the transition.

In the box, you can select a nested state, a composite state, @Next (the next state in the composite state), or @ParentNext (the next state of the parent state).

The dialog box also contains the following buttons.

OK

Closes the dialog box and adds the transition to the workflow.

Cancel

Closes the dialog box without adding the transition.

Table 5. New Action Dialog BoxThe New Action dialog box opens when you click Create in the Add Transition dialog box, as well as when you click Create Action on the table toolbar of the Actions tab.
Property Description

The dialog box has the following elements.

Action Type

Read-only. An option that indicates that the action changes the state of an entity as a part of a workflow.

Action Name

Required. The internal name of the action, which will be displayed on the Actions page and in the Workflow Editor.

Display Name

Required. The name of the action that will be displayed on the applicable MYOB Advanced form.

Dialog Box

The dialog box that will be displayed when the action is clicked.

Category

The category of the More menu in which the menu command associated with the action will be displayed. The default list of categories depends on the form. To manage the categories, you click the Manage Categories button on the page toolbar of the Actions page.

Add to Toolbar

A check box that indicates (if selected) that the action will be displayed as a button on the form toolbar as well as under the selected category of the More menu if the action is available for a record based on its state. If the action is available but no category is specified, the action will be displayed on the form toolbar and under the Other category.

If the check box is cleared, the action will not be displayed on the form toolbar but will be displayed on the More menu.

The dialog box also contains the following buttons
OK

Closes the dialog box and creates the action.

Cancel

Closes the dialog box without creating the action.

Table 6. Changes Dialog BoxYou use this dialog box to view the source code of the workflow; the changes to the currently selected element (state or transition) are highlighted in red. The dialog box also contains the following buttons.
Button Description
Reverse Changes

Returns the workflow to the predefined state.

Close

Closes the dialog box.

States and Transitions Pane

The States and Transitions pane contains the tree view of states and transitions defined for the workflow. On the pane, the transitions that lead from a state to another state are displayed in the Transitions node under the node with the name of this state. The pane contains the following buttons.

Tip: These buttons are not available for a predefined workflow.
Button Description
Delete

Deletes the selected state or transition (the one you clicked before clicking this button).

Move Up

Moves up the selected state or transition (the one you clicked before clicking this button).

Move Down

Moves down the selected state or transition (the one you clicked before clicking this button).

State Properties Tab: Summary Area

The State Properties tab is displayed when you click a state on the States and Transitions pane. It consists of a Summary area and three tabs in the lower part of the State Properties tab: Fields, Fields to Update on Entry, and Fields to Update on Exit.

The Summary area of the tab contains the following elements.

Element Description
Identifier

A single-letter identifier of the state (for example, H for On Hold).

Description

The display name of the state (for example, On Hold).

Skip Condition

The condition that the system checks when an entity enters any nested state in a composite state. If the condition is fulfilled, the nested state is skipped. The box is displayed only for a nested state in a composite state.

If this condition is fulfilled, the system does the following for the selected nested state:

  1. Assigns the default values for the fields as specified on the Fields tab if the selected state is the initial state of the workflow
  2. Does not check the fields that should be updated when the entity enters the state and leaves it
  3. Does not check any of the workflow settings
  4. Moves the entity to the next state in the composite state

If the box is empty, the system uses the typical workflow for this state. That is, the transitions are triggered only by actions or event handlers, and the system does not check the skip condition again while the entity remains in this state.

Next State

Read-only. The state to which an entity will move if the skip condition is fulfilled and the entity skips the current state. The box is displayed only if you have selected a nested state.

Active

A check box that indicates (if selected) that the selected state is active.

Initial State of the Workflow

A check box that indicates (if selected) that this state is the initial state of the workflow.

State Properties Tab: Fields Tab

The Fields tab, located in the lower part of the State Properties tab, contains a table with the fields whose properties should be modified for the current state. (For details, see Workflow Elements: General Information.) Also, for fields of the Combo type, specific combo box values can be specified.

Table 7. Table ToolbarThe table toolbar includes standard buttons and the following table-specific button.
Button Description
Combo Box Values

Opens the Combo Box Values dialog box, where you can specify the list of values that are displayed as combo boxes.

Table 8. Table ColumnsThe tab includes the following columns.
Column Description
Active

A check box that indicates (if selected) that the field is active for the selected state.

Object Name

The name of the DAC from which the field is selected.

Field Name

The name of the field.

Disabled

A check box that indicates (if selected) that the field is unavailable for the selected state.

Hidden

A check box that indicates (if selected) that the field is hidden for the selected state.

Required

A check box that indicates (if selected) that the field is required for the selected state.

Default Value

The default value of the field.

Note: You can specify default values of fields only for the initial state of a workflow.
Status

Read-only. The status of the field.

The column can have one of the following values: Inherited or New.

State Properties Tab: Fields to Update on Entry and Fields to Update on Exit Tabs

On the Fields to Update on Entry and Fields to Update on Exit tabs, you specify which fields should be updated when an entity on the form enters the current state and when the entity leaves this state, respectively. These tabs are located in the lower part of the State Properties tab.

Before a transition is performed, the system checks the following:

  • For the target state, the fields that should be updated when the entity enters the state
  • For the original state, the fields that should be updated when the entity leaves the state
Table 9. Table ColumnsThe tables on the tabs contain the same columns, which are described below.
Column Description
Active

A check box that indicates (if selected) that the field should be updated after the transition.

Field Name

The name of the field that should be updated.

From Schema

A check box that indicates (if selected) that the field value from the database should be used.

New Value

The new value for the field.

Status

The status of the field to update.

The column can have one of the following values:

  • Inherited: The field that has been added to the predefined workflow.
  • New: The field that you have added to the workflow.

Actions Tab

The Actions tab is displayed when you click a state on the States and Transitions pane. The Actions tab contains the list of actions specified for the state (for details, see Action Configuration: General Information).

Table 10. Table ToolbarThe table toolbar includes standard buttons and the following table-specific button.
Button Description
Create Action

Opens the New Action dialog box, where you can create an action for the current state.

Table 11. Table ColumnsThe table has the following columns.
Column Description
Active

A check box that indicates (if selected) that the action is active for the selected state.

Action

An action that is available for the selected state.

Duplicate on Toolbar

A check box that indicates (if selected) that the action should be available on the page toolbar (as a button) as well as on the More menu.

Auto-Run Allowed

A read-only check box that indicates (if selected) that the action can be triggered automatically.

If this check box is selected for an action, to trigger this action automatically, you need to specify the condition in the Auto-Run Condition column.

Note: Predefined system actions cannot be triggered automatically.
Auto-Run Condition

A condition that (if fulfilled) makes the system trigger the action automatically.

This box is unavailable for editing if the Auto-Run Allowed check box is cleared for the action.

If the Auto-Run Allowed check box is selected for the action, the default value of this box is False, which indicates that the system does not trigger the action automatically.

Connotation

An optional color notation that you can assign to the action to give users additional information about it. For example, you can use connotations to indicate to users which action in the entity processing workflow is the one most likely to be taken, given the state of the entity, which actions require special consideration, and which actions provide links to additional information, such as reports.

On the More menu, a connotation is displayed as a dot of the selected color (see the list below) right of the associated menu command. If the action is also displayed on the form toolbar, it is highlighted in the selected color.

You can select one of the following options (with the corresponding colors noted):

  • Primary: The primary color of the site theme
  • Secondary: The secondary color of the site theme
  • Success: Green
  • Danger: Red
  • Warning: Yellow
  • Info: Blue
  • Light: Light gray
  • Dark: Dark gray

For an action on a form with a workflow, you can also specify a connotation in the Action Properties dialog box of the Actions page. In this case, this connotation is used for this action in all states of an entity in the workflow. If in a specific state, another connotation is specified for the action, the state-specific connotation takes precedence.

Note: Connotations are also supported for forms without workflows, but the connotations for these forms can be modified only through code. For details, see To Add a Connotation.
Status

A read-only box that indicates the status of the action.

The status of the action can be one of the following:

  • Inherited: The system action.
  • New: The action that you have created.
Dialog Box

The name of the dialog box that is displayed when a user clicks the action, if applicable; in this dialog box, the user should enter the needed values.

Handlers Tab

The Handlers tab is displayed when you click a state on the States and Transitions pane. The Handlers tab displays the event handlers that are available for the current state (for details, see Getting Started with Workflows: Transitions). The columns of the table are described below.

The table toolbar includes only standard buttons. For the list of standard buttons, see Table Toolbar.

Column Description
Active

A check box that indicates (if selected) that the event handler is active for the selected state.

Handler

An event handler that is available for the selected state.

Status

A read-only box that indicates the status of the event handler.

The column can have one of the following values: Inherited or New.

Transition Properties Tab

The Transition Properties tab is displayed when you click a transition on the States and Transitions pane.

The tab includes the following elements and the Fields to Update After Transition table.

Table 12. Transition Properties ElementsYou can use the following elements to define the transition.
Element Description
Original State

Read-only. The name of the state from which the transition is performed.

Active

A check box that indicates (if selected) that the transition is active.

Triggered by Action

An option button that indicates that the transition is triggered by an action.

Triggered by Event Handler

An option button that indicates that the transition is triggered by an event handler.

Trigger Name

The name of the action or event handler that triggers the transition.

Condition

Optional. The condition that should be fulfilled for the transition to take place.

Target State

The target state of the transition.

Table 13. Fields to Update After Transition TableThe Fields to Update After Transition table lists the fields that the system should update after the transition is performed, and contains the following columns.
Column Description
Active

A check box that indicates (if selected) that the field should be updated after the transition.

Field Name

The name of the field that should be updated.

From Schema

A check box that indicates (if selected) that the field value from the database should be used.

New Value

The new value for the field.

Status

The status of the field update.