My FNZ Studio Version

Processes

Latest Update: 04.02.2025 | Margherita Taffarel
Documentation
2024

1 Introduction to Ad-Hoc Navigation

Process Navigation defines how the user can move among tasks inside a Process. Two different types of Process Navigation are now supported:

  • Connection-Based Navigation: The user is focused on a given task and does not have the overview of the other steps.
  • Ad-Hoc Navigation: The user is constantly provided with an overview of the steps that are needed to reach the end of the process and can use shortcuts such as Next and Back to follow a predefined path. However, the user can also jump directly to a specific step without following a predefined sequence. Ad-Hoc Navigation is made possible by new Process components called Ad-Hoc Sub-Processes. Compared to the traditional connection-based navigation approach, different Process Tasks are still shown in a sequential UI, but users are allowed to click on any of these tasks at any time.

AdHoc5.png

Support Notes

This document refers to the first release of Ad-Hoc Navigation and Sub-Processes, therefore consider the following information on this feature:

  • Is supported out of the box only by ABCs/App Tasks. This document mainly covers these use cases. It is however possible to implement custom Screens using Ad-Hoc Navigation through provided Script Functions (see section).
  • For its correct functioning, make sure you use them only as illustrated.

2 Highlights

Ad-Hoc Sub-Processes provide the following advantages:

  • Guided & flexible navigation — Navigation is more flexible but the user also feels guided throughout all the various steps.
  • Are intuitive & easy to use — The navigation sidebar, which is always visible, makes it easy for the user to know where they are.
  • Are continuous & consistent — throughout the entire application: The same UI concept is used across all different scenarios.

3 Navigation Sidebar

Following is a representation of the Ad-Hoc Navigation concept, represented by the navigation sidebar:

AdHoc2.png

The main concepts used in navigation are:

  1. Phases — Explicit partition in the Process workflow, such as 'Definition', 'Collection', 'Approval', and so on (Related configuration item: Phase)
  2. Steps — Activities, such as gathering of data and so on (Related configuration item: Task / Ad-Hoc Sub-Process)
  3. Sub-steps — Sub-activities of the same type, such as gathering data for individual or joint accounts (Related configuration item: Task / Ad-Hoc Sub-Process).
  4. Buttons to navigate among steps of the same Phase (Related configuration item: Pre-defined Back/Next buttons).
  5. Buttons to navigate among different Phases (Related configuration item: Global Back/Next buttons).
  6. Buttons for other actions (Related configuration item: Custom Actions).

4 Task Types

Besides the global navigation pattern (connection-based or Ad-Hoc), it is possible to define the type of navigation to use at App Task level, through the Task Type property in the Process Editor. In a Sequential Process Step task, the user generally follows the main navigation path, while in a Drill down task, the user usually abandons the main navigation path.
See configurations details below.

5 Ad-Hoc Sub-Process Configuration

As mentioned above, Ad-Hoc Sub-Processes provide the main component to achieve Ad-Hoc Navigation, without the need to map out all possible connections between tasks. When used in Ad-Hoc Sub-Processes, different Process Tasks are still shown in a sequential UI, but users are allowed to move on any of these tasks at any time, moving the token directly to that task.

App Tasks already provide a way to achieve fully flexible navigation in the context of a single process task. However, if App Tasks are placed in the context of a sequential process structure, there are still constraints that prevent flexible navigation across different App Tasks. Ad-Hoc Sub-Processes address these use cases, allowing the user to execute tasks in any order, even several times, or potentially skip them.

AdHoc6.png

5.1 Ad-Hoc Sub-Process Component

Ad-Hoc Sub-Processes are available as Process Components in the Process Editor. An Ad-Hoc Sub-Process is a container component (graphically similar to an Embedded Sub-Process) which comprises other Process Components.
In the Process Editor, Ad-Hoc Sub-Processes are easily identified by the tilde ( ~ ) character and by the lack of Start or End Events, and inner Connections. Ad-Hoc Sub-Processes can be dragged into the Process Editor from the Components library on the right-hand side.

