PSEC - Powershell Enhanced Capability
Version 1.2.1

Workflow Structure & Configuration

Directory Structure

In this page the NAME symbol is used to identify a particular workflow

The environment variable PSEC_V4_FLOWS is a semicolon (;) separated list of directories that contain the flows that PSEC is able to operate with.

The flow NAME or flow c NAME command will select and run the NAME flow the PSEC_V4_FLOWS list of directories.

In the selected PSEC_V4_FLOWS the following files and folders are expected to be found.

  • NAME-cfg.json - The mandatory configuration json file where NAME is the Workflow. Refer to the format below.

  • NAME-dyn.json - A system managed dynamic json file that records such things as the window settings and the current active task. It is automatically created if it does not exist.

  • - An optional markdown formatted help file that describes the overall purpose of the Workflow. It is loaded by the Welcome link. The PSEC - Markdown Usage page describes the format.

  • NAME-doc.rtf - Whenever the is newer than the NAME-doc.rtf file the is converted to the NAME-doc.rtf format using Pandoc Utility. The .rtf format is used to load into the WPF rich-text box when the Welcome link is clicked.

  • NAME-setup.psm1 - An optional Powershell script file that is run when the Workflow is initiated. The file name is defined in the configuration file using the setup keyword and by convention is called NAME-setup.psm1. It can be changed. Refer to Workflow Setup File for the format.

  • tasks - a folder of tasks that the Workflow manages. Whether a particular task is active depends on the configuration file. The organization of each task folder is described at Folder Structure.

Sample NAME-cfg.json Format

  "title": "PSEC Development Workflow",
  "setup": "psec-devp-setup.psm1",
  "tasks":  [
     "title":  "Set Deploy Version Info",
     "name":  "devp-set-version",
     "type":  "script"
     "title":  "Generate Documentation",
     "name":  "gen-docs",
     "type":  "java"

NAME-cfg.json Format

This static json file has the following parameters.

  • title - a short string displayed in Workflow form title bar that describes the purpose of the task.

  • setup - an optional setup file. By convention the name is NAME-setup.psm1. It is stored in the root of the Workflow directory. Refer to Workflow Setup File for the format.

  • tasks - an array of Task definitions as described in the next section. There must be at least one Task definition. Each task is expected to have an directory entry matching the 'name` parameter value in the tasks folder described above (called the Task Folder).

Task Definition

Each Task definition consists of the following keys. One of name or lib must be specified but not both.

  • type - A mandatory field unless the lib key is used. It must be one of java, script, nodejs, net (future) or *manual. Refer to Tasks Types for a detailed explanation of each task type.

  • name - The name of the task and corresponds to the directory name in the tasks folder.

  • lib - The lib keyword is used to reference a task in the in the predefined tasks pointed at by the PSEC_V4_LIB_DIR ennvironment variable. A directory call by the lib name must exist for the run time information to be stored. Refer to Workflow Lib Facility to learn more about setting up Workflow libraries.

  • title - The title of the step that shows in the  1  Menu Panel and in the  2  Status Panel. If the lib parameter is used this will override the value used in the lib definition.

  • dependsOn - A comma separated list of prior Tasks in this Workflow. This Task will only be allowed to run when all the named prior steps have successfully run.

  • whenFail - A comma separated list of Tasks in this Workflow. This Task will only be visible when one or more of the named steps have failed to successfully run.

These parameters are used with and must correspond to the values found in the Task folder.

PSEC - Powershell Enhanced Capability

Copyright © 2018-2021, 2022, Rexcel System Inc.