Built-In Actor Types

Broadway has a large list of built-in Actors that can be added to a flow in order to create various types of activities. Broadway's built-in Actors are split into categories, where each category includes several Actor types.

The following table presents a list of Actor's categories with examples per each category. This is not an exhaustive list of Actors.

Click for more information about the most useful Actors and the code examples.

Category

Category Description

Example of Actors per Category

Favorites

Most commonly used Actors.

Favorites is not a separate category. Each Actor in Favorites belongs to a category.

Const Actor, copies the input value argument to the output value argument. A Const Actor can:

  • Pass a constant value to the next Actor.
  • Receive its input from the output of a previous Actor and transfer it to the next Actor.
  • Receive an external flow argument and transfer it to the next Actor.
Concat Actor, concatenates an array of strings and joins them with the given delimiter.
JavaScript Actor, executes the Javascript provided in the script parameter. The script returns the value of the last line.

basic

Actors serving as the basic building blocks for creating the Broadway flow.

ForLoop Actor, iterates over a range of numbers.

Logger Actor, writes a message to the log file referencing entries from params and Actor inputs.

InnerFlow Actor, executes a Broadway flow.

LuFunction Actor, executes Studio function logic. Parameters for the function's execution are taken from input arguments or from the params input argument.

Email Actor, sends an email using a given SMTP interface.

date/time

Various Date and Time manipulation functions, such as DateAdd, DateFormat or Now.

DateFormat Actor, formats a date into a string.

  • Input values: Date, Output Format (following a predefined pattern) and Time Zone.
  • Initial format: yyyy-MM-dd HH:mm:ss.SSS.
  • Initial value of the time zone: UTC.
  • Output: a string.

For example:

  • To display a day of a year in the output, add D to the format.
  • To display a day of the week in the output, add E to the format.

db

Actions to be performed on a DB interface, such as creating a new table, loading data or executing a DB command.

DbCommand Actor, performs database commands on a DB command interface. The interface used as input can be:

  • A JDBC URL.
  • Reference to a predefined interface.
  • Others, like the Schema, table name, fields definition, SQL dialect to use and append text appended to the CREATE command.

The DbCommand can be used to create the WITH section where required.

DbLoad Actor, loads data into a database using INSERT, UPDATE or UPSERT (if supported). The interface used as input can be the same as for DbCommand Actor.

  • The Actor supports named parameters with the parameter name inside ${}. Values are taken from the Actor's input parameters.
  • In an INSERT command, the Actor also supports ordered parameters using the ? as a replacement for the parameter.

fabric

Actors which execute the Fabric commands.

FabricGet Actor performs the GET command on the current Fabric session.

FabricSet Actor sets a value on the Fabric session.

logic

Logical operation on Actors A and B which returns a True or False boolean result.

Broadway converts the following types of input parameters to booleans:

  • Null/no input, False.
  • Integer/double, True if not 0.
  • String, True if not empty/0/False.
  • Array/Map, True if not empty.

And Actor, returns True if and only if both A and B are True. Both A and B must be boolean values or a value that can be converted to a boolean.  

Elvis Actor, returns A if converted to boolean is True. Otherwise returns B.

IfElse Actor, includes the test input to be validated as either True or False. If test is True, return A, else return B. 

masking

A group of Actors to mask sensitive information, such as SSN, credit card number, email.

MaskingSSN Actor, masks the original SSN number with a valid fake SSN.

MaskingCreditCard Actor, generates fake but valid credit card number similar to original card type.

math

Various mathematical functions, such as MathMax, MathMin, Aggregate.

Aggregate Actor, aggregates values. It receives a number or collection of numbers and calculates the Sum, Count, Average, Min and Max values of this collection. This Actor maintains its state across multiple loop iterations.  

MathDivMod Actor, returns the divisor and modulo factor of A and B. For example, if A=10 and B=3 then div=3 and mod=1. 

parsers

