Skip to main content

Create New Workflow in RCOM Gateway

In RCOM Gateway, a workflow is a dynamic sequence of actions executed in response to an event, such as a device reading, API call, or scheduled trigger. Workflows are essential for transforming raw event data into meaningful automation, enabling real-time integrations with external systems, databases, notifications, and more.

Overview

A workflow defines how incoming data is processed, from the moment it enters the Gateway to its final destination. This includes operations like:

  • Extracting or transforming input data
  • Triggering REST or MQTT calls to third-party systems
  • Modifying object records in the platform database
  • Sending emails, pushing alerts, or updating dashboards

Step 1: Open Workflow Management

To begin:

  1. Log in to the RCOM Gateway Dashboard.
  2. Navigate to Workflows > Manage Workflows.
  3. Click + Create Workflow to launch the workflow builder.
Create new workflow

Create new workflow

Step 2: Define Workflow Metadata

The workflow canvas appears where you can configure your logic. Start with basic settings:

Design a new workflow

Design a new workflow

  • Name (Required): Give your workflow a unique, descriptive name.
  • Description (Optional): Summarize what this workflow accomplishes.
  • Parameters (Optional): Declare input variables that this workflow can accept, typically passed from an Event Processor.
  • Execution Settings (Optional):
    • Workflow Execution Settings: Define default values for workflow process tags and process status.
      • Default Job Status: A workflow status assigned to each workflow instance that use this tempalte, at the begining of the workflow exicution. This can be updated later from workflow using SetJobStatus action.
      • Default Job Tags: Tags are used for categorization, filtering, monitoring, and reporting purposes. If you define a default it will be added to all workflows jobs using this template. New tags can be added with AddJobtags action and existing once can be removed with RemoveJobtags action.
    • Runtime Configuration : Controls how the workflow engine executes and logs this workflow.
      • Execution Timeout (ms): Maximum allowed exicution time in milliseconds. The workflow will be automatically terminated after this duration.
      • Log Level : Define the level details you want to preserve in the workflow log. The selected level and higher will only be saved.
      • Persist Final Context in DB : Save the final exicution context in database. Disable to save space.
info

It is recommended to disable the Persist Final Context in DB option when deploying workflows to a production environment. If a workflow retrieves large amounts of data from the database on each execution, storing that data in the context for reference can lead to significant database storage consumption over time. For finer control, it is recommended to use the FlushContext workflow action to whitelist or blacklist specific variables. This allows you to retain only the required data in the context while excluding unnecessary or large payloads.

To add a parameter:

  1. Click the Parameters tab > Add New.
  2. Provide a name (e.g., batchId, timestamp).
  3. Choose a data type:
    String, Int, Bool, DateTime, Decimal, Guid, List, Dictionary, GhostData, etc.
  4. Click Save.

Step 3: Add and Connect Actions

Each workflow is built using Action Blocks, modular operations representing a specific task.

To add an action:

  1. Open the Actions panel.
  2. Drag a block (e.g., HttpRequest, SetVariables, SendEmail) onto the canvas.
  3. Configure its inputs and outputs.
  4. Connect blocks using arrows to define execution flow and logic.

Action blocks may receive input from previous blocks and output data to subsequent ones.

Step 4: Understand Connection Logic

RCOM Gateway uses visual connectors to represent workflow transitions. Each connection line signifies what happens based on an action’s result:

Line TypeMeaning
Green SolidSuccess (Result = True) and this outcome is mandatory
Red SolidFailure (Result = False) and must be handled
Green DashedSuccess path that is optional (not required for workflow to proceed)
Red DashedOptional failure branch

Use these to build branching, error handling, and conditional flows.

Step 5: Save the Workflow

Once your logic is complete:

  • Verify all action blocks are connected appropriately.
  • Ensure required inputs and outputs are defined.
  • Click Save Workflow to persist your configuration.
Example workflow

Example workflow


Action Block Categories

Action blocks are grouped by function. Below is a categorized list for easy reference:

info

For detailed information on Action blocks and setup, refer to the guide:>>Workflow Actions.

🧮 Data Processing

Action NamePurpose
AddTimeModify datetime by adding/subtracting durations
JsonPathValueExtract typed data using JsonPath
JsonPathExtract strings from JSON values using path syntax
SplitStringConvert a string into a list based on a separator
JsonSerializerConvert object to JSON format
XPathRun XPath on XML to extract values
DecodeDataDecode structured input by command rules
Decode6BitDecode EPC hex to ASCII
DecodeGS1Decode EPC to GS1 URI formats
Encode6BitEncode ASCII to 6-bit EPC hex
EncodeGS1Encode EPC URN to GS1 URI format
EncodeGs1TagUriConvert GS1 EPC URN tag format to GS1 EPC URI
GetKeyListExtract all keys from a dictionary into a list
MatchAndSortListMatch and sort items in a list
RegexMatchMatch or extract substrings using a regular expression
ReplaceWordPlaceholdersReplace placeholders in a Word document template

