Workflow variables should not include command keywords
jlczuk opened this issue · 8 comments
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
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.
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 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.
I'll look through them anyway just to be sure. It shouldn't take too long.
The USS category of workflows does not have a README.md
- 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.