call profile(a[,b],c[,d])


Calls the profile with name a synchronously or asynchronously. If called synchronously, the function waits for the termination of the called profile. If called asynchronously, the calling profile continues the mapping without waiting. In order to be called by this function, a profile has to be active and must have an Input Agent of type Message. Trying to call profiles with other Input Agents, inactive profiles and non-existing profiles will cause the function to return false. If parameter b is set to direct, profile a will not be called via Message and does not need to have an Input Agent of type Message.

The payload being processed by the called profile a is specified in c. These are interpreted with the encoding in d and passed on to the profile as corresponding byte stream (only if called by Message - see above). If parameter b = direct, the data is passed in the encoding of profile a.

In the case of a synchronous call of the profile, the function returns true after the successful termination of the called profile. In the case of an asynchronous call, true is returned immediately. If the call of the profile leads to an error, the error will be logged but the calling profile continues processing. The result of the function is false in that case. If parameter b is direct, a string with the converted data of the called profile is returned if that profile uses class PassBackDataResponse in one of its Response Routes. If any error occurs, the string will be empty.

Description of Parameters


Parameter

Description

a

The name of the profile to be called.

b

(optional) sync for synchronous call or async for asynchronous call. Default: async.

c

Data to be passed on to the called profile.

d

(optional) Encoding for c. Default: 8859_1

Examples


The following profiles are defined.


Profile name

Type of Input Agent

FTP to File

Cron:Ftp

Message to FTP

Message

FTP to File2

Cron:Trigger


Parameter a

Parameter b

Parameter c

Parameter d

Call of profile successful

Result

FTP to File

sync

<Data>


n.a.

false, because the called profile is not of type Message.

FTP to File2

async

<Data>


n.a.

false, because the called profile is not of type Message.

Message to FTP

sync

<Data>


Yes.

true

Message to FTP

sync

<Data>


No.

false

Message to FTP

async

<Data>


Yes.

true

Message to FTP

async

<Data>


No.

true

Variables


Profile Chains

See section Profile Chains.