Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
18-02-22 06:51 PM
Hello all,
I'm writing a program to extract 15 rows from a CSV, work the items, and then use these to place 15 orders in Centrix. At the moment, only one row is being placed as an order.
My Get Next Item outputs to a collection called Data and a data item called Item ID. However, the collection only stores 1 row and so only the one is passed to the input parameter on the next action page.
How can I store all 15 rows in a collection after they've been marked as completed in the work queue? Or should I go about solving this another way? I've attached images of the two pages after running the program.
I'm writing a program to extract 15 rows from a CSV, work the items, and then use these to place 15 orders in Centrix. At the moment, only one row is being placed as an order.
My Get Next Item outputs to a collection called Data and a data item called Item ID. However, the collection only stores 1 row and so only the one is passed to the input parameter on the next action page.
How can I store all 15 rows in a collection after they've been marked as completed in the work queue? Or should I go about solving this another way? I've attached images of the two pages after running the program.
Answered! Go to Answer.
1 BEST ANSWER
Helpful Answers
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
19-02-22 01:17 AM
Hi Gracie,
The workflow you have shown in the READ-CSV part seems bit off to me as you are reading the CSV file into a collection then looping through each row, adding the data into the work queue which will return you the Item ID for the added item at that instance only and then you are again looping through the Item ID's and then using Get Next Item action which will return you the same Item ID and then marking it as complete.
The issue is with the highlighted part that you can see, the reason being if you directly use Item ID you will always get the current item which is in the queue at that point of time and you are again trying to mark it as complete without doing any processing at all.
The right approach should be to first load all the row items into the work queue one by one which can be done either in a separate process altogether or maybe as a part of the same process before fetching the items from the queue at that time. And you should only mark items as completed if you have completed processing on it end to end.

In my workflow above I am reading the input file first in the first called page, then launching the application in the second page and in the third page I am loading the collection items from the CSV file into the work queue which you can see below:

So here I am basically looping over each row of the collection from CSV file, then checking if any duplicates were there or not (optional step). If no duplicates found, I set the value of my current row to a pre built collection called queue data having a single row and all the columns as mentioned in the CSV file form the beginning only and then I add a tag (which is again optional) and then add the item to the queue. At the end of the execution of this page, I am supposed to get all my items from the CSV file into the work queue with status as Pending.


Now once I have my queue set up, now I use 'Get Next Item' action which will return me the 'Item ID' data item if it exists, if not it will return me null which means I need to stop my process as we don't have any transaction to work on, so I check both the conditions as well as shown below:


If the item is present then, I would get a single row data item for my current item which has been picked up and I can process it accordingly for now post which I will be marking the item as either completed or exception depending on the execution result.


Once item is processed, we reset the error variables so that they dont get carry forwarded in the next transaction if they occurred currently and then we check if the user requested to stop the process from Control room or not, if no we go ahead with using the 'Get Next Item' action again checking if we received any item ID or not. This would ensure that we keep on processing all the items one after another till none is left.


This way you should be trying to iterate through the collection items in a queue, one at a time. Let us know if this helps you out and please mark the answer as the 'Best Answer' if it resolves your query so that others can track the answer easily 🙂
The workflow you have shown in the READ-CSV part seems bit off to me as you are reading the CSV file into a collection then looping through each row, adding the data into the work queue which will return you the Item ID for the added item at that instance only and then you are again looping through the Item ID's and then using Get Next Item action which will return you the same Item ID and then marking it as complete.
The issue is with the highlighted part that you can see, the reason being if you directly use Item ID you will always get the current item which is in the queue at that point of time and you are again trying to mark it as complete without doing any processing at all.
The right approach should be to first load all the row items into the work queue one by one which can be done either in a separate process altogether or maybe as a part of the same process before fetching the items from the queue at that time. And you should only mark items as completed if you have completed processing on it end to end.
In my workflow above I am reading the input file first in the first called page, then launching the application in the second page and in the third page I am loading the collection items from the CSV file into the work queue which you can see below:
So here I am basically looping over each row of the collection from CSV file, then checking if any duplicates were there or not (optional step). If no duplicates found, I set the value of my current row to a pre built collection called queue data having a single row and all the columns as mentioned in the CSV file form the beginning only and then I add a tag (which is again optional) and then add the item to the queue. At the end of the execution of this page, I am supposed to get all my items from the CSV file into the work queue with status as Pending.
Now once I have my queue set up, now I use 'Get Next Item' action which will return me the 'Item ID' data item if it exists, if not it will return me null which means I need to stop my process as we don't have any transaction to work on, so I check both the conditions as well as shown below:
If the item is present then, I would get a single row data item for my current item which has been picked up and I can process it accordingly for now post which I will be marking the item as either completed or exception depending on the execution result.
Once item is processed, we reset the error variables so that they dont get carry forwarded in the next transaction if they occurred currently and then we check if the user requested to stop the process from Control room or not, if no we go ahead with using the 'Get Next Item' action again checking if we received any item ID or not. This would ensure that we keep on processing all the items one after another till none is left.
This way you should be trying to iterate through the collection items in a queue, one at a time. Let us know if this helps you out and please mark the answer as the 'Best Answer' if it resolves your query so that others can track the answer easily 🙂
---------------------------------------------------------------------------------------------------------------------------------------
Hope this helps you out and if so, please mark the current thread as the 'Answer', so others can refer to the same for reference in future.
Regards,
Devneet Mohanty,
SS&C Blueprism Community MVP 2024,
Automation Architect,
Wonderbotz India Pvt. Ltd.
Hope this helps you out and if so, please mark the current thread as the 'Answer', so others can refer to the same for reference in future.
Regards,
Devneet Mohanty,
SS&C Blueprism Community MVP 2024,
Automation Architect,
Wonderbotz India Pvt. Ltd.
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
19-02-22 01:17 AM
Hi Gracie,
The workflow you have shown in the READ-CSV part seems bit off to me as you are reading the CSV file into a collection then looping through each row, adding the data into the work queue which will return you the Item ID for the added item at that instance only and then you are again looping through the Item ID's and then using Get Next Item action which will return you the same Item ID and then marking it as complete.
The issue is with the highlighted part that you can see, the reason being if you directly use Item ID you will always get the current item which is in the queue at that point of time and you are again trying to mark it as complete without doing any processing at all.
The right approach should be to first load all the row items into the work queue one by one which can be done either in a separate process altogether or maybe as a part of the same process before fetching the items from the queue at that time. And you should only mark items as completed if you have completed processing on it end to end.

