Introduction
- Users might be interested in specifying jobs and dependencies from Microsoft Excel® spreadsheets.
- In a situation when business staff is in charge of specifying jobs then Excel® is a frequently used tool.
- As a no-code approach this allows to specify jobs and dependencies by users without detailed know-how of JS7 - Workflows.
- The solution explained from the article creates jobs and workflows from Excel® spreadsheets ready for import into JS7.
- The solution makes use of a PowerShell cmdlet for Linux and Windows.
Prerequisites
The following PowerShell modules are used for this purpose:
- ImportExcel PowerShell Module (3rd party) to read Excel® spreadsheets on Linux and Windows.
- Optionally the JS7 PowerShell Module to access the JS7 - REST Web Service API for automated import and deployment.
- If the module is not used then users can manually import resulting workflows using the JOC Cockpit user interface.
Download
The following files are used for the solution:
- Sample Excel® spreadsheet: jobs.xlsx
- PowerShell cmdlet: New-JS7WorkflowFromExcel.ps1
Getting Started
Excel® Job Specification
Download the jobs.xlsx Excel® spreadsheet
- The first worksheet offers a number of jobs and dependencies from the following columns:
NodeID
: A unique identifier for the occurrence of a job. If the same job occurs a number of times then theName
column will hold the same job name, however, a unique value is specified for theNodeID
column.SuccessorID
: Specifies the NodeIDs of jobs that are direct successors of the current job. If more than one job is specified then they will will be executed in parallel. NodeIDs in this column are separated by a space.Instruction
: Makes use of the fixed value Job.Name
: Specifies the job name.Description
: Optionally specifies a descriptive title for the job.Agent, Subagnet Cluster
: Specifies the name of a Standalone Agent that is configured in your JS7 scheduling environment. If an Agent Cluster is used then its name is specified as theAgent
and the respectiveSubagent Cluster
is specified, see JS7 - Agent Cluster.Script
: Specifies the job script that will be executed. Multiline input is allowed.Error Handling
: Specifies one of the following options for JS7 - How to apply error handling:- STOP: If the job fails then the order will be put to the FAILED state and will remain with the job. Failed orders require user intervention to resume, to suspend or to cancel the respective order.
- IGNORE: Any job error is ignored and processing continues.
- RETRY: x
- LEAVE: x
Fail on stderr
: x
#x
Overview
Content Tools