Implement the Generate Message Script

Any script in a process must use JavaScript to remove any validation markers before process deployment.

Process objects, such as data fields or user tasks, have a Label and a Name. A Label can contain spaces or non-alphanumeric characters. TIBCO Business Studio automatically generates the Name from the Label, and removes spaces and non-alphanumeric characters.

A business analyst can use a Label to name a process object. However, a script with a definition that uses JavaScript must reference an object by its Name, and not its Label.

Perform the following procedure to replace the business analyst’s free-text description with the appropriate JavaScript code.

Procedure

  1. From the WelcomeUsers-Process pane, select Generate Message.
  2. From Properties > General, click Script Defined As, and select JavaScript.
  3. In Describe Task Script, replace the free text description with the following JavaScript:
    Message = "Please call " + UserName + " at " + PhoneNumber + "."
    Note that Generate Message no longer has a validation marker.
  4. Click away from the field to save.
  5. Press CTRL + S to save the changes.