The PSEC Workflow Facility facility allows for a Workflow to be managed from a GUI application.
It provides:
A way of organizing, managing and documenting a set of tasks into steps that are not easily automated.
A sequence of tasks is defined
The tasks can run Powershell scripts, Java, NodeJS or .NET (future) programs.
A Manual type is also provided to allow for tasks that require offline procedures to be performed such as downloading a bank transaction file.
When a task is run it succeeds or fails
Task can be marked as dependent on the successful execution of one or more prior tasks.
Tasks can be marked as remediation tasks and are only visible when the related task fails.
After running a task the status of the step execution and summary data is reported (called the Brief).
Tasks are marked as Stale if prior tasks have an execution timestamp later than their execution timestamp.
The system output is conveniently available for viewing.
The parameters sent to the task can be easily viewed before running the task.
The internal task properties (such as class path) can be seen before running the task
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.
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.
When a Workflow Task is run there are two normal outputs plus whatever outputs the program produces as part of its execution.
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.
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.
This panel is used to select the Current Step. The top line is used to provides links:
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.
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.
The Log Panel panel logs the major events such as switching a task or running a task.
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.
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.
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.
Copyright © 2018-2021, 2022, Rexcel System Inc.