AdHoc7updated.png

A valid usage of Ad-Hoc Sub-Processes must meet the following constraints:

  1. Ad-Hoc Sub-Processes can only contain the following Process Components:
    • App Tasks
    • Screen Tasks
    • Sub-Processes
    • Placeholder Tasks
    • Other Ad-Hoc Sub-Processes (Nested)
  2. Process Connections are not allowed from and to Process Components contained in an Ad-Hoc Sub-Process. Note that following this principle, Start and End events cannot be included in an Ad-Hoc Sub-Process (this is different from Embedded Sub-Processes).
    AdHoc8.png
  3. The Process Components in an Ad-Hoc Sub-Process must be either all included in one Process Phase, or all outside any Process Phases (in other words, they cannot span multiple Phases)
  4. The Process Components in an Ad-Hoc Sub-Process must be either included in one Swimlane, or all outside any Swimlanes (in other words, they cannot span multiple Swimlanes).

Finally, consider that, based on their position inside a Process, Ad-Hoc Sub-Processes may behave differently in the following situations:

AdHoc9.png

  1. Root: The Ad-Hoc Sub-Process is not contained inside any other Ad-Hoc Sub-Process (locally to a Process Business Object).
  2. Nested: The Ad-Hoc Sub-Process is contained inside one or more Ad-Hoc Sub-Processes (locally to a Process Business Object).

5.2 Types of Navigation

The type of navigation generated by Ad-Hoc Sub-Processes depends on where the token is located on the Process Component included in an Ad-Hoc Sub-Process. The following rules are applied when the Process is run:

  1. If the token is on an App Task, the Workspace automatically generates a navigation sidebar showing the available tasks where the user can freely navigate. The Process Components that are included in the Ad-Hoc Sub-Process are rendered as items in the navigation sidebar. See section Navigation in App Tasks for details.
  2. If the token is on a Screen, the navigation sidebar is not generated automatically. However, Ad-Hoc navigation can be implemented in a custom way using Screen Components and ad-hoc navigation Script Functions (see details).
  3. If the token is on a Placeholder, the Process preview is rendered, and navigation is available through the buttons displayed above the Process preview itself. Placeholders are useful to prototype and test Ad-Hoc Sub-Processes. However, some navigation options, such as Custom Actions, are not available in this mode.
  4. If the token is on a Sub-Process, the inner token is inspected to determine which of the use cases above applies.

Note that tokens that are injected (e.g., through StartSubProcess Script Function) in a Process containing Ad-Hoc Sub-Processes are ignored by navigation and, therefore, no item is rendered in the Navigation Sidebar.

5.3 Navigation in App Tasks

As mentioned in the section above, if the token is on an App Task, the Workspace automatically generates a navigation sidebar showing the available tasks where the user can freely navigate. The Process Components that are included in the Ad-Hoc Sub-Process are rendered as items in the navigation sidebar (called Navigation Items from now on). Consider the following configuration items in the App Task Properties tab:
AdHoc9bupdated.png

  1. Runtime Title: Select the Label Business Object containing the title for the whole page, as shown in FNZ Studio Runtime. This property is mandatory for App Tasks included in Ad-Hoc Sub-Processes.
  2. Task Type: Type of navigation to use at App Task level (see details below)

5.3.1 Setting Up Process Tokens

AdHoc10.png

The process engine creates a token on the outermost (Root) Ad-Hoc Sub-Process Component, and adds another token on the (nested) Ad-Hoc Sub-Process Component only if this is the "current" Process. The items contained in the Root Ad-Hoc Sub-Process are always shown in the navigation, while the items contained in the nested Ad-Hoc Sub-Process are only shown when the token is set there.

5.3.2 Setting Up Task Types

Besides the global navigation pattern (structured or Ad-Hoc), it is possible to define the type of navigation to use at App Task level, through the Task Type property (Sequential Process Step or Drill Down) in the Process Editor (see details). In a Sequential Process Step task, the user generally follows the main navigation path, while in a Drill Down task, the user usually abandon the main navigation path. Let's see the details in both navigation modes.

