Built-In Actor Types

Broadway has a large list of built-in Actors that can be added to a flow 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 Actors categories with examples of each category. This is not an exhaustive list of Actors.

Click for more information about the most useful Actors and 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.

Click lev in an Actor's description in the Add Actors window to add the Actor to Favorites.

Actors in Favorites have a lev.

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 serve as the basic building blocks for creating a 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 SMTP interface. Supports email body in HTML format and can send attachments.

data

Various data manipulations, such as accumulate values into a map, build an array or sort the input collection.

MapBuild Actor, accumulates key/value pairs into a map. Duplicate keys are handled according to the duplicateKeys mode field.

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.

BatchWait Actor waits for a batch process to complete or throw an error if the batch does not complete successfully or does not complete within the predefined time.

images

Image manipulation Actors that allow to perform various activities, such as:
  • Load an image into a flow.
  • Write text on a given image.
  • Clone an image in memory.

ImageLoad Actor, receives a buffer or buffer stream, and loads the image into memory.

ImageSave Actor, encodes the image to a byte buffer with the given format. This can then be transported or saved using DbLoad, FileWrite, Http or other Actors.

jobs

Actors that creates Fabric jobs. These Actors are introduced in V6.5.3.

BroadwayJob, Actor that creates a Broadway job

InterfaceListener, Actor that creates an Interface Listener job.

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. It also includes the Actors that can define a sequence.

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

MaskingCreditCard Actor, generates a fake but valid credit card number similar to the original card's type.

MaskingSequence Actor,  implements a unique sequence number.

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, publishes messages using a message broker. The inputs are:

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

stats

Actors that gather the flow statistics.

StatsWriter Actor, sets or increments statistics that can then be read by the StatsReader.

StatsReader Actor, reads statistics written by other Actors such as StatsWriter, DbCommand or ErrorHandler.

The Actor has two outputs:

  • Flow, returns the flow level statistics map.
  • Global, returns the global/session level statistics map.

For example, if StatsReader is added to the flow after the DbCommand Actor that executes an INSERT query, the StatsReader displays the number of executed and the number of affected records.

streams

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

FileRead Actor, reads data from a file given in 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/HttpJson Actors, send a request to a Web Server. Support streaming payload and results, sending and receiving header parameters. Using this Actor you can call a Web Service and parse its results.

StringsToBytes Actor, reads an iterable of strings (or string representation) and converts them to byte arrays using the given character set (for example, UTF-8). The byteOrderMark input argument should be set to true if you need the BOM to be written at the beginning of the buffer, according to the given character set.

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 (initial value = JSON).
  • Parameters for Graphit execution.

The Actor first looks at the input parameters (first level) and, if it is not found there, looks in 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 be completed.

testing

Actors that check a condition and throw an assersion exception if the condition is not met. These Actors are introduced in V6.5.4.

assertNotNull Actor, throws an assertion error if supplied object is null.

assertContains Actor, throws an assertion error if substring cannot be found in string.

assertEquals, throws an assertion exceptions if actual does not equal expected.

 

 

 

Previous

Built-In Actor Types

Broadway has a large list of built-in Actors that can be added to a flow 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 Actors categories with examples of each category. This is not an exhaustive list of Actors.

Click for more information about the most useful Actors and 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.

Click lev in an Actor's description in the Add Actors window to add the Actor to Favorites.

Actors in Favorites have a lev.

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 serve as the basic building blocks for creating a 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 SMTP interface. Supports email body in HTML format and can send attachments.

data

Various data manipulations, such as accumulate values into a map, build an array or sort the input collection.

MapBuild Actor, accumulates key/value pairs into a map. Duplicate keys are handled according to the duplicateKeys mode field.

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.

BatchWait Actor waits for a batch process to complete or throw an error if the batch does not complete successfully or does not complete within the predefined time.

images

Image manipulation Actors that allow to perform various activities, such as:
  • Load an image into a flow.
  • Write text on a given image.
  • Clone an image in memory.

ImageLoad Actor, receives a buffer or buffer stream, and loads the image into memory.

ImageSave Actor, encodes the image to a byte buffer with the given format. This can then be transported or saved using DbLoad, FileWrite, Http or other Actors.

jobs

Actors that creates Fabric jobs. These Actors are introduced in V6.5.3.

BroadwayJob, Actor that creates a Broadway job

InterfaceListener, Actor that creates an Interface Listener job.

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. It also includes the Actors that can define a sequence.

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

MaskingCreditCard Actor, generates a fake but valid credit card number similar to the original card's type.

MaskingSequence Actor,  implements a unique sequence number.

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, publishes messages using a message broker. The inputs are:

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

stats

Actors that gather the flow statistics.

StatsWriter Actor, sets or increments statistics that can then be read by the StatsReader.

StatsReader Actor, reads statistics written by other Actors such as StatsWriter, DbCommand or ErrorHandler.

The Actor has two outputs:

  • Flow, returns the flow level statistics map.
  • Global, returns the global/session level statistics map.

For example, if StatsReader is added to the flow after the DbCommand Actor that executes an INSERT query, the StatsReader displays the number of executed and the number of affected records.

streams

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

FileRead Actor, reads data from a file given in 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/HttpJson Actors, send a request to a Web Server. Support streaming payload and results, sending and receiving header parameters. Using this Actor you can call a Web Service and parse its results.

StringsToBytes Actor, reads an iterable of strings (or string representation) and converts them to byte arrays using the given character set (for example, UTF-8). The byteOrderMark input argument should be set to true if you need the BOM to be written at the beginning of the buffer, according to the given character set.

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 (initial value = JSON).
  • Parameters for Graphit execution.

The Actor first looks at the input parameters (first level) and, if it is not found there, looks in 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 be completed.

testing

Actors that check a condition and throw an assersion exception if the condition is not met. These Actors are introduced in V6.5.4.

assertNotNull Actor, throws an assertion error if supplied object is null.

assertContains Actor, throws an assertion error if substring cannot be found in string.

assertEquals, throws an assertion exceptions if actual does not equal expected.

 

 

 

Previous