Broadway Tutorial and Flow Examples

The a-broadway-tutorial.flow introduces you to Broadway, its features, main principles and capabilities to provide you with the information you need to understand this module. In addition to the Tutorial's flow you can find other Broadway flow examples explaining specific subjects such as DB commands, conditions, parsers, dates and strings and how they are handled.

The following Broadway flow guides you through each consecutive step of an example business process and explains how it is implemented.

To open the Tutorial and example flows, in the Broadway Flow window, go to Main Menu > Actions > Examples and select the flow.

image

Explanations in the Tutorial are written in Remarks and can be displayed by either:

  • Clicking image in the Main menu of the flow to display all remarks.
  • Clicking image in the right corner of a Stage or Actor to see its remarks.

More remarks can be added by selecting Remark from either the Stage context menu or the Actor's context menu.

The Tutorial explains that a flow can be run by clicking Run Flow in the Main menu to run the entire flow and display the results and can be debugged by adding break points and using Debug Step to move between the Stages.

Click for more information about the Run and Debug flow.

The Tutorial explains the usage of a number of common built-in Actor Types, for example:

  • Const, a basic Actor which copies an input argument to the output value argument.
  • StringBuild, Replace, Concat and other Actors which handle the strings in a Broadway flow. Checkout strings.flow about working with strings in a Broadway flow.
  • Broadway supports several types of parser Actors, for example JsonParser or XmlParser. Parsers take a string or blob and parse them into a structure. Checkout json.flow, csv.flow and lines.flow parsing examples.

The tutorial provides an explanation about main Broadway features and refers to additional example flows for more details:

  • Dynamic Logic Actors include dynamic logic as one of their inputs. The input can be added to Actors and be referred to the Actor's logic. For example, JavaScript Actor executes the JavaScript provided in the script parameter and returns the value of the last expression. javascript.flow provides an additional explanation of how this Actor works.

  • Conditions are implemented using the Stage Condition option in the Stage context menu. You can split the Stage and assign a condition to one or more Stages created as a result of the split. An else Stage runs if all other Stage conditions return false. Checkout conditions.flow for more conditions examples.

  • Flow loops are implemented via an Iterate connection type. To change the line type, select the line and change its Link Type value to Iterate in the Link Properties window. To close the scope of the iteration, select Iterate Close from the Stage context menu. Checkout iterate-for-each.flow for more loop's examples.

  • An Actor's input or output argument can be set as External. When marking an output parameter as External, it becomes an output for the entire flow. In addition, a flow can be invoked using the InnerFlow Actor. You can also package an entire flow as an Actor. To do so, go to Actions > Save As Actor in the Main menu. Checkout javascript-advanced.flow, inner-flow-power.flow and inner-flow.flow for more about input/output arguments and examples of the inner flow.

Example - json.flow

The json.flow example shows how to parse a collection of byte arrays (stream). In the example the source is a constant. Based on the requirements, the source can be set to a FileReader, Http or any Actor that produces a stream / string.

A JsonParser Actor can either parse a single JSON object or multiple JSON objects arriving on the same stream. Note that an array is a single JSON object. In this example you can see both, the first handles a stream and initiates an Iteration loop and the second handles a single entry.

image

Previous

Broadway Tutorial and Flow Examples

The a-broadway-tutorial.flow introduces you to Broadway, its features, main principles and capabilities to provide you with the information you need to understand this module. In addition to the Tutorial's flow you can find other Broadway flow examples explaining specific subjects such as DB commands, conditions, parsers, dates and strings and how they are handled.

The following Broadway flow guides you through each consecutive step of an example business process and explains how it is implemented.

To open the Tutorial and example flows, in the Broadway Flow window, go to Main Menu > Actions > Examples and select the flow.

image

Explanations in the Tutorial are written in Remarks and can be displayed by either:

  • Clicking image in the Main menu of the flow to display all remarks.
  • Clicking image in the right corner of a Stage or Actor to see its remarks.

More remarks can be added by selecting Remark from either the Stage context menu or the Actor's context menu.

The Tutorial explains that a flow can be run by clicking Run Flow in the Main menu to run the entire flow and display the results and can be debugged by adding break points and using Debug Step to move between the Stages.

Click for more information about the Run and Debug flow.

The Tutorial explains the usage of a number of common built-in Actor Types, for example:

  • Const, a basic Actor which copies an input argument to the output value argument.
  • StringBuild, Replace, Concat and other Actors which handle the strings in a Broadway flow. Checkout strings.flow about working with strings in a Broadway flow.
  • Broadway supports several types of parser Actors, for example JsonParser or XmlParser. Parsers take a string or blob and parse them into a structure. Checkout json.flow, csv.flow and lines.flow parsing examples.

The tutorial provides an explanation about main Broadway features and refers to additional example flows for more details:

  • Dynamic Logic Actors include dynamic logic as one of their inputs. The input can be added to Actors and be referred to the Actor's logic. For example, JavaScript Actor executes the JavaScript provided in the script parameter and returns the value of the last expression. javascript.flow provides an additional explanation of how this Actor works.

  • Conditions are implemented using the Stage Condition option in the Stage context menu. You can split the Stage and assign a condition to one or more Stages created as a result of the split. An else Stage runs if all other Stage conditions return false. Checkout conditions.flow for more conditions examples.

  • Flow loops are implemented via an Iterate connection type. To change the line type, select the line and change its Link Type value to Iterate in the Link Properties window. To close the scope of the iteration, select Iterate Close from the Stage context menu. Checkout iterate-for-each.flow for more loop's examples.

  • An Actor's input or output argument can be set as External. When marking an output parameter as External, it becomes an output for the entire flow. In addition, a flow can be invoked using the InnerFlow Actor. You can also package an entire flow as an Actor. To do so, go to Actions > Save As Actor in the Main menu. Checkout javascript-advanced.flow, inner-flow-power.flow and inner-flow.flow for more about input/output arguments and examples of the inner flow.

Example - json.flow

The json.flow example shows how to parse a collection of byte arrays (stream). In the example the source is a constant. Based on the requirements, the source can be set to a FileReader, Http or any Actor that produces a stream / string.

A JsonParser Actor can either parse a single JSON object or multiple JSON objects arriving on the same stream. Note that an array is a single JSON object. In this example you can see both, the first handles a stream and initiates an Iteration loop and the second handles a single entry.

image

Previous