Various parsers which can be received as input stream in different types of formats, for example, CSV, JSON or XML.

XmlParser Actor, receives an input stream represented via an iterable collection of blobs or strings. The parser runs until the end of the stream is detected. It returns a collection of parsed objects or a single object if Single is set to True.

queue

Publish / subscribe messages to the queue.

Publish Actor, publlishes messages using a message broker. The inputs are:

  • Broker interface to use.
  • Topic to publish to.
  • Message. 

streams

Various stream manipulation functions, such as Compress, FileRead or Http.

FileRead Actor, reads data from a file given an interface and path. The file is opened lazily when an Actor reads the output stream. Once the file has been fully read, it is closed. If the file is not fully read, it is closed at the end of the flow.

Http Actor, sends a request to a Web Server. Supports streaming payload and results and sending and receiving header parameters.

strings

Various string manipulation functions, such as Concat, Split or Trim.

Graphit and JsonStringify Actors are also included in this category.

Regex Actor, finds sub-strings in an input string using a regular expression. The Actor tries to find all matches of the pattern within the input string and return them. When using matching groups, the result is the content of the matching group instead of the full match. For example, in the ABCDEF string, the C.E pattern returns [CDE], whereas C(.)E returns [D].

Graphit Actor, executes Graphit logic for data serialization. Parameters for the Graphit execution are taken from input arguments or from the params input argument. The inputs are:

  • LU containing the Graphit file (initial value = k2_ws).
  • Graphit filename.
  • Required output format (inital value = JSON).
  • Parameters for Graphit execution.

The Actor first looks at the input parameters (first level) and, if it is not found there, looks at the params input argument.

system

System processes and commands to be performed in the file system.

cp Actor, copies a file. The interface used as input can be:

  • JDBC URL.
  • Reference to a predefined interface.
  • Path of the sourcefile (from).
  • Destination (to).

The output is a number of affected files.

Exec Actor, executes a system process and waits for it to complete.

Previous

Built-In Actor Types

Broadway has a large list of built-in Actors that can be added to a flow in order to create various types of activities. Broadway's built-in Actors are split into categories, where each category includes several Actor types.

The following table presents a list of Actor's categories with examples per each category. This is not an exhaustive list of Actors.

Click for more information about the most useful Actors and the code examples.

Category

Category Description

Example of Actors per Category

Favorites

Most commonly used Actors.

Favorites is not a separate category. Each Actor in Favorites belongs to a category.

Const Actor, copies the input value argument to the output value argument. A Const Actor can:

  • Pass a constant value to the next Actor.
  • Receive its input from the output of a previous Actor and transfer it to the next Actor.
  • Receive an external flow argument and transfer it to the next Actor.
Concat Actor, concatenates an array of strings and joins them with the given delimiter.
JavaScript Actor, executes the Javascript provided in the script parameter. The script returns the value of the last line.

basic

Actors serving as the basic building blocks for creating the Broadway flow.

ForLoop Actor, iterates over a range of numbers.

Logger Actor, writes a message to the log file referencing entries from params and Actor inputs.

InnerFlow Actor, executes a Broadway flow.

LuFunction Actor, executes Studio function logic. Parameters for the function's execution are taken from input arguments or from the params input argument.

Email Actor, sends an email using a given SMTP interface.

date/time

Various Date and Time manipulation functions, such as DateAdd, DateFormat or Now.

DateFormat Actor, formats a date into a string.

  • Input values: Date, Output Format (following a predefined pattern) and Time Zone.
  • Initial format: yyyy-MM-dd HH:mm:ss.SSS.
  • Initial value of the time zone: UTC.
  • Output: a string.

For example:

  • To display a day of a year in the output, add D to the format.
  • To display a day of the week in the output, add E to the format.

db

Actions to be performed on a DB interface, such as creating a new table, loading data or executing a DB command.