In my workflow above I am reading the input file first in the first called page, then launching the application in the second page and in the third page I am loading the collection items from the CSV file into the work queue which you can see below:

So here I am basically looping over each row of the collection from CSV file, then checking if any duplicates were there or not (optional step). If no duplicates found, I set the value of my current row to a pre built collection called queue data having a single row and all the columns as mentioned in the CSV file form the beginning only and then I add a tag (which is again optional) and then add the item to the queue. At the end of the execution of this page, I am supposed to get all my items from the CSV file into the work queue with status as Pending.


Now once I have my queue set up, now I use 'Get Next Item' action which will return me the 'Item ID' data item if it exists, if not it will return me null which means I need to stop my process as we don't have any transaction to work on, so I check both the conditions as well as shown below:


If the item is present then, I would get a single row data item for my current item which has been picked up and I can process it accordingly for now post which I will be marking the item as either completed or exception depending on the execution result.


Once item is processed, we reset the error variables so that they dont get carry forwarded in the next transaction if they occurred currently and then we check if the user requested to stop the process from Control room or not, if no we go ahead with using the 'Get Next Item' action again checking if we received any item ID or not. This would ensure that we keep on processing all the items one after another till none is left.


This way you should be trying to iterate through the collection items in a queue, one at a time. Let us know if this helps you out and please mark the answer as the 'Best Answer' if it resolves your query so that others can track the answer easily 🙂
The workflow you have shown in the READ-CSV part seems bit off to me as you are reading the CSV file into a collection then looping through each row, adding the data into the work queue which will return you the Item ID for the added item at that instance only and then you are again looping through the Item ID's and then using Get Next Item action which will return you the same Item ID and then marking it as complete.
The issue is with the highlighted part that you can see, the reason being if you directly use Item ID you will always get the current item which is in the queue at that point of time and you are again trying to mark it as complete without doing any processing at all.
The right approach should be to first load all the row items into the work queue one by one which can be done either in a separate process altogether or maybe as a part of the same process before fetching the items from the queue at that time. And you should only mark items as completed if you have completed processing on it end to end.
In my workflow above I am reading the input file first in the first called page, then launching the application in the second page and in the third page I am loading the collection items from the CSV file into the work queue which you can see below:
So here I am basically looping over each row of the collection from CSV file, then checking if any duplicates were there or not (optional step). If no duplicates found, I set the value of my current row to a pre built collection called queue data having a single row and all the columns as mentioned in the CSV file form the beginning only and then I add a tag (which is again optional) and then add the item to the queue. At the end of the execution of this page, I am supposed to get all my items from the CSV file into the work queue with status as Pending.
Now once I have my queue set up, now I use 'Get Next Item' action which will return me the 'Item ID' data item if it exists, if not it will return me null which means I need to stop my process as we don't have any transaction to work on, so I check both the conditions as well as shown below:
If the item is present then, I would get a single row data item for my current item which has been picked up and I can process it accordingly for now post which I will be marking the item as either completed or exception depending on the execution result.
Once item is processed, we reset the error variables so that they dont get carry forwarded in the next transaction if they occurred currently and then we check if the user requested to stop the process from Control room or not, if no we go ahead with using the 'Get Next Item' action again checking if we received any item ID or not. This would ensure that we keep on processing all the items one after another till none is left.
This way you should be trying to iterate through the collection items in a queue, one at a time. Let us know if this helps you out and please mark the answer as the 'Best Answer' if it resolves your query so that others can track the answer easily 🙂
---------------------------------------------------------------------------------------------------------------------------------------
Hope this helps you out and if so, please mark the current thread as the 'Answer', so others can refer to the same for reference in future.
Regards,
Devneet Mohanty,
SS&C Blueprism Community MVP 2024,
Automation Architect,
Wonderbotz India Pvt. Ltd.
Hope this helps you out and if so, please mark the current thread as the 'Answer', so others can refer to the same for reference in future.
Regards,
Devneet Mohanty,
SS&C Blueprism Community MVP 2024,
Automation Architect,
Wonderbotz India Pvt. Ltd.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
21-02-22 02:23 PM
Hi Devneet,
This was a very thorough and helpful response, thank you so much! I appreciate that you walked me through the work queue.
This was a very thorough and helpful response, thank you so much! I appreciate that you walked me through the work queue.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
21-02-22 02:53 PM
Glad your query got resolved and my solution could help you out Gracie 🙂
---------------------------------------------------------------------------------------------------------------------------------------
Hope this helps you out and if so, please mark the current thread as the 'Answer', so others can refer to the same for reference in future.
Regards,
Devneet Mohanty,
SS&C Blueprism Community MVP 2024,
Automation Architect,
Wonderbotz India Pvt. Ltd.
Hope this helps you out and if so, please mark the current thread as the 'Answer', so others can refer to the same for reference in future.
Regards,
Devneet Mohanty,
SS&C Blueprism Community MVP 2024,
Automation Architect,
Wonderbotz India Pvt. Ltd.
