I'm hoping that Martin or some of the good folks on this forum can help me out. I now have over 100 flows and have organized them into 10 or 12 different AutoMagic groups, so now I'm looking to create some documentation to help me track interactions, triggers, schedules, etc. The plan is to periodically pull a list of flows and their associated groups directly from AutoMagic.
I started building a script that generates a list of the AM group names, but I'm having problems trying to populate that list with the flow names associated with each group. I can create the group name list using am_groups=newList(getFlowGroupNames()), but I get stuck on generating the list of flows for each group. I've been trying to use getFlowNamesByGroup(am_groups) in a "for" loop to process each group name, but no matter how I write the loop it fails. I assume this should be pretty easy but I have never had the need for loops before now.
Does anyone know how to do this or is there a better way to capture this information other than using lists? If I can get this going it will give me a way to create my documentation and hopefully teach me about loops as well.
Thanks in advance.
How to create a list of flows and groups
Moderator: Martin
Re: How to create a list of flows and groups
There should be multiple ways to do this.
groups=GetFlowGroupNames();
flows=newMap();
for (g in groups) addMapEntry(flows, g, getFlowNamesByGroup(g))
You now have a map called 'flows' that has the key with the group name and all the flows names as values.
groups=GetFlowGroupNames();
flows=newMap();
for (g in groups) addMapEntry(flows, g, getFlowNamesByGroup(g))
You now have a map called 'flows' that has the key with the group name and all the flows names as values.
-
- Posts: 82
- Joined: 13 Jan 2014 21:39
Re: How to create a list of flows and groups
Perfect - thanks very much, bogdyro.