Define a Write to a File Action

Use the Write to a File Action to create, overwrite, or append contents to a file when the One-Step™ Action runs. For example, add a One-Step Action to a threshold-based Automation Process to keep a log file of the current date and time whenever the number of open VIP Incidents exceeds a certain threshold. Use the Temporary Filename Token to create a temporary file that goes away after a One-Step Action is finished executing.

To define a Write to a File Action for a One-Step Action:

  1. Open the One-Step Editor.
  2. Add a Write to a File Action to the Designer Board.
  3. Define properties for the Write to a File Action:
    Option Description
    Name Provide a display name for the Action (this is how the Action is identified within the One-Step Action).
    Filename Provide the path and name of the file that you want to create (using text and/or Tokens), or click the Ellipses button Ellipses Button to select an existing file to overwrite or append.
    Contents Provide text.
    Selector Click the selector button to insert Tokens (example: Fields, System Functions, Prompts, Expressions, Stored Values, Metrics, and Counters) directly into the text.
    Format Select the format of the file to create, overwrite, or append (plain text, Rich Text, or HTML).
    Make sure file is written Select when the file should be written:
    • By End of One-Step Action Process: The Action keeps the file open during One-Step Action execution and writes to it during each step (the file is not completely written until all of the post-steps are completed).
    • Before Post-Steps Are Run: The Action writes to the file before any of the post-steps are executed.
    • Before Next Sub-Step: The Action writes to the file after each Action in the One-Step Action.

    The Before Next Post-Steps Are Run or Before Next Sub-Step options cannot be used with the Rich Text Format (RTF). RTF documents have close tags that do not allow files to be appended after they are created.

    Overwrite existing file Select this check box to overwrite an existing file. Clear the check box to append the contents to the file.
  4. Define Annotation properties.
  5. Click Save.
© Copyright 2018 Cherwell Software, LLC. All rights reserved.