Edit flow in Workflow Studio
Summarize
Summary of Edit flow in Workflow Studio
This guide explains how to configure and edit batch import flows in Workflow Studio within Automation Center, ensuring correct implementation of pagination methods to import data accurately. It covers four batch import methods—None, Offset-based, Time-based, and Token-based—detailing their setup and handling in flows.
Show less
Batch Import Methods and Configuration
- None Batch Import: Choose this method if you do not require pagination. No additional configuration steps are needed.
- Offset-based Batch Import: Use this method to import data in batches defined by an offset (starting record), total items, and limit (batch size).
- Configure by setting offset, total items, and limit in the SourceHub get offset based pagination chunks action.
- Use the
chunkschild0output to map offset and limit values in your selected action. - If your action lacks built-in offset/limit parameters but supports filtering, either add a preparatory action to generate a query with these values or copy and modify the primary action to accept offset and limit inputs and build the query.
- Time-based Batch Import: Select this method to import data within a specific date range.
- Define start and end dates in SourceHub get date based pagination chunks.
- Map the date range output to your action’s parameters.
- Dates use the format
YYYY:MM:DD:HH:MM:SS, and if your action does not support date ranges natively but allows filters, apply similar approaches as offset-based method: add a preparatory action or copy/modify the primary action to handle dates.
- Token-based Batch Import: Use this method to paginate using a continuation token returned from your action (e.g., nexturl, nexttoken).
- Provide the exact token name matching the action’s output.
- The do-while loop condition is automatically mapped if the token name is correct; otherwise, map manually.
- Create a Flow Variable of type string to store the token’s updated value and set this variable in a logic step after your action to maintain pagination state.
Practical Considerations
- When actions do not natively support pagination parameters (offset, limit, date range), use an additional preparatory action or create a modified copy of the action to generate appropriate queries for filtering data.
- Always ensure token names and date formats match exactly to avoid flow errors.
- After configuring pagination inputs and mapping outputs, validate and test the flow to confirm correct data import behavior.
Edit the flow to confirm that the pagination is implemented correctly. This confirms that the data is imported correctly.
- None
- Offset
- Time based
- Token based
None batch import
Select the none batch import method if you do not want to use the pagination method provided in Automation Center. There is no step required here.
Offset-based batch import
Select the offset-based batch import method (pagination method) if you want to import data using a specific start point (offset) and a batch size (limit).
- Offset: The starting point for importing data.
- Total items: The total number of records that you want to import.
- Limit: The number of records to import in each batch.
For example: If you set the offset to 20, total items to 200, and limit to 10, then the system will import data in batches of 10 records starting from record 20 and continuing until all 200 records are imported.
Steps to configure
- In the SourceHub get offset based pagination chunks action, specify values for the offset, total items, and limit fields, and then select Done.
After the values are defined, the chunks_child0 field will be available in the right-hand panel (under For Each).
For the action you selected during the Select Action step, map the limit from SourceHub get offset based pagination chunks action and offset values using the chunks_child0 field output generated by the SourceHub get offset based pagination chunks action.
Handling actions that don’t support limit and offset
Map the limit and offset values in your action using the output returned by the SourceHub get offset based pagination chunks action.
If your selected action doesn’t have predefined parameters for offset-based pagination but includes a filter that can accommodate these parameters, you can do one of the following:
- Option 1: Add an action just before your selected action to handle the limit and offset. This action should generate a query that the primary action can use to fetch data.
- Option 2: Copy your primary action, modify it to include inputs for limit and offset, and process these inputs to create a query. Pass this query to the filter of your original action.
Note:If you choose Option 2, ensure that you create a copy of the original action first. After copying, reselect the copied action in the Select Action step and regenerate the flow. For information about selecting an action, see Select an action.- Select Done and Test.
- Follow steps 3 onwards in Configure batch import for data.
Time-based batch import
Select the time-based batch import method if you want to import data for a specific date range.
Steps to configure
- In the SourceHub get date based pagination chunks action, specify the start date and end date, then click Done.
After you values are defined, the range field in your right panel is available.
- For the action you selected during the Select Action step, map the start date and end date values using the range field output generated by the SourceHub get date
based pagination chunks action.
Date format
The Connection Manager uses and returns dates in the format: YYYY:MM:DD:HH:MM:SS. If your Action supports date ranges, the format is automatically applied.
Handling actions that don’t support date ranges
If your action doesn’t automatically support date ranges but includes a filter for custom parameters, you can follow one of these approaches.- Option 1: Add an action before your selected action to handle the start date and end date. This action should generate a query that your primary action can use to fetch data.
- Option 2: Copy your primary action and modify it to include inputs for start date and end date. Process these inputs within the action to create a query and pass it to the filter of
your original action.Note:If you choose Option 2, ensure that you create a copy of the original action first. After copying, reselect the copied action in the Select Action step and regenerate the flow. For information about selecting an action, see Select an action.
- Select Done and Test.
- Follow steps 3 onwards in Configure batch import for data.
Token-based batch import
Select the token-based batch import method if you want to import data using a continuation token.
When you select the token-based batch import method on the Configure batch import page, you must provide a name for the token. This token represents the continuation value returned by your action (such as, next_url, next_token, or next). Ensure that the token name matches exactly as it is returned from the action, including spelling and capitalization.
Steps to configure
- If the provided token name is correct, the do-while condition will automatically map it. If it remains blank, manually drag the continuation token from your action’s output into the condition field of the do-while logic.
- Add a Flow Variable of type string to store the updated value of the token.
- Save your changes, and click Done.
- Insert a Set Flow Variable logic step after your selected action. In this step, set the value of the newly created flow variable to the continuation token returned by your action. Ensure this token
matches the one mapped to the do-while condition.
- Select Done and Test.
- Follow steps 3 onwards in Configure batch import for data.