---
title: "Profile chains"
slug: "intro-profile-chains"
updated: 2026-10-15T13:25:30Z
published: 2026-10-15T13:25:30Z
canonical: "docs.lobstersoftware.com/intro-profile-chains"
---
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Profile chains
Occasionally you are confronted with a problem that is not solvable in a single Profile. For this case, we offer the possibility to create profile chains in which a profile calls one or several subsequent profiles. These profile chains can, in principle, be arbitrarily long, but the performance should be kept in mind. It is the responsibility of the user/developer to avoid endless loops (or to handle them appropriately) when using the mechanisms described here!
## Modules
The module "Data Flow" is a useful tool for visualizing and analyzing profile chains of this type.
## Error behavior
Normally, if a subsequent profile is not found, an exception is generated. This behavior can be modified by adding the following entry to the configuration file `./etc/startup.xml`.
```xml
true
```
## First possibility: Message and data
A profile with a Response of type "Message" starts a profile with an Input agent of the type "Message". Profile 2 receives the output data of profile 1 (the receiving profile has to be active).
.png)
Please note that both profiles have to use the same queue and the same context. You can use the default values of a new profile. You will find more detailed information in the description of the response/input agent of the "Message" type.
### Profile 1, response
Profile name:
Context name: `System`
Queue name: `DWForwardReceiver`
### Profile 2, input agent
Message context: `System`
Message queue: `DWForwardReceiver`
## Second possibility: Message and trigger
If you are only interested in triggering the subsequent profile and not in transferring the output data of the triggering profile, the subsequent profile (this profile has to be active) can also have a scheduled input agent*.*
.png)
It should be noted that the option "Content" in profile 1 must be set to "Trigger profile" (the encoding is not relevant).
The subsequent profile receives its data via the executed scheduled input agent. The type of input agent is irrelevant. You only have to select the option [Trigger/External call](/v1/docs/en/profiles-tab-2-times-trigger) and another profile on the [Times/Execution](/v1/docs/en/profiles--entry-tab-2-times) page.
**NOTE:** There is a special case in profiles with scheduled input agents (see [Options](/v1/docs/en/profiles--entry-tab-2-options)**)**. You can trigger a subsequent profile there in the same way, but "hard-wired". Please note that in this case, [Variables with prefix MSG_CALL_](/v1/docs/en/intro-concepts-profile-variables-msg-call) cannot be accessed in triggered profiles (variables are not yet initialized in the triggering profile in Phase 1, see also [Variables](/v1/docs/en/intro-concepts-variables)), unless the triggering profile is also triggered by another profile. Its `MSG_CALL_` variables can then be passed through.
## Third possibility: HTTP response chain
### Data pass back via endless responses of type "Custom class"
There are cases in which a client that sends a request to a profile expects a response from that profile (e.g. for HTTP requests or web service calls).
If it is necessary to build up a chain of profiles, this would normally be done by means of a message to the subsequent profile, but then the reply to the client from the subsequent profile would no longer be possible.
The input agent of type "HTTP" (and all scheduled input agents triggered via HTTP) allows a dynamic response (HTTP response) via the response custom classes `PassBackDataResponse` and `DefaultWebServiceResponse` (also `PassBackBinaryDataResponse` and `DefaultWebServiceResponseBinary`). Please set checkbox "Custom class or Pass back data in response channel of profile" in the HTTP input agent and checkbox "Return data" for the triggered input agents.
Thus, the content of the response can be created dynamically in the profile (mapping, etc.) and can be returned via one of these classes (to the input agent and from there to the client).
To extend this process via a profile chain, the classes `CallProfile` (for subsequent profiles that do not have a time-driven Input Agent) and `CallCronProfile` (for subsequent profiles that do have a scheduled input agent) can be used. The structure of that kind of profile chain is shown in the following figure.
.png)
**IMPORTANT:** The subsequent profile that is called with class `CallProfile` (or `CallCronProfile`) must have the encoding in Phase 2 set to `UTF8`. In addition, all called profiles must be active.
**NOTE:** If a subsequent profile is called by Message (or has to be called by Message), there is another way to pass back data. Look at the post-executor class `TempFileReadPostExecuter` for that.
### Data pass back via single-step responses of type "Message" and "HTTP"
Alternatively, you can use the option "Return data" in the responses "Message" and "HTTP".
Set the checkbox "Custom class or Pass back data in response channel of profile" in the input agent "HTTP" (profile 1). Alternatively, set checkbox "Return data" for all time-driven Input Agents triggered via HTTP.
If you are using a Response "Message", you also have to use one of the Response classes (`PassBackDataResponse`, `DefaultWebServiceResponse`, `PassBackBinaryDataResponse`, `DefaultWebServiceResponseBinary`) in profile 2.
.png)
.png)
**NOTE:** A subsequent profile or an error profile can also be called in the response "HTTP" and the response can be generated and returned from this profile instead of directly returning the response of the response "HTTP" (for details, see the documentation of the response). In this case, you also have to use one of the response classes (`PassBackDataResponse`, `DefaultWebServiceResponse`, `PassBackBinaryDataResponse`, `DefaultWebServiceResponseBinary`) in the subsequent/error profile.
### Setting variables
You can set variables in the profile via HTTP request headers. For example, if the HTTP request contains the header `VAR_TEST`, you use it to set the variable `MSG_CALL_HEADER_HTTP_VAR_TEST` (must be created) in the profile.
## Fourth possibility: Functions
The first three possibilities can also be realized via the functions [trigger profile()](/v1/docs/en/basic-trigger-profile) and [call profile()](/v1/docs/en/basic-call-profile).
## Passed variables, lists and maps
### Variables
#### Prefix
In the first and second (not the third!) option, the variables of the calling profile are passed to the called profile. However, the prefix `MSG_CALL_` is added. However, the prefix is added only once. A variable name with a prefix `MSG_CALL_MSG_CALL_` will never be created.
In the third option (see there), variables can be set via HTTP request headers.
Variables are also passed to called subprofiles.
#### Setting the variable in the calling profile
You set the variable in the calling profile, not in the subsequent profile. Define the variable in the calling profile. Then assign its value, for example, in the mapping. When the calling profile starts a subsequent profile (first or second possibility), the variable is passed automatically. The prefix `MSG_CALL_` is added to its name. The subsequent profile must define a matching `MSG_CALL_` variable to read the value. See the "Access" section right below.
#### Access
The subsequent profile can only access these variables (from Phase 1) if they have been defined there. If profile 1 has a variable `var__Test`, the variable `MSG_CALL_var__Test` is passed on and profile 2 must define a variable `MSG_CALL_var__Test` in order to be able to access the content of the variable. The variable names are case-sensitive.
If the mapping is deactivated in the subsequent profile, variables are not defined either. Thus, none of the values of the calling profile's variables can be accessed. If the variable values in the subsequent profile are needed nevertheless without a mapping being required there, the following steps should be taken.
- Activate the mapping in the subsequent profile.
- Create a dummy mapping (e.g. one field).
- Use the content type "as received" in the Responses of the subsequent profile. The Target tree created in the mapping will then be ignored.
#### Name conflicts
If a variable is to be forwarded via multiple profiles by message, care should be taken to ensure that all subsequent profiles do not use any variable names that are used by one of the preceding profiles, since the prefix `MSG_CALL_` can result in name conflicts and incalculable behavior during the initialization of variables in subsequent profiles.
**Example:** Profile 1 calls profile 2, which in turn calls profile 3. In profile 1, there is a variable `Count`, which is passed to profile 2 as `MSG_CALL_Count`. If there is also a variable `Count` in profile 2, the variable `MSG_CALL_Count` is passed on to profile 3 twice (and possibly with different values). Once the variable `MSG_CALL_Count` created in profile 2 (to access the passed on variable from profile 1), and then the variable `Count` created in profile 2 with the added prefix `MSG_CALL_`.
#### Profile restart (metadata)
If a profile that has received variables from another profile is restarted, these variables are available because they are stored in the metadata. See also [Metadata editor](/v1/docs/en/cc-logs-overview--metadata-editor).
#### Control Center (metadata)
You can check the variables passed to subsequent profiles and subprofiles in the Control Center (see pages "Overview" and "Errors") via the Metadata Editor.
### Lists and maps (and variables in the map)
To pass lists and maps to other profiles (Phase 3), you can use the functions [serialize map/list()](/v1/docs/en/basic-serialize-map-or-list) and [deserialize map/list()](/v1/docs/en/basic-deserialize-map-or-list) or the autoserialization mechanism via the system variable `VAR_AUTOSERIALIZE_DATA`. In addition, the [copy variables into map()](/v1/docs/en/basic-copy-variables-into-map) function can be used to write all variables of the calling profile into a map (and then pass them as a map), saving you the use of the `MSG_CALL_` prefix.
### Other data structures
Other data structures are not transferred from profile to profile.
However, system-wide data structures (see [Constants](/v1/docs/en/manage-values)) are available. However, please note that only system constants are available in Phase 1. System-wide number ranges and system-wide permanent values are only available in Phase 3. If you want to use these values in Phase 1, you must take the detour via variables or system constants.
## Dispatcher profiles
When working with profile chains, one often has to model branches in the processing sequence. That is, it must be decided at a certain point whether the further processing takes place with profile 2 or profile 3.
For this purpose, it is useful to create a so-called dispatcher profile. So a profile that directs the further processing to the appropriate subsequent profile.
.png)
Profile 1 merely has to have several responses of the type "Message". In this case, two. One of them calls profile 2 and the other one calls profile 3.
Calling a response can be controlled via [Dependencies](/v1/docs/en/phase-6-response-dependencies). Of course, if you are using a variable in the dependency, for example, you can only use variables that are defined in profile 1. These variables may also come from preceding profiles. In that case, you have to use the syntax mentioned earlier .
Alternatively, you can specify the name of the called profile in a single response of the "Message" type using a variable (type "String").
A profile is the central configuration unit in the Lobster Data Platform. It receives data, processes it, and forwards it. Configuration is done graphically, with no programming required.
The response determines how a profile sends processed data. In Phase 6, a response determines how and where the output data is sent or stored, e.g., via FTP, HTTP or e-mail. A profile can use several responses in parallel.
The input agent receives data in Phase 1 and starts a job for further processing. It works either as event based (passively waits for data) or scheduled (actively fetches data).
Input: An input agent receives the data. It can work either as event based (e.g. FTP upload) or scheduled (cron).
Parsing: The input data is parsed into the source structure. The source structure represents the input format.
Structured representation of the input data in Phase 3. The target tree receives the values transferred via mapping and passes them on to Phase 4, Phase 5, or Phase 6.
Mapping: Rules transfer the data from the source structure to the target structure. This is the core of the profile.