DbCommand Actor, performs database commands on a DB command interface. The interface used as input can be:

  • A JDBC URL.
  • Reference to a predefined interface.
  • Others, like the Schema, table name, fields definition, SQL dialect to use and append text appended to the CREATE command.

The DbCommand can be used to create the WITH section where required.

DbLoad Actor, loads data into a database using INSERT, UPDATE or UPSERT (if supported). The interface used as input can be the same as for DbCommand Actor.

  • The Actor supports named parameters with the parameter name inside ${}. Values are taken from the Actor's input parameters.
  • In an INSERT command, the Actor also supports ordered parameters using the ? as a replacement for the parameter.

fabric

Actors which execute the Fabric commands.

FabricGet Actor performs the GET command on the current Fabric session.

FabricSet Actor sets a value on the Fabric session.

logic

Logical operation on Actors A and B which returns a True or False boolean result.

Broadway converts the following types of input parameters to booleans:

  • Null/no input, False.
  • Integer/double, True if not 0.
  • String, True if not empty/0/False.
  • Array/Map, True if not empty.

And Actor, returns True if and only if both A and B are True. Both A and B must be boolean values or a value that can be converted to a boolean.  

Elvis Actor, returns A if converted to boolean is True. Otherwise returns B.

IfElse Actor, includes the test input to be validated as either True or False. If test is True, return A, else return B. 

masking

A group of Actors to mask sensitive information, such as SSN, credit card number, email.

MaskingSSN Actor, masks the original SSN number with a valid fake SSN.

MaskingCreditCard Actor, generates fake but valid credit card number similar to original card type.

math

Various mathematical functions, such as MathMax, MathMin, Aggregate.

Aggregate Actor, aggregates values. It receives a number or collection of numbers and calculates the Sum, Count, Average, Min and Max values of this collection. This Actor maintains its state across multiple loop iterations.  

MathDivMod Actor, returns the divisor and modulo factor of A and B. For example, if A=10 and B=3 then div=3 and mod=1. 

parsers

Various parsers which can be received as input stream in different types of formats, for example, CSV, JSON or XML.

XmlParser Actor, receives an input stream represented via an iterable collection of blobs or strings. The parser runs until the end of the stream is detected. It returns a collection of parsed objects or a single object if Single is set to True.

queue

Publish / subscribe messages to the queue.

Publish Actor, publlishes messages using a message broker. The inputs are:

  • Broker interface to use.
  • Topic to publish to.
  • Message. 

streams

Various stream manipulation functions, such as Compress, FileRead or Http.

FileRead Actor, reads data from a file given an interface and path. The file is opened lazily when an Actor reads the output stream. Once the file has been fully read, it is closed. If the file is not fully read, it is closed at the end of the flow.

Http Actor, sends a request to a Web Server. Supports streaming payload and results and sending and receiving header parameters.

strings

Various string manipulation functions, such as Concat, Split or Trim.

Graphit and JsonStringify Actors are also included in this category.

Regex Actor, finds sub-strings in an input string using a regular expression. The Actor tries to find all matches of the pattern within the input string and return them. When using matching groups, the result is the content of the matching group instead of the full match. For example, in the ABCDEF string, the C.E pattern returns [CDE], whereas C(.)E returns [D].

Graphit Actor, executes Graphit logic for data serialization. Parameters for the Graphit execution are taken from input arguments or from the params input argument. The inputs are:

  • LU containing the Graphit file (initial value = k2_ws).
  • Graphit filename.
  • Required output format (inital value = JSON).
  • Parameters for Graphit execution.

The Actor first looks at the input parameters (first level) and, if it is not found there, looks at the params input argument.

system

System processes and commands to be performed in the file system.

cp Actor, copies a file. The interface used as input can be:

  • JDBC URL.
  • Reference to a predefined interface.
  • Path of the sourcefile (from).
  • Destination (to).

The output is a number of affected files.

Exec Actor, executes a system process and waits for it to complete.

Previous