Hi Pete,
There are a number of options, you can create a custom command and use the "Add-WFAReturnParameter" and "Get-WFAReturnParameter" cmdlets to pass variables between commands in your workflow. Alternately you could add a "search" command step after the "Map LUN" then derive the LUN ID from the search command variable. If you don't set the LUN ID to map the LUN to in the "Map LUN" command then the reservation will set 0 as the default for the "lun_map_value" field in the "lunmap" table in the "cm_storage database.
IF('${LunId}' IS NOT NULL,
'${LunId}',
0) -- lun_map_value
Try adding a "search" command after the "Map LUN" command. EG if you called the variable name for the search command as "mapped_lun" then in the "Create VMware VMFS datastore" command in the > 'Other Parameters' tab > 'LogicalUnitNumber' property you'd set the value to "mapped_lun.lun_map_value"
Alternately you could set the $LunID paramater in the "Map LUN" command by using an MVEL function i posted here: http://community.netapp.com/t5/OnCommand-Storage-Management-Software-Discussions/Return-LunId-from-Map-LUN-in-WFA/td-p/138732
Hope that helps
/Matt
If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.