Reference manual

Flows window

The Flows window is used in a number of flows scenarios. The data is queried from the code graph and the result view shows contextualized nodes, both syntax nodes and dispatch nodes (see below) that satisfy the criteria.

The window is used in many flow scenarios, see Immediate insights and Default declaration context menu.

Shortest path may be invoked the the flows window itself.

We use the following types of flow nodes:

  • Flow nodes:
    • Syntax nodes: Elements from AL's syntax trees, such as statements, expressions, identifiers, and operators.
    • Dispatch nodes: These are nodes that are not represented in AL's syntax, but still play a role in execution of AL code:
      • Runtime: Special nodes that represent a state in program execution, such as RunCodeunit, which represents the state that a codeunit must be run. In that way, runtime nodes provide the "glue" between calls to Codeunit.Run() and the Codeunit's OnRun trigger.
      • User: Represents the state where a user has interacted with Business Central. For example, an Action node represents a state when a user has clicked a button and a PageFieldValidation node represents a state where a user has entered data and left a field causing validation.
  • Context nodes: Context nodes show the syntactic context of flow nodes all the way to the module level. Some nodes are both context nodes and flow nodes, such as procedures. We use the flow node symbol for these.

The level of detail in general depends on whether the graph was loaded as a full graph or as a procedure-level graph. However, for Reachable committing procedures and triggers and Reachable RIMD invocation sites, detailed syntax is never displayed.

Prism for AL: Flows
Inbound flow to an OnValidate trigger.
# Name Description
1 Query Specifies the scenarios and which query was executed to fetch data for this window.
2 Results Total result with number of results currently displayed.
3 Large result set message This message signals that the result set is large and refresh is slow as configured in the Settings page. When this message occurs, window refresh has been changed to manual, and you need to click the refresh button after doing changes to filters and when changing the search field.
4 Contextualized flow nodes

The flow nodes of the search result in their syntactic context, so in a tree structure all the way up to the owning AL module. Syntax nodes within a code context (procedures and triggers) are ordered by the natural order of the source code, which corresponds to a downward flow within each code context. The ordering of context, e.g. modules, objects, object members does not have any semantic significance with regards to flow.

Click on any item to navigate.

Use the context menu to invoke Find Shortest Path or pin a node.

5 Filters Toggles the left-hand filter panel.
6 Collapse all nodes Collapses all nodes to the module level.
7 Collapse/expand to object level Expands modules and collapses everything else. Shows modules and objects.
8 Collapse/expand to object member level Expands modules and objects and collapses everything else. Shows modules, objects and object members (top-level declarations).
9 Expand down to pinned nodes Expands the paths down to pinned nodes.
10 Expand all nodes Expands the whole tree.
11 Export to Excel Exports the currently view to an Excel file.
12 Search Filters the result using the Substring search syntax.
13 Refresh view button Click to refresh the view following changes to filters and/or search string. This is only required for large result sets.
14 Find shortest path Use this menu to gain insight into the execution path between the declaration and this node. See below.
15 Pin/Unpin node Toggles whether this node is pinned or not.
16 Unpinned Uncheck this to view only pinned nodes and their ancestors.
17 Flow child nodes When unchecked, only the top-most flow nodes are shown. So if a procedure contains flow nodes, only the trigger will show. Nodes in the trigger body are filtered away.
18 Leading siblings When unchecked, the leading siblings are filtered away and what remains is the nesting structure, which is useful if you want to focus on under which circumstances (conditions of branching and repetitive statements) a flow may happen.
19 Main filter (dropdown) The main filter offers the following values:
  • General: This setting does not actually filter, hence: In case of outbound flow, the window displays all nodes that may be reached from the declaration. In case of inbound flow, the window displays all nodes that may be reached from the declaration.
  • User action: Filters to only show user actions, such as a user clicking a page action or a user triggering field validation when leaving a page field. This option is only available for inbound flow.
  • Event publisher: Filters to only show event publisher procedures (integration and business events). This option is only available for outbound flow.
  • RIMD: Filters to only show Insert, Read, Modify, or Delete (RIMP) nodes, i.e. table operations. This option is only available for outbound flow.
20 Settings Opens the Settings page. Flow related settings are found in the Find flows and Graph Database Serversections.

Shortest path

The result of selecting Find shortest path in the context menu of a flow node is that a new flow window is opened in a mode where:

  • Only nodes on a shortest path between the two flow nodes are displayed.
  • The ordering of the flow nodes is step-by-step in the order given by the path.
  • Flow nodes are numbered.
  • The same context may appear more than once (e.g. when codeunit A calls something in codeunit B, then something in codeunit C, then something in codeunit B again.)
Prism for AL: Shortest Path
Shortest path from an action subscriber procedure OnAfterModifySalesHeader.
# Name Description
1 Shortest Path Indicates that the window displays the shortest path from a selected node to the declaration node in the case of inbound flow, and the shortest path from the declaration node to a selected node in the case of outbound flow. Flow nodes are numbered with steps starting from 1 at the source of the path.
2 Source/target nodes The path's source node is marked with step number 1 and the target node is the last numbered item when reading from top to bottom.
3 Step number Flow nodes are numbered with steps starting from 1 at the source of the path.