ExecuteAction() Action

Back to Actions Reference

The ExecuteAction action allows you to execute an action that has already been defined through the Action wizard of the configuration application.  

Note: All actions defined by the Action wizard can be executed through the use of ExecuteAction EXCEPT Data Entry, and Collect Data actions.

The action "Send files to FTP server" can only be used with expression rules of trigger type File. Also, the file uploaded to the FTP is the file that caused the expression rule to run.

You can use this action, for example, to send a notification when the CPU utilization of an asset exceeds 30 percent. The Action would already contain the code needed for sending the notification. The main steps for sending a notification using ExecuteAction are as follows:

  1. Create the new Axeda® Platform action "Send a notification" with a unique name (for example, SendNotificationAction), and fill in the appropriate details for the notification action (for more help with this step, see the Action wizard topic).

  2. Create an Expression Rule that tests the CPU utilization data item value, and executes the created action when the desired threshold is exceeded (for example, 30 percent).

  • For example, suppose the name of your Send a notification action is "SendNotificationAction".   In your Expression Rule, you would use ExecuteAction as follows:

    ExecuteAction("SendNotificationAction")

     

    Format:

    ExecuteAction(String actionName)

    where:

    actionName –  name of the action to execute

     

    Examples:

    Trigger: Alarm

    Then/Else: ExecuteAction("TestAction1")

    Executes the user-defined action "TestAction1".