Important Note on Variable Precedence: If a process variable and a generic parameter share the same name, the process variable takes precedence at runtime. If the process variable is
null
or undefined
, the generic parameterβs value is used as a fallback. To avoid unintended behavior, ensure distinct naming conventions for process variables and generic parameters.Parameter | Description |
---|---|
baseURL | This parameter can be used to define the base URL of an API or website, which can be utilized across multiple environments |
redirectURL | This parameter can be used to define the URL to which a user should be redirected after completing a certain action or process. This can save time and effort by avoiding the need to hardcode multiple redirect URLs. |
envFilePath | This parameter can be used to define the path of the environment file that stores a document uploaded |
- Go to FlowX Designer and select the General Settings tab.
- Select Generic Parameters from the list.
- Click New parameter.
- Fill in the details.
- Click Save.

Configuring a generic parameter
To configure a generic parameter you need to fill in the following details:- Key - the key that will be used in a process to call the generic parameter
- Value - the value that will replace the key depending on the defined parameters
- Environment - set the environment where you want to use the generic parameter (βοΈleave empty to apply to all environments)
- Add a new value - to add a new value for the same key but for a different environment
For example, if you want to set a
baseURL
generic parameter (the URL will be different, depending on the environmaent).
Using generic parameters
Key Considerations
- Variable Precedence:
- Process variables with the same name as a generic parameter will override the generic parameter at runtime.
- If the process variable is null or undefined, the generic parameterβs value is used as a fallback.
- Naming Best Practices:
- To prevent unintentional behavior, use distinct names for process variables and generic parameters.
Use case
Imagine that you need to create a process in which you need to upload an image or a document. We will define a generic parameter calledenvfilePath
that will represent the path where the document/image will be uploaded.

- A start node.
- A task node.
- A user task node.
- An end node.

Configuring the task node
Set a business rule action on the task node with the following properties:Action Edit
- Name - used internally to make a distinction between different actions on nodes in the process - example getGenericParameters
- Order - if multiple actions are defined on the same node, the running order should be set using this option
- Action type - should be set to Business Rule
- Trigger type - Automatic - choose if this action should be triggered automatically (when the process flow reaches this step)
- Required type - automatic actions can only be defined as mandatory

Parameters
- Language - we will choose MVEL for this business rule example
- Message body - MVEL expression

envFilePath
(our defined generic parameter) in the βoutputβ map object. The value assigned to the key is retrieved from another object, additionalData.applicationConfiguration
, using the βgetβ method and passing the key envFilePath
as the parameter.
In other words, this rule extracts the value of the envFilePath
generic parameter from the additionalData.applicationConfiguration
object and assigns it to the envFilePath
key in the βoutputβ map object.
It is important to note that the additionalData.applicationConfiguration
object and the βoutputβ map object must be previously defined and accessible in the current context for this rule to work.
Configuring the user task node
On this node we will define the following:- an Upload File action with two child actions:
- a Business Rule
- a Send data to user interface action
Child actions can be marked as callbacks to be run after a reply from an external system is received. They will need to be set when defining the interaction with the external system (the Kafka send action).
Configuring Upload file action
Set an Upload file action on the task node with the following properties:Action Edit
- Name - uploadDocument
- Order - if multiple actions are defined on the same node, the running order should be set using this option
- Action type - should be set to Upload File
- Trigger type - manually (triggered by the user)
- Required type - optional
- Repeatable - yes - should be checked if the action can be triggered multiple times
- Autorun Children - when this is switched on, the child actions (the ones defined as mandatory and automatic) will run immediately after the execution of the parent action is finalized
Parameters
- Address - the Kafka topic where the file will be posted -
ai.flowx.in.devmain.document.persist.v1
In this example we used an environment called
devmain
, topic naming convention is different depending on what environment you are working.- Document Type - other metadata that can be set (useful for the document plugin) - example:
BULK
- Folder - allows you to configure a value by which the file will be identified in the future - example:
1234_${processInstanceId}
- Advanced configuration (Show headers) - this represents a JSON value that will be sent on the headers of the Kafka message
callbacksForAction
- the value of this key is a string that specifies a callback action associated with theUpload document
destination ID (node). This is part of an event-driven system (Kafka send action) where this callback will be called once theuploadDocument
action is completed.
Configuring Business rule action
- The business rule is expecting two inputs:
envfilePath
anduploadedDocument
. - It is checking if the
downloadPath
property of theuploadedDocument
input is not null and not an empty string. If itβs not, then it proceeds to the next steps. - It concatenates the
envfilePath
and thedownloadPath
to form the full file path (filePath) where the uploaded document is expected to be located. - It updates the
uploadedDocument
input by adding a new property calledfilePath
with the value offilePath
. - It puts the updated
uploadedDocument
object into the output object as a key-value pair, with the key being βuploadedDocumentβ.
Configuring a Send data to user interface action
filePath
: This is a key in the object which holds the value${uploadedDocument.filePath}
. The syntax${...}
suggests that itβs a variable placeholder that will be replaced with the actual value at runtime.