🔁 Control Flow

Action NamePurpose
ConditionBranch logic based on Boolean expression
WhileExecute steps while a condition holds
ForEachIterate over list/dictionary elements
CustomScriptExecute a custom script using RCOM Gateway Interpreter
SleepPause workflow execution for a specified duration
FlushContextFlush intermediate workflow context data

🌐 External Interaction

Action NamePurpose
WebRequestSend configurable HTTP requests
WebRequest3Lightweight HTTP request block
MQTTPublisherPublish messages to an MQTT broker
SendEmailSend emails via configured or custom SMTP
CustomSQLExecute SQL queries against a SQL Server database
CustomMySQLExecute SQL queries against a MySQL database
CustomPostgresSQLExecute SQL queries against a PostgreSQL database
MQTTChallengeResponseHandle MQTT challenge-response authentication
PublishRabbitMQPublish messages to a RabbitMQ broker

🧱 Object/Storage Management

Action NamePurpose
CreateObjectCreate a new object
SetObjectAttributesUpdate object attributes dynamically
SetStorageLocationModify object's storage location
SetGeoLocationUpdate object’s latitude and longitude
ReadObjectGet attributes of a specific object
ReadObjectGroupRetrieve metadata of an object group
GetObjectsOfObjectGroupRetrieve all objects from a group
GetObjectsOfAttributesRetrieve objects that match specified attributes
GetObjectsOfStorageRetrieve objects from storage using location filters
LookUpAttributeLook up a specific attribute of a matched object
LookUpAttributesLook up all/specific attributes of a matched object
DeleteObjectDelete an object (optionally with history)
DeleteObjectInstantInstantly delete an object from an Object Group
CheckStorageExistsVerify whether a storage entity exists at a given level
CreateStorageLocationCreate a new entry in the storage hierarchy
GetAttachmentRetrieve a file attachment linked to an object
GetGroupRetrieve a group name by its ID
GetObjectChangeHistoryRetrieve historical attribute changes for an object
GetObjectGroupSchemaRetrieve the schema definition of an Object Group
GetStorageAreasReturn all defined storage areas with parent IDs
GetStorageBinsReturn all defined storage bins with parent IDs
GetStorageLocationsReturn all defined storage locations with parent IDs
GetStorageNumbersReturn all top-level storage numbers
DeleteAttachmentDelete a file attachment from an object
SaveAttachmentSave a file as an attachment to an object
SetObjectInstantInstantly update object attributes during execution
SetStorageLocationByIDSet an object's storage location using numeric IDs

🔄 Casting / Conversion

Action NamePurpose
CastBoolCast value to Boolean
CastDateTimeCast value to DateTime
CastDateTimeOffsetCast value to DateTimeOffset
CastDecimalCast value to Decimal
CastIntCast value to Integer
CastStringCast value to String
CastObjectCast value to generic Object
CastObjectListCast value to List of Objects
CastDictionaryCast value to Dictionary
CastDictionaryListCast value to List<Dictionary>
ConvertToGhostDataConvert to GhostData object (custom structured)
GenerateGuidGenerate a new globally unique ID

🛠️ Utility

Action NamePurpose
SetVarAssign values to variables
StartTimerStart a timer and execute logic after it ends
GetDateRetrieve current date and time
GetDateOffsetRetrieve current date with timezone offset
LogLog messages with different severity levels
UpdateGlobalVarUpdate a client/global-level variable
SetHttpResponseDefine HTTP response for web-triggered workflows
AddJobTagsAssign one or more tags to the current workflow job
RemoveJobTagsRemove one or more tags from the current workflow job
SetJobStatusSet the logical job status of the current workflow job
SetDictionaryCreate or populate a dictionary variable
ValidateDecimalLimitsValidate a decimal value against defined min/max limits

📁 File Operations

Action NamePurpose
CreateExcelSheetCreate an Excel file from structured data as a byte array
CreateTemporaryFileSave a file (byte array) to the database and return a File ID
LoadCsvParse CSV content (bytes) into structured workflow data
LoadExcelSheetParse an Excel file (byte array) into structured workflow data
LoadTemporaryFileRetrieve a stored file from the database by its File ID

info

For detailed information on Action blocks and setup, refer to the guide:>>Workflow Actions.

Next Steps

Once you've created and saved your workflow, you can test it by triggering the associated event processor. Monitor the logs and data flows to ensure the workflow behaves as expected.