zorow icon indicating copy to clipboard operation
zorow copied to clipboard

Workflow variables should not include command keywords

Open jlczuk opened this issue 5 years ago • 8 comments

@ehrocha

I was inspecting this workflow: https://github.com/openmainframeproject/zorow/blob/master/IBM-GTS-Workflows/PA-zOSMF-Workflows-ZFS/IBM-MF-AUTO-ZFS-DEFINE.xml

I noticed that workflow variables are prompting users to enter utility keywords along with the actual variable content needed. For example:

<variable name="zfs-sms-dc" scope="instance" visibility="public"> <label>Data Class</label> <abstract>If coded, the syntax for this parameter is DATACLAS(DC_NAME)</abstract> <description>If coded, the syntax for this parameter is DATACLAS(DC_NAME)</description> <category>SMS</category> <string valueMustBeChoice="false" multiLine="false">

This variable input forces the user to have to know the utility keyword DATACLAS in order to enter the actual information the workflow needs, which is the NAME of the data class to use.

Why wouldn't you just prompt for the VALUE for DATACLAS and substitute that into the workflow like this?

#if($zfs-sms-dc != "") DATACLAS($zfs-sms-dc) - #end

I suspect this is being done in nearly all the GTS workflows.

jlczuk avatar Nov 11 '19 22:11 jlczuk

@jlczuk Thanks for noticing, yes, I started to do use velocity for our workflows when I realized conditional code was possible. I will get it fixed and a new version uploaded.

ehrocha avatar Nov 12 '19 12:11 ehrocha

Great! Thanks Eduardo. Would you like me to identify the other workflow definitions that are doing this same thing? So far, I only looked at the ZFS Define workflow definition.

jlczuk avatar Nov 12 '19 13:11 jlczuk

@jlczuk I would be thankful, I do think however, this is the only one and honestly , looking at it now I don't quite understand why I opted to do it like this.

ehrocha avatar Nov 12 '19 13:11 ehrocha

I'll look through them anyway just to be sure. It shouldn't take too long.

jlczuk avatar Nov 12 '19 13:11 jlczuk

The USS category of workflows does not have a README.md

jlczuk avatar Nov 12 '19 13:11 jlczuk

  • IBM-MF-AUTO-ZFS-DEFINE-AMS.xml has the same problem reported in this issue.
  • IBM-MF-AUTO-ZFS-DELETE.xml has a hard-coded IP address with hard-coded userid and encoded password. These would all be best converted to input variables with password being the workflow PASSWORD type of variable.
  • IBM-MF-AUTO-ZFS-PROV-APPL-MOUNTPOINT.xml has the same problem reported in this issue.

That's what I found.

jlczuk avatar Nov 12 '19 14:11 jlczuk

@jlczuk Thank you... I will fix them all.

ehrocha avatar Nov 12 '19 16:11 ehrocha

@erocha Feel free to close this if you're done.

jlczuk avatar Feb 06 '20 03:02 jlczuk