In Connection-Based Navigation Navigation:

  • Sequential Process Step — Tasks form a linear sequence, where users navigate through each Task step-by-step, and can typically only move forward or backward.
  • Drilldown — Multiple different Sub-Tasks can be opened from one main Task.

AdHoc3.png

In Ad-Hoc Navigation (when a task is inside an Ad-Hoc Sub-Process):

  • Sequential Process Step — The user is able to move among phases and steps. Set it to Sequential Process Step for the navigation sidebar to be displayed.
  • Drilldown — Is represented by a confirmation screen, therefore navigation only allows going back or proceeding without jumping to other steps in the process.

AdHoc4.png

Navigation Example

  1. Consider the following Process:
    AdHoc11updated.png
  2. When the token is on 1)DataGathering, navigation will look as follows (note that the nested Sub-Process is not expanded):
    AdHoc12updated.png
  3. When the third navigation item (Inner Ad-Hoc Navigation Item) is expanded, the token moves on to 3.1)DataGathering:
    AdHoc13updated.png

5.4 Task Order

Process Components contained in an Ad-Hoc Sub-Process do not require a specific execution order at runtime: the user can execute them in any sequence. However, the way in which tasks are rendered in the navigation structure is used to generate the navigation sidebar.

Tasks within an Ad-Hoc Sub-Process are ordered from top to bottom and from left to right. Process Components included in Ad-Hoc Sub-Processes also display a number (1,2,3..) indicating their order of appearance in navigation. In case of multiple nesting, numbers are hierarchical (1.1.1, 1.1.2...).

AdHoc1617updated.png

When the Process token reaches an Ad-Hoc Sub-Process (unless there is a specific setting on the connection), it is set to the first task according to the ordering rules explained above. Then, the user is allowed to freely move the token on the other available elements in the same Ad-Hoc Sub-Process (if nested) or in the current Root Ad-Hoc Sub-Process.

5.5 Phases

When Ad-Hoc Sub-Processes are included in Process Phases, the auto-generated navigation shows the list of Phases where the Root Ad-Hoc Sub-Process is contained. Phases are available in the Components library in the Process Editor.

Phase names shown in the navigation sidebar are not clickable (they are not Navigation Items), and the content of each Phase gets expanded when the token reaches the contained Ad-Hoc Sub-Process. A Phase name is determined by the Task List Name property of the Phase component (Properties tab).

AdHoc1819updated.png

5.6 Looping

Looping configurations are useful when the same task is applied to multiple different objects (e.g., multiple accounts). The number of such tasks may not be known prior to process execution since it depends on the specific instance of the data model. An example of such use case is the gathering of information on multiple Accounts or Parties.

Looping functionalities allow for an entry in the sidebar to be shown for each item in a collection at runtime. When the user clicks on that entry, the collection item is assigned to the task. Looping functionalities are configured in the Looping tab, available for any task included inside an Ad-Hoc Sub-Process.

AdHoc2223.png

The Looping tab provides the properties to define the list of items to be shown in the navigation sidebar:

  • Loop Type — Defines the type of loop used to iterate items. For tasks inside Ad-Hoc Sub-Processes, only For Each loops are allowed. If the property is set to None, the task has no looping.
    Note: A collection subject to a For Each looping must not be defined in line, but it must be available as a process variable. Using an in-line Collection of Primitive Types prevents navigation from working correctly since the collection would be re-instantiated each time.
  • Execution order — Defines the type of loop execution. For tasks inside Ad-Hoc Sub-Processes, only a Sequential execution order is allowed. For tasks outside Ad-Hoc Sub-Processes, more options are available.
  • Variable — Name of the iteration variable.
  • Collection — Collection variable used to contain all the elements of the iteration (can be either a Named or Indexed collection).
  • Variable Type — Type of iteration variable (Data Class or Primitive Type).
  • Variable Collection Type — Collection type of the iteration variable (Single, Indexed, Named).
  • Counter Variable (optional) — Variable which is incremented with each iteration, e.g., you have a collection of 100 entries and you jump by 10 at each iteration, the counter variable is 10.

