Let me provide some details on what command parameter mapping means and guidelines on its usage.
This is something we refer to when designing certified commands released in WFA.
Note: There will be exceptions to these guidelines depending on the design of the command.
Hope this helps.
1.1.1 Command Parameter Mapping Guidelines
A command has a number of parameters and they are mapped in “Parameters Mapping” tab when you edit a command. This mapping has to be done based on the following guidelines.
Command parameters are mapped to specific attributes and references of dictionary entries.
Command parameter mapping defines the way the parameters to execute a command (CommandDetails - rectangular boxes you see in the designer) will be defined in the workflow.
All mapped command parameters appear in different tabs during workflow design for that command’s details and the tab will be named according to “ObjectName” in the command mapping definition.
All unmapped parameters appear in the “Other parameters” tab of the Command Details in the simplified designer.
The rules for mappings of command parameters to dictionary entries and its attributes have been derived based on:
Commands can generally be categorized into different categories from the perspective of the functionality it supports. The mapping of command parameters depends on the type of functionality the command supports.
Depending on the way the command will be represented in the workflow designer.
Example Command parameter mapping and the way it is displayed in workflow designer.
Rules for mapping
Create a new object
General flow of usage:
Find parent objects, define new object
Find if object exists, if not create it.
Relevant parameters of object being created are mapped to that dictionary entry.
Parent object is also mapped through references of the dictionary entry being created
In general, when adding a new parameter to a “Create” type of command, ensure that the relevant attribute is also present in the dictionary entry, if it does not fall in the Exception scenario described below.
Examples for creation commands
Example: “Create Volume” command
Example: “Create LUN” command
Exception 1: Some objects that are created do not have a corresponding dictionary entry, and in that scenario, only the parent object is mapped to the relevant parent dictionary entry.
Example:”Create VIF” command - Only Array can be mapped to Array dictionary entry.
Exception 2: Parameters applicable purely for creation are unmapped. They appear in Other Parameters tab in Command Details during workflow design.
Example: “ExecutionTimeout” parameter in “Create/Resize Aggregate” command is an unmapped parameter.
Update an object
General flow of usage: Find object and update attributes
Object being updated is mapped to dictionary entry.
Basic attributes being updated for the object must be unmapped parameters.
If the parameter being updated is an association with another object type (dictionary entry), then it should be mapped to a new instance of that dictionary entry.
Example: “Set Volume State” command: Volume is mapped, but the new State will be unmapped.
Example: “Resize Volume” command: Volume is mapped, but size parameters will be unmapped.
Example: "Modify Volume" (Clustered Data ONTAP) command: Volume is mapped, Export Policy is mapped to a new object name "Export_Policy" and not mapped to "volume.export_policy.name"
General flow of usage: Find object, Delete it
Object being deleted is mapped to dictionary entry.
Example: “Remove Volume” command: Volume to be deleted is mapped to relevant attributes and references of Volume dictionary entry.
Commands dealing with optional parent and child objects.
Do not map any mandatory parameter of a command as a reference from an optional parameter of the command. This is especially true, if a command deals with optional child objects of a specific parent object. Then the child and parent object should be mapped explicitly.
Example: “Stop Deduplication Jobs” command: The command stops a running deduplication job on a specific volume (if specified along with Array) or on all volumes of the given Array. Array parameter should be mapped directly to Array dictionary entry and not to Volume.Array because Volume is an optional parameter in this command.
If a parent and child relationship exists between dictionary entries at the logical level, but not between the actual instances in a specific command, then those objects should be separately mapped.
Example: “Move Volume” Command: Volume is being moved from its current parent aggregate to a new destination aggregate. So, Volume parameters are mapped to a Volume dictionary entry, and the destination aggregate parameters are mapped separately to the Aggregate dictionary entry (and not as volume.aggregate.name)
Updating/Add/Removing associations between objects
Map both association objects to relevant dictionary entries.
Example: “Add Volume to Vfiler” command: Volume and Vfiler parameters are mapped to relevant attributes of Volume and Vfiler dictionary entries.
Example: “Add Volume to Dataset” command: Volume and Dataset parameters are mapped to relevant attributes of Volume and Dataset dictionary entries.