Running a Script

After creating a script in the Script Editor, you can test your script by running it.

To run your script

  1. Click the Run button on the Script Editor's toolbar. Alternatively, select Build from the main menu and select Run Current Script, or use the keyboard shortcut F5.
  2. In the Script Parameters dialog box, configure the following tabs.
    • In the ClosedGeneral tab, you can configure some basic settings for your script.
      • Under Initiator, type the username of the user you want the script to use to populate the Initiator token.
      • Under Instance ID, click the Generate button to generate a random ID that the script will use to simulate the instance ID that it would have at runtime. This information is available via the WorkflowApi.InstanceId property.
      • Select Show design-time message boxes, to allow message box prompts to be shown during design-time testing. Clear this option to suppress these message boxes.
      • If Script execution timeout is selected, a prompt will allow you to continue or terminate your script if it is still running after the number of seconds specified has elapsed.
    • In the ClosedLaserfiche tab,
      • Use the drop-down menu under Connection profile, to choose the connection profile to use when testing the script. A connection profile is the Laserfiche Server and repository you want Workflow to interact with, plus the user that you want Workflow to interact with the repository as. You must choose a connection profile for your script to run. Click Manage to specify custom connection information for testing the script.
      • Under Starting entry, specify an entry ID or a path to the entry that you want to use to simulate the starting entry when you run the script.
      • In the Bound Entry section, specify an entry ID or a path to the entry you want to use to simulate the bound entry. The bound entry (at runtime) is the entry specified in the activity's Script's Default Entry property box. Select Same as the starting entry to use the entry specified under Starting entry above.
    • In the ClosedTokens tab, you can specify test values for the tokens used by the script. The token and its value will be saved between tests. If you do not enter a value for a token, and the token's value is not set in the code before it is used, you will be prompted to specify a value for the token.
    • Example: If your script uses a token for the date (%Date), you can manually enter a date in this dialog box, such as 8/25/11 to test the token.

      • Under Name, type the name of a token in your script.
      • Under Value, type a sample value for your token to use to test the script.
        • To specify values for a multi-value token, separate values using a semicolon “;”.
        • Example: You have a multi-value token with five values. You type a;b;c;d;e to specify that the first value in the token will be "a", the second value "b", etc.

      • Under Type, select the token's type from the drop-down menu. Token types include string, Boolean, integer, and other common programming types.
      • Optional: Clear the checkbox next to the token to ignore this token during the test run. You will be prompted for its value when the token's value is needed in the script.