5.7 Navigation Structure

5.7.1 Container Sentries

For Ad-Hoc Sub-Processes, the Container Sentry field (defined in the Ad-Hoc tab) allows you to specify whether the visibility of the navigation menu entry corresponding to the Ad-Hoc Sub-Process is determined by the setting defined for its children (default value), or if such entry should always be hidden while keeping the setting defined for its children. This setting may be useful to hide intermediate navigation elements while keeping their children visible.

Container sentry field as shown on the Ad-Hoc tab

Following are possible values for the sentry property:

  • Process:AdHocContainerSentryState:DEFINED_BY_CHILDREN: (default value) The visibility of the Navigation Item linked to the Ad-Hoc Sub-Process is determined by the setting defined for its children (according to the logic described in the Task Sentry Hierarchy section below). The image below represents an example of such setting, where only navigation items related to the active task are displayed.
    AdHocSPContainerSentryDefinedByChildREDO.png
  • Process:AdHocContainerSentryState:HIDDEN_KEEP_CHILDREN: The Navigation Item linked to the Ad-Hoc Sub-Process is always hidden while keeping the setting defined for its children. The image below represents an example of such setting, where all the navigation items related to all contained tasks are displayed.
    AdHocSPContainerSentryKeepChildREDO.png

Note: Container Sentries are also applied when an Ad-Hoc Sub-Process is nested through a Sub-Process task (e.g., if the Process Business Object referred to by the Sub-Process task contains an Ad-Hoc Sub-Process).

5.7.2 Task Sentries

Process Components included in an Ad-Hoc Sub-Process can be enabled, disabled or hidden, and their status is reflected in navigation. This allows implementing navigation structures where some elements are shown or hidden based on Solution-specific logic. The status of a navigation item is defined through Sentries.

For all Process Components included in Ad-Hoc Sub-Process (except for Nested Ad-Hoc Sub-Processes - see section below), this is defined in the Task Sentry field (Ad-Hoc tab):

Note: For this configuration to work, you must declare a dependency on the Process Platform Package.

Sentry field as shown on the Ad-Hoc tab

Following are possible values for the sentry property:

  • Process:AdHocSentryState:ENABLED() — The Navigation Item linked to the current task is enabled
  • Process:AdHocSentryState:DISABLED() — The Navigation Item inked to the current task is disabled
  • Process:AdHocSentryState:HIDDEN() — The Navigation Item inked to the current task is not shown (hidden)

The Sentry property allows Appway Scripts, therefore the developer can change the sentry based on Solution logic.

Task Sentry Hierarchy

The sentry status of the Navigation Item representing an Ad-Hoc Sub-Process is derived by the Sentries defined on the components contained in it, according to the rules illustrated below:

  • If at least one child contained in the Ad-Hoc Sub-Process is Enabled, the Navigation Item for that Ad-Hoc Sub-Process is Enabled,

  • ELSE (all children are not enabled), if at least one child’s Sentry evaluation results in an Error, the Navigation Item shows an Error and behaves as Disabled,

  • ELSE (all children are not enabled, with no errors), if at least one child is Disabled, the Navigation Item for that Ad-Hoc Sub-Process is Disabled,

  • ELSE (all children are hidden), the navigation item for that Ad-Hoc Sub-Process is Hidden

    Note: since Sentries can be dynamic and calculated via scripts, there is also the use case of a failure in the Sentry evaluation.

Sentry Example

AdHoc24b.png
Assuming the token is on the element called Digi, and that the Container Sentries properties of Ad-Hoc Sub-Process are set to the default value DEFINED_BY_CHILDREN, this example will create the following navigation:

  • Root Ad-Hoc
    • Nested1.1
      • Nested2.2 [DISABLED]
      • Nested2.3
        • Screen [DISABLED]
        • Digi [current task]

5.8 Navigation Validation

5.8.1 Validation Badges

