« Back to Product

Documentation

IPS_RunActionWait

 string IPS_RunActionWait (string $ActionID, array $ActionParameters) 

Parameters

ActionID

GUID of the executed action

ActionParameters

List of Parameters for the executed action

Returns

Error message of the execution

Description

This function causes the execution of the Action with the GUID ActionID and the parameters ActionParameters. The function waits for the end of the execution to return a possible error message. If the execution was without error, it returns an empty string.

The action parameters need to include the following entries:

Parameter Description
TARGET ID of the target object of the action (-1 for general actions)
ENVIRONMENT The execution environment of the action, see Environments
PARENT ID of the object that executes the action, e.g. the PHP script or the Flow Script

Example

// Execute the script with the ID 12345
$error = IPS_RunActionWait("{7938A5A2-0981-5FE0-BE6C-8AA610D654EB}", ["TARGET" => 12345, "ENVIRONMENT" => "Default", "PARENT" => $_IPS['SELF']]);
if ($error === "") {
  echo "Action was executed successfully";
}
else {
  echo "There was an error during execution: " . $error;
}
Any questions?