PSEC - Powershell Enhanced Capability
Version 1.2.1

Task Execute for: Showcase WhenFail

Properties

Implemented Functions

getTaskDesc Function Meta


    function getTaskDesc([Task]$task) {
      $tfs = $task.tfs;
      [string]$desc        = @"
This illustrates the whenFail capability of the PSEC workflow subsystem.`r`n
Current Values: cycleNo=$($tfs.globMap.demoGlobs.cycleNo) month=$($tfs.globMap.demoGlobs.month)`r`n
"@
      return $desc;
    }

fetchJavaMain Function Meta



    function fetchJavaMain([Object]$task,[hashtable]$parms) {
      return 'org.srp.psec.TestArgsPsec'
    }

fetchJavaClassStr Function Meta



    <#
    Fetch classpath setup during Workflow setup.
    function fetchJavaClassStr([Object]$task,[hashtable]$parms) {
      $tfs = $task.tfs;
      return $($tfs.globMap.demoGlobs.javaLib);
    }

params Function Meta



    # ---------- define task parameters
    <#
    The $htOpts parms has the processed options.  It can be modified or used to do
    other changes to the setup.
      function params {
        param([Object]$task,[hashtable]$htOpts)
        #$tfs = $task.tfs;
        $date = Get-Date
        [string]$dateStr = $date.ToString("yyyyMMdd")

        $htOpts.datestr = $dateStr;
        $htOpts.brief   = "$($task.statlocn)"
        return  $htOpts
      }

options Function Meta



      # ---------- define task options
      function options([Task]$task) {
        $opts = @();

        #$tfs = $task.tfs;
        $opts += @{type='input';  parm='gen';     label='Gen';     place='number of lines to generate'; regex='^[0-9]+$'}
        $opts += @{type='input';  parm='genstr';  label='GenStr';  place='string to generate'}
        ##$opts += @{type='input';  parm='genbrf';  label='GenBrf';  place='number of brief.GenArr lines to generate'; regex='^[0-9]+$'}
        $opts += @{type='check';  parm='bool1';   label='bool1';   place='turns on bool1 option when checked'}
        $opts += @{type='radio';  parm='trap';    label='trap';    valset='*/*no trap,fail/gen FAIL,trap/gen TRAP'}
        $opts += @{type='combo';  parm='combo';   label='combo';   valset='*/*--none--,green,red/show red,blue/set blue'}
        return  ,$opts
      }

runScript Function Meta



      # ---------- the actual script
      function runScript([Task]$task, [hashtable]$parms, [hashtable]$status) {
        $tfs = $task.tfs;
        hlog("Running script $($task.name) $tfs")
      }

PSEC - Powershell Enhanced Capability
1.2.1

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

 

 

 

 

 

X