The Ad-Hoc Navigation sidebar may show the validation status of each step in the navigation for an App Task (e.g. Data Gathering) contained in an Ad-Hoc Sub-Process. When validation is configured, users are provided with an overview of errors and can quickly take action where needed. Valid/invalid Navigation Items are visually indicated by a badge. If a Validation Badge (see below) is configured on a Navigation Item, a (red/green) badge may be shown based on the configuration set by the developer (e.g., a green badge indicates there are no blocking issues, a red badge indicates there is at least one blocking issue).

Note that, starting from FNZ Studio 2024, the Validation Badge Script set on an Ad-Hoc step is evaluated on the first visit to the Navigation Item (see also the Review Mode section below for information on a specific use case). This is a change of behavior compared to FNZ Studio 2023. See the System Upgrade guide for further information.

AdHocSPValidationBadgeupdated2024.1.png

Validation is defined through two properties set in the Ad-Hoc tab of the App Task:

  • Validation Badge Required checkbox — Select this checkbox if you want validation badges to be shown.
  • Validation Badge field — Enter the expression that defines the condition which governs the validation badge for the current item, namely:
    • Process:AdHocValidationBadgeState.OK() (default value): The Navigation Item state is valid
    • Process:AdHocValidationBadgeState.NOT_OK(): The Navigation Item state is not valid
    • Process:AdHocValidationBadgeState.NO_BADGE(): The validation badge is hidden

AdHocSPValidationBadgeConf.png

Note: The Validation Badge Required and Validation Badge properties are not available in Review App Tasks (Data Review and Relationship Review).

The Validation Badge on a container step that corresponds to an Ad-Hoc Sub-Process is calculated based on the contained steps, according to the rules described here below:
Consider S = container of a number of (visited or unvisited) steps that are ENABLED and have the Validation Badge Required property checked (Parties Profiling in the images below);

  • If at least one step in container S has property Validation Badge set to Process:AdHocValidationBadgeState.NOT_OK(), then a red badge (invalid status) is shown on container S.
  • Else, if all steps in container S have property Validation Badge set to Process:AdHocValidationBadgeState.NO_BADGE(), then no badge is shown on container S.
  • Else, if all steps in container S have property Validation Badge set to Process:AdHocValidationBadgeState.OK(), then a green badge (valid status) is shown on container S.
  • Else, no badge is shown on container S.

In the first example below, the user has completed step John Smith and has just clicked on step Giulia Smith. Since step John Smith has a NOT_OK validation badge, the container step Parties Profiling shows a red badge.

AdHoc12ValidationEx1updated2024.1.png

In the second example below, the last step Review Profiling is a review task, therefore we assume that it has the Validation Badge Required property unchecked. Since all the other steps, John Smith and Giulia Smith, have been visited and have an OK validation badge, the container step Parties Profiling shows a green badge.
AdHoc12ValidationEx2updated2024.1.png

5.8.2 Review Mode

ADSPReviewMode.png

The Review Mode setting available in the Ad-Hoc tab of root Ad-Hoc Sub-Processes allows specifying whether the Ad-Hoc Sub-Process content is to be reviewed by a given user at runtime (e.g., a page containing client data to be reviewed by a compliance officer). Note that this setting is computed only once when the root Ad-Hoc Sub-Process is initialized and it applies to all Sub-Tasks at all levels.

This setting influences the way validation messages and statuses are displayed in FNZ Studio Runtime (note that the App Task must be contained in the Ad-Hoc Sub-Process):

  • If Review Mode is enabled, violations are displayed immediately for all steps in the Ad-Hoc navigation sidebar, as soon as the user lands on whatever step (1). Note that this is also valid for affected fields in the Tab Bar and Violation Panel (2) if the page content is included in a root Ad-Hoc Sub-Process.
    DGInfoFrameworkReviewModeON.png
  • If Review Mode is disabled, violations are only visible once the user visits a step in the Ad-Hoc navigation sidebar, while unvisited steps do not show any badge (1). Note that this is also valid for affected fields in the Tab Bar and Violation Panel (2) if the page content is included in a root Ad-Hoc Sub-Process.
    DGInfoFrameworkReviewModeOFF.png

