Third Possibility - HTTP Response Chain
Data Pass Back via Endless Response Routes 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 time-driven Input Agents triggered via HTTP) allows a dynamic response (HTTP response) via the Response Route custom classes PassBackDataResponse and DefaultWebServiceResponse (ebenso PassBackBinaryDataResponse und 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).
In order 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 time-driven Input Agent) can be used. The structure of that kind of profile chain is shown in the following figure.
Important note: 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. Please take a look at the postexecuter class TempFileReadPostExecuter for that.
Note: Lobster_data provides a programming interface (API) that allows you to develop your own components in Java. For this, we offer in-depth training. If you are interested, please contact our support or sales staff.
Data Pass Back via Single-Step Response Routes of Type Message and HTTP
Alternatively, you can use the option Return data in the Response Routes Message and HTTP. Details see there.
Please set checkbox 'Custom class' or 'Pass back data' in response channel of profile in the HTTP Input Agent (profile 1). Alternatively, set checkbox Return data for all time-driven Input Agents triggered via HTTP.
If you are using a Response Route M essage , you also have to use one of the Response Route classes ( PassBackDataResponse , DefaultWebServiceResponse , PassBackBinaryDataResponse , DefaultWebServiceResponseBinary) in profile 2.
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 variable MSG_CALL_HEADER_HTTP_VAR_TEST (must be created) in the profile.