trigger profile(a,b)


Calls the profile with name a. In order to be called by this function, a profile must be active and have a time-driven Input Agent and schedule type Trigger. Calling profiles with other Input Agents, inactive profiles and non-exiting profiles will cause the function to return false.

The available call modes in b are sync, async and direct. In the synchronous case, the system waits for the end of the profile run, in the asynchronous case it continues with its own processing, without waiting for the termination of the triggered profile.

After the successful call of the profile, the function returns true. If an asynchronous call is performed, true is returned immediately. If the call of the profile is leading 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 mode direct is used, the return value (in UTF-8) is supplied by the called profile (resp. by the first job, if several jobs get created), which has to use the class PassBackDataResponse in a Response Route.

Note: An error email will be sent if the triggered profile is set to sync and is already running! Solution: Either set parameter b to async or allow parallel processing for the triggered profile (deactivate option Profile may only run in one instance).

Description of Parameters


Parameter

Description

a

Name of the profile to be called.

b

(optional) Call mode {sync|async|direct}. Default: async

Examples


Defined are the following profiles.


Profile name

Type of Input Agent

FTP to File

Cron:Ftp

Message to FTP

Message

FTP to File2

Cron:Trigger

FTP to File3

Cron:Trigger


Parameter a

Parameter b

Call of profile successful

Result

FTP to File

sync

n.a.

false, because the called profile is not of subtype Trigger.

Message to FTP

sync

n.a.

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

FTP to File2

async

Yes

true

FTP to File2

sync

No

false

FTP to File2

async

No

true

FTP to File3

direct

Yes

<Return value of called profile>

Variables


Profile Chains

See section Profile Chains.