For more information on its use in App Tasks contained in Ad-Hoc Sub-Processes, see App Task Information Framework documentation.

5.9 Actions

An Ad-Hoc Sub-Process allows defining actions that can be executed to move across connections starting from the Ad-Hoc Sub-Process itself. These actions are represented in the auto-generated navigation as buttons that are available on all navigation items of the Ad-Hoc Sub-Processes.

Note that Actions are ordered following the hierarchy of components in the Process from the higher to the lower level. As in the example below, if a Root Ad-Hoc Sub-Process defining action A contains a nested Ad-Hoc Sub-Process defining action B which, in turn, contains a Data Gathering App Task defining action C, then the order of Actions is A, B, C.

AdHocSPActionOrder.png

5.9.1 Custom Actions

Custom Actions are configured on the Actions tab in the Ad-Hoc Sub-Process. The configuration of Custom Actions is the same as App Task Custom Actions (see App Task documentation for all details).

CustomActionsAdHocSPupdated2023.5.png

Custom Actions can be defined on various sources:

  • On the Root Ad-Hoc Sub-Process
  • On the Nested Ad-Hoc Sub-Process where the token is currently set
  • On the Process Component where the token is currently set

5.9.2 Auto-generated Back/Next Buttons

The navigation sidebar that is generated based on an Ad-Hoc Sub-Process also provides auto-generated buttons to move across tasks in their sequential order. No configuration is necessary in the Process Editor for these auto-generated buttons. However, you must declare a dependency on the Process Platform Package.

In particular, when the token is on a task, the following buttons are automatically generated:

  • Back: Moves the token to the immediately previous task in the navigation (Label is Process:aw.AdHocSubProcess.Back)
  • Next: Moves the token to the immediately following task in the navigation (Label is Process:aw.AdHocSubProcess.Next)

The behavior of Back and Next buttons also depends on other configurations, namely, looping, nesting and sentries:

  • In a Process Component with Looping configurations, Back and Next buttons move backwards or forwards in the iteration.
  • In a Process Component included in a nested Ad-Hoc Sub-Process, Back and Next buttons behave according to the order of navigation items in the navigation sidebar (e.g., by clicking Next on the last Process Component in a nested Ad-Hoc Sub-Process, you move to the next Process Component in the container Ad-Hoc Sub-Process).
  • If the previous/following task is disabled or the sentry evaluation returns an error, the Back/Next button is disabled.

5.9.3 Global Back/Next Buttons

Beside auto-generated navigation buttons, it is also possible to define Back and Next buttons to navigate a Process outside the Ad-Hoc Sub-Process. These are configured on the Actions tab through the pre-defined Back and Next options (see figure below).

Global Back and Next buttons can only be defined for Root Ad-Hoc Sub-Processes when on the first Navigation Item (where the auto-generated Back button is hidden) or on the last Navigation Item (where the auto-generated Next button is hidden).

GlobaButtonsAdHocSPupdated2023.5.png

The configuration of these buttons is similar to other Custom Actions. The following properties are available:

General Settings:

  • Type — Custom Actions can have three types (see details below):
    • Submit for actions that submit the current form, i.e. they trigger a Process step that cannot be undone.
    • Destructive for actions that have destructive effects, such as deleting an object from a collection.
    • Other for all other actions.
  • Label — The button Label. By default, it is set to Process:aw.AdHocSubProcess.GlobalBack (Back) or Process:aw.AdHocSubProcess.GlobalNext (Next).
  • Extended Label — The button tooltip.
  • Sentry — A script determining whether the button is currently shown as enabled, disabled, or hidden altogether. The default value is Process:ConnectionSentryState.HIDDEN().
  • Confirmation Label — The message to be shown when confirming a Submit or Destructive Action.

Process Flow:

  • Action Value — the String that is stored in the Process $action value when the Custom Action is triggered. The default value are back and next, respectively (the field is not editable).

6 Token Landing (Ad-Hoc Task Choice)

