Active IQ Unified Manager Discussions

Pulling variable from a row repeat

dblackwe
8,133 Views

It has been a while since I have worked with WFA and 4.0 is much changed.

 

I am running a row repeat based on nodes in a cluster.  I have the finder working just fine.  For each row I want to be able to use the name of the node that is returned.  However all I can seem to get to return is either A) the index or B) the group count.

 

I thought I would be able to reference the resource, but that no longer seems to be the case.  

 

I am attaching screenshots of the finder I am using, and the row loop.

 

Any and all help would be greatly appreciated.

 

This is WFA on linux if that matters.

1 ACCEPTED SOLUTION

dkorns
8,081 Views

You just need to specify NodeMember1.name

 

NodeMember1 is an object and after the dot can be any of it's attributes.

View solution in original post

8 REPLIES 8

geringer
8,110 Views

How are you referencing the Resource Variable in the commands on the row?

 

I think your row repeat is fine and shoule return all of the nodes in the cluster.

 

Mike

dblackwe
8,108 Views

I was trying to use NodeMember1 but that gives me an error.  If I use Index1 I get 1,2 which I expect since its a two node cluster. using group1 gets me 2,2 either because there are two nodes in the group, or because there are two elements (name, cluster-ip-address) with the reference, not sure which.  I want to return the node name to be used.

geringer
8,106 Views

OK, I tlooks like the Paramter Mapping is not right on your command.  Make sure that the Parameter that you think is a node object is correctly mapped.

 

Mapping.PNG

dblackwe
8,095 Views

Ok, the command actually had no mapping there.  I set it to cm_storage.node and name and saved it as a modified version.  Trying that version though still doesn't allow NodeMember1 to be used as a return.  This used to be easy and very straight forward in the 1.x,2.x days.  Not sure why it was made harder.

dkorns
8,093 Views

I noticed you're using the phrase "allow NodeMember1 to be used as a return". Does you mean 'as a WFA Workflow Return Parameter"? If so, the issue is likely that objects and variables that exist during a row repetition are not really available to MVEL as you might first think. Is setting up 'Return Parameter' for the nodes what you're trying to solve? 

 

 

dblackwe
8,083 Views

I'm probably using the wrong terminology.

 

I am trying to make a workflow that will run no matter how many nodes are in the cluster, and will perform a series of actions on each node.  I thought I could get the node name for the node fields for the various command steps from the loop repeat.  

 

I am attaching another screen shot where I want to be able to use the returned node name value.

 

Normally I would just make it a $node and set a query to pull the information, but as I have to loop I don't think that will work.

dkorns
8,082 Views

You just need to specify NodeMember1.name

 

NodeMember1 is an object and after the dot can be any of it's attributes.

dblackwe
8,066 Views

Oh man, thank you.  How do I give you ALL the kudos?

Public