Help with Batch macro
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I'm trying to download all our workflows from the server via the Server API, I need to use a batch macro as there are loads of workflows and the authentication token is only valid for 1 hour. So my idea is to batch workflow ID's up into groups of say 10 and pass these into a batch macro. So my workflow initially queries the API, gets the list of workflows, then using the Tile tool and CrossTab tool, groups then up into batches - 2 fields, the batch number and a comma separated concatenated list of workflow ID's. Like this:
Tile_Num ConcatIDs
4 5e54ceb0137a1410141a7bad,5e54cfc1137a1410141a7ccd,5e621243137a1410141aa5d6,5e7a375c137a1410c096978e
5 5e81f4e8137a142988afc64e,5ee32009137a141040426f2d,5ee34bf7137a141040427195,5ef310a4137a1410dc5ee0e1
2 5d9b2823137a140d1c039562,5dc3dad6137a141ba4a4fd87,5ddd5b1e137a14036c84942d,5de6276d137a14036c84a350
1 5c766cbc04bca70de87f17cf,5c882bd004bca70de87f2d9a,5d4d804e137a140fe867798a,5d5d6a56137a140fe867ac86
3 5e3d9073137a1413f8c90b0c,5e42caf2137a1413f8c91255,5e4fc0af137a1410141a7234,5e5408ba137a1410141a784a
My Macro is where Im getting confused! I take the ConcatID's field and use the Transpose tool to get back 5 individual rows of data, pass those 5 rows of data to the API Tool - I have a separate API tool that will run once and get the authentication token for that batch and it passes the token to the API call where I download the workflow.
In testing this works fine, I can replace the macro input with a text input tool, pass in concatenated ID's and it downloads them as it should. My issue is the control parameter - what do I do with it? I dont want to change anything with the control parameter but I need one - so I created a calculated field called Iteration Number and used the control input to modify the value.
When I wire everything up, it seems to download but then gives this error, which is not helpful!
Solved! Go to Solution.
- Labels:
- Macros
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@craigja I think this is the type of batch macro you'll be looking for: https://www.youtube.com/watch?v=NNH_K5U5r78
All batch macros function the same. The batch macro in the video has two anchors, based off your explanation above, I guess that's what's going to be needed.
If the video isn't enough, I've attached a dummy workflow of me batching some data based off a column. I only glue the iteration number onto each batch, you could take the idea and run with it hopefully.
 
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
The error turned out to be caused by me using the AMP engine in the Macro
