PSEC - Powershell Enhanced Capability
Version 1.2.1

PSEC - Workflow Facility Overview

Description

The PSEC Workflow Facility facility allows for a Workflow to be managed from a GUI application.

It provides:

  1. A way of organizing, managing and documenting a set of tasks into steps that are not easily automated.

  2. A sequence of tasks is defined

  3. The tasks can run Powershell scripts, Java, NodeJS or .NET (future) programs.

  4. A Manual type is also provided to allow for tasks that require offline procedures to be performed such as downloading a bank transaction file.

  5. When a task is run it succeeds or fails

  6. Task can be marked as dependent on the successful execution of one or more prior tasks.

  7. Tasks can be marked as remediation tasks and are only visible when the related task fails.

  8. After running a task the status of the step execution and summary data is reported (called the Brief).

  9. Tasks are marked as Stale if prior tasks have an execution timestamp later than their execution timestamp.

  10. The system output is conveniently available for viewing.

  11. The parameters sent to the task can be easily viewed before running the task.

  12. The internal task properties (such as class path) can be seen before running the task

  13. The Log Panel is used to record all major activities (such as starting and stopping a Task). It does not persist beyond the WorkFlow session. It can be cleared using Clear Log link.

History

The prime motivator for building PSEC was to build the Workflow facility. In the pre-Windows era there were several popular Menu utilities that performed similar functions under the DOS operating system.

This group of pages describes in detail the Workflow facility.

The author uses it to manage year end and monthly accounting tasks both for his company and other organizations he volunteers at.

Workflow Run Outputs

When a Workflow Task is run there are two normal outputs plus whatever outputs the program produces as part of its execution.

  1. runlog.txt - the system out of the process.
  2. brief.txt - this is a file the system expects to be produced. It is used to present a summary of the Task execution plus act as a signal for Task failure.

Step Conditions

Steps (or Tasks) have an implied execution state. It has either Successfully run, had a failed run or never run (which is the same as never having been run.)

Furthermore, the execution timestamp is recorded. If the timestamp of a subsequent step is earlier than that of a prior step, the subsequent step will be deemed to be Stale. This, depending on the Workflow, can be significant.

If prior steps have not successfully run then dependent steps are deemed to be Not Runnable. Otherwise they are deemed to be Runnable.

The section  1  Menu Panel below explains the icons used to indicate these conditions.

Workflow Form Landmarks

The image below is the PSEC demo example provided with this installation.

The three main panels Menu Panel, Status Panel and Log Panel are shown with a  1 ,  2  and  3  annotation respectively.

 1  Menu Panel

This panel is used to select the Current Step. The top line is used to provides links:

  • Welcome - a Workflow specific "Welcome" page

  • Help - the generic Workflow builtin "Help" system.

Each step is identified by a step status icon, a sequence number and a step name.

The Current Step has a white background, the status of which is displayed in panel  2 , the Status Panel.

The meaning of the step status icons are:

  • Step has run successfully and is up to date.

  • Step has previously run successfully but it is stale.

  • X Step has failed to run and is the current step and is runnable.

  • X Step has failed to run or is dependent on a step that has failed. It is not runnable.

  • ? Step is the current step and is ready to run and its previous run state is unknown.

  • Step had configuration errors and cannot be run. The right panel has details of the error.

 2  Status Panel

This panel shows the status of the currently selected step. The top bar contains links such as:

  • View Logs to allow the previous system output to be examined

  • Run Task Runs the task. It remains disabled until the task completes.

  • Task Help Loads the specific task help. It uses the .md file contained in the task folder to provide the help document. It is automatically converted to a new .rtf representation everytime the .md file is updated.

  • The symbol is a context menu accessed by right clicking on the icon.

The Status Area contains several fields depending on the context.

  • Description - A brief description of the task derived from the supporting task .ps1 code;

  • Status - The task status GOOD or FAIL and the timestamp of the last run.

  • Options - An optional set of field that allows for processing options to be passed to the task execution. These are described in more detail at Task Options.

  • Brief - Every program is expected to create a JSON file called brief.json.txt. This is used to determine the execution status as well as give a brief summary of the programs execution.

 3  Log Panel

The Log Panel panel logs the major events such as switching a task or running a task.

Sample Displays

With a Brief (Successful Execution)

You can observe that Step 2 is marked as completed in the leftmost Menu panel and that the Brief indicates a GOOD execution in the right panel.

You can also observe that dependant Step 3 shows that it needs execution and that Step 4 and Step 5 are marked as being stale in the leftmost Menu panel.

With a Brief (Failed Execution)

You can observe that Step 2 is marked as failing in the leftmost Menu panel and that the Brief indicates a FAIL in the right panel.

You can also observe that dependant Step 3 shows that it needs execution and that Step 4 and Step 5 are marked as being stale in the leftmost Menu panel.

Without a Brief (Trapped Execution)

You can observe that Step 2 is marked as failing in the leftmost Menu panel an there there is no Brief in the right panel.

You can also observe that dependant Step 3 shows that it needs execution and that Step 4 and Step 5 are marked as being stale in the leftmost Menu panel.

PSEC - Powershell Enhanced Capability
1.2.1

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

 

 

 

 

 

X