ComponentTag example (ExportTagProgram)

The Examples folder in the exportTags palette contains a Program component named “ExportTagProgram”, that is already tagged with a ComponentTag. Figure 46 shows this component copied into a subordinate (JACE) station, and its property sheet, including its configured ComponentTag.

NoteA user is required to have "super user" permissions in order to add/edit Program objects or Provisioning Robots in a station. If a subordinate station includes a Component Tag on a Program object, both the service account (for station to station communication) and the user invoking the Join require "super user" permissions. However, such permissions are not required to invoke a Join on a station that includes such pre-configured export tags.

Figure 46. Example ExportTagProgram copied into a station, with configured ComponentTag

Example ExportTagProgram copied into a station, with configured ComponentTag

The purpose of this Program is to provide a “template” that automatically executes upon completion of an export tag Join, such that “custom operations” can be automated. This allows a user experienced in writing Niagara (Java) programs to insert the necessary code to make links, or do whatever else may be needed. In this way, it can be considered an extension of the exportTags API.

Note that the Program has a “Remove After Completion” property, as shown in Figure 46. By default, this property is true, meaning that the Program is exported to the Supervisor, executes following the Join, and then is removed from the station database. To retain the Program component on the Supervisor, set this property to false.

Figure 47 shows the ExportTagProgram opened in the Program Editor, as copied from the palette.

Figure 47.  ExportTagProgram “template” code (unmodified)

ExportTagProgram “template” code (unmodified)

In the code shown above, the line

 public BString onPostJoin()

Is the dynamic action (method) that gets called after the Join process is all finished. It also returns a string that within the ending code, gets included in the Job Log.

Immediately below that line is the “template” area, in which you can add additional code. Currently, the placeholder line:

 System.out.println("Export Tag Join Completed!");

Simply prints that line to the Supervisor’s standard station output, where it can be seen in the platform’s Application Director view.