By default, when the token lands on an Ad-Hoc Sub-Process, it lands on the first enabled Process Component contained in it, according to the ordering logic mentioned above.

Note: If there is no enabled component, the Process is suspended and an error is logged.

However, in some situations, you may need to override this logic by choosing a different Process Component where the token should land. See, for example, the two following use cases:

  1. When there is a sequence of Ad-Hoc Sub-Processes, a global Back action can be used to move back to the previous Ad-Hoc Sub-Process in the sequence. However, the user clicking on Back would expect to land on the last task of the previous Ad-Hoc Sub-Process.
  2. When it is necessary to perform an action outside the Ad-Hoc Sub-Process and then go back to it, e.g., to reassign a task.

To implement such use cases, all connections entering an Ad-Hoc Sub-Process provide the additional Ad-Hoc Task Choice setting (Properties tab) to define which task should be reached.

AdHoc27.png
Possible values for this setting are:

  • First Enabled Task — (default) The token lands on the first enabled task, according to its Sentry in the Ad-Hoc tab (details).
  • Last Enabled Task — The token lands on the last enabled task, according to its Sentry in the Ad-Hoc tab (details).
  • Last Visited Task — The token lands on the task that was active the last time the token was on the Ad-Hoc Sub-Process. The Last Visited Task information is persisted with each Process Instance, so that it is available also after a restart. The information is kept per Process Instance and per Root Ad-Hoc Sub-Process.

Example
In the image below, since the 'cancel' connection returns to the Last Visited Task, if the user was on task Third before exiting the Ad-Hoc Sub-Process, they will return on that task when following the 'cancel' connection.

AdHoc28updated.png

7 Screen Navigation (Script Functions)

As mentioned in the introduction, when Ad-Hoc Sub-Processes are used in the context of App Tasks, navigation is generated automatically based on the Process structure. On the other hand, when used in Screens (e.g., when the token inside an Ad-Hoc Sub-Process is on a Screen Task), navigation is not auto-generated but can be custom created using Screen Components and a dedicated set of Script Functions detailed below.

7.1 Process:ExecuteAdHocAction

Executes the Ad-Hoc Sub-Process Action with the provided action Id. Allowed actions depend on the task where the current token is placed. Allowed actions are actions defined on an Ad-Hoc Sub-Process containing the current task, and actions that move the token to the next or previous element in the Ad-Hoc Navigation Structure.

Parameters
$tokenId (String) WorkflowToken id
$actionId (String) Ad-Hoc Sub-Process Action Id

Return Value
Returns Nothing

Examples
Process:ExecuteAdHocAction(WORKITEM().getId(), 'PFRPS0VOPmIzMmEzN2Q5YzUxNDI1OTU5NzJkYjVhYTNjNDUxNzBlPC8-PEVMRU0-NTY');

7.2 Process:GoToAdHocNavigationItem

Moves the process token to the Ad-Hoc Sub-Process Item with the specified id. The item Id must identify another task, or a task iteration, within the same Ad-Hoc Sub-Process the current task is in.

Parameters
$tokenId (String) WorkflowToken id
$itemId (String) Ad-Hoc Sub-Process Navigation Item Id

Return Value
Returns Nothing

Examples
Process:GoToAdHocNavigationItem(WORKITEM().getId(), ‘navigationItem999’)

7.3 Process:GetAdHocNavigationStructure

Retrieves information about the structure of an Ad-Hoc Sub-Process navigation, given a token id placed on a task contained in an Ad-Hoc Sub-Process.

Note: This function returns the global outer ad-hoc Back action when the token is on the first task of the ad-hoc Sub-Process and the global outer Back action is defined. It returns the global outer ad-hoc Next action when the token is on the last task of the ad-hoc Sub-Process and the global outer Next action is defined. It returns the inner Back and Next actions when the token is on other tasks within the Ad-Hoc Sub-Process.

Parameters
$tokenId (String) WorkflowToken id

Return Value
Process:AdHocNavigationInfo

Examples
Process:GetAdHocNavigationStructure(WORKITEM().getId())

© 2026 Appway AG. All Rights Reserved