Define a Write to a File Action for a One-Step

Use the Write to a File Action to create, overwrite, or append contents to a file when the One-Step runs. For example, add a One-Step 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 is finished executing.

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

  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).
    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 Process: The Action keeps the file open during One-Step 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.

    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. Click the Annotation page, and then define the annotation properties:
    Option Description
    Annotation title (shown in tooltip) This information is shown as a tooltip when a User hovers over an action.
    Annotation Describes the purpose and operation of the One-Step. This is an informational field only, it does not show in the UI.
  5. Click Save.
© Copyright 2018 Cherwell Software, LLC. All rights reserved.