The IBM z/OS Management Facility Version 2 Release 1 adds a new core feature called Workflows. Today I’ll introduce workflows and provide some pointers to some exciting workflow implementations.
z/OSMF V2R1 Workflows
My way of looking at a workflow is to define it as a series of one or more repeatable steps which accomplishes a task. Often system programmers refer to this as a desk procedure. For example, every installation has a series of steps to perform when adding a new TSO user. z/OSMF Workflows can be used to consolidate existing desk procedures and make them accessible to a broader community.
The simplest workflow can just consist of a series of steps with descriptions of the task and step-by-step instructions on how to accomplish the task. Similar to recipe you might use when preparing a meal. However, there are additional capabilities offered with z/OSMF Workflows. For example, you can create steps which prompt the user for input and you can use this input to fill out fields in a JCL template and finally, submit that JCL through z/OSMF for execution on the host system. The output can be browsed after submit. So, there are some dynamic capabilities offered through workflows.
Let’s take a look at how we access a workflow. After logging into a z/OSMF V2R1 session, the Workflows feature is display as a link on the left navigation panel.
Selecting Workflows launches the Workflows task, which will open up a new Workflows tab. Initially the Workflow tab will be empty, but here’s an example of a Workflows task which is populated with some workflows.
To create an instance of a workflow use the Actions drop down menu and select Create Workflow. Now I use the word instance because when you create a workflow you are actually creating a copy of the master workflow (an XML document) for your use.
Your installation has to decide where to store workflows. They can be stored in an MVS dataset set or in a UNIX System services filesystem. Several example workflows are shipped with z/OSMS V2R1. They can be found in the installation path for z/OSMF , typically /usr/lpp/zosmf/V2R1/workflow/. The samples provide workflows for configuring various z/OSMF plug-ins. Additionally, in the /usr/lpp/zosmf/V2R1/workflow/plugins/izuca/ you’ll find various workflows to configure networking based technologies (which you can can do through the Configuration Assistant task.)
Once you decide to create a new workflow instance you must tell z/OSMF where the workflow is stored (z/OS dataset or UNIX System Services path) and the name of the master workflow xml file. In this example I’ll load a workflow that we created which list the steps to add a new TSO user. The location of the workflow is specified in the Create Workflow pop up panel.
The second panel as part of the workflow creation prompts you for some additional information. Here you can assign the steps of the workflow to a specific user id. For now, I’ll just leave myself as the owner so we can show how you can have someone else can take ownership of one or more steps in a workflow.
The workflow will now be opened displaying the all the steps for the workflow.
So now we have an instance of a workflow created. But unless you are planning to do the work yourself, you need to assign the work to someone or notify a group of z/OSMF users that work is available to be done. You can broadcast that eligible steps are available for a workflow by selecting one or more steps and adding an assignee. In the following example we select all steps and add an assignee.
The add assignees panel is displayed. From here you can assign the selected steps to an individual user or to a group of users. In this case I’ll assign the steps to the z/OSMF User role (all user id defined to the z/OSMF User role will be notified that work is available). Notice the check box at the bottom, which states ‘Send z/OSMF notifications to assignees’. Leaving this box checked will cause z/OSMF to send a notification to the users who have been assigned the workflow steps. I’ll show this notification in a moment.
Since I am part of the z/OSMF User group/role, I receive a notification. There is a new link with z/OSMF V2R1 called Notifications, accessible from the left navigation panel. When a user is assigned a workflow step(s), a notification is sent to the user, as shown below.
Clicking on the Notifications task will launch the Notifications task which presents you with the notification.
From the notifications task you can select the notification of interest and from the actions menu select go to task. This will take you to the assigned workflow with eligible work.
Now you’re at the workflow with eligible work for you to do. From here you can accept one or more steps (take ownership of the steps). Select a step and from the action menu select the accept action. In this example, I’ll take ownership of all steps.
Once you assign the steps to yourself, the steps are marked as ready. In this example we have steps with dependencies, each step has the previous step as a dependency, so only the first step is marked ready.
When you’re ready to perform the step, select the step and select the perform action from the actions menu.
This will open the step in the workflow. Each step will consist of several panels (depending on how the workflow XML file was coded). Typically it will consist of Informational panels (such as General, Details, Notes) and may have a perform step which can prompt the user for variable input which will be used to submit a job to the system. And finally a status panel will show the job results.
Here’s an example of the first perform panel where the step owner is prompted to enter some variable to define the TSO user.
In this example, the step owner inputs the variables required (there may be more than one screen for input variables) then is presented with a Review Instructions panel (not shown). Since this example will submit a job to the system, the user is also presented with a Create Job Reference panel where they can enter a JOB card DD for the job to be submitted (not shown) and finally are given a chance to review the JCL that will be submitted to the system as shown below. This JCL was created by merging the input variables that the user entered with a JCL template. This template file is created as part of the original master workflow creation. From here you can optionally edit the JCL to be submitted.
Once you review the JCL and click next, you can either submit or save the JCL (or do both). In this case we just submit the JCL by selecting the Submit JCL check box and clicking on the submit button.
Once you submit the job, you’re taken to the STATUS panel which will show the status of the JOB; you may have to click on the REFRESH button to cause z/OSMF to fetch the output. As you can see the various JOB output datasets are available as tabs.
Once you are satisfied that the JOB has completed according to the requirements of the step you can close the status panel which will bring you back to the workflow panel for the selected workflow. Now we see that STEP 1 is completed and STEP 2 is ready. I’ll skip the other steps but once all steps are completed the workflow will be marked complete.
So there you have a quick walkthrough of the Workflows task of z/OSMF V2R1. You can create simple desk procedures consisting of just instructions that a user will perform to accomplish a task, or have the user be able to perform some actions through submission of JCL.
For more information on the Workflows task see the IBM Redbooks Publication, IBM z/OS Management Facility V2R1, SG24-7851-01.
Now you definitely will want to check out the new z/OSMF z/OS V2R1 Migration Workflow which provides a workflow encapsulating the contents of the z/OS V2R1 Migration manual.
And check out the video for it too.