<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Hi Dave, 
 
Many thanks for… in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/Multiple-instances-of-Excel-opened-after-loading-the-queue/m-p/71706#M24311</link>
    <description>Hi Dave,&amp;nbsp;
&amp;nbsp;
Many thanks for your reply. Please see attached for a few screenshots. The ""Open Workbook"" action is not in a loop, no, and is from the normal Blue Prism MS Excel VBO. The issue seems to be linked to the queue somehow - for example I noticed that whenever the process failed after opening Excel 19 times, it marked the queue item as an exception - however it also marked all 19 queue items as an exception, even though it only retrieved one item from the queue, and that item was locked for working (please see the screenshots).&amp;nbsp;
Screenshots:
#1 This is an image of immediately after the items were added to the queue, using the ""Add to Queue"" action. Then the bot used the ""Get Next Item"" to retrieve the next item from the queue and mark it as ""Locked"" with a padlock.&amp;nbsp;
# 2 After using the ""Get Next Item"" the output was put into two data items (the Item ID, and a collection with all the data for that item - note it has only one row for that item)
#3 The process flow where the error occurs.&amp;nbsp;
#4 The inputs for the ""Open Workbook"" action. The file path is just a normal shared drive location, and works fine in other processes.
#5 The code stage in the Object Studio for the ""Open Workbook"" action.
&amp;nbsp;
Many thanks in advance for any help,
Kind regards,&amp;nbsp;
Ben
&amp;nbsp;</description>
    <pubDate>Sun, 20 Jan 2019 01:10:00 GMT</pubDate>
    <dc:creator>BenAnderson</dc:creator>
    <dc:date>2019-01-20T01:10:00Z</dc:date>
    <item>
      <title>Multiple instances of Excel opened after loading the queue</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Multiple-instances-of-Excel-opened-after-loading-the-queue/m-p/71704#M24309</link>
      <description>Hi,&amp;nbsp;

I have a process that adds 19 items to a queue to be worked. After adding the items to the queue, the process "Gets Next Item" from the queue and the data for that item is put into a collection. This collection has one row with all of the relevant bits of data for that particular queue item in different columns.&amp;nbsp;

The next stage of the process is to open an excel workbook. However, when it goes to open the workbook, it opens 19 instances of the same workbook, one straight after the other.&amp;nbsp;

This is presumably linked to the number of items in the queue in some way. Though, surely it should only open one workbook for that particular queue item (the file path to the workbook is in the collection containing the one row of queue data above).

What could the reason be for this error?

Any help would be greatly appreciated.

&amp;nbsp;

Thank you,&amp;nbsp;

Kind regards,&amp;nbsp;

&amp;nbsp;

Ben</description>
      <pubDate>Fri, 18 Jan 2019 14:13:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Multiple-instances-of-Excel-opened-after-loading-the-queue/m-p/71704#M24309</guid>
      <dc:creator>BenAnderson</dc:creator>
      <dc:date>2019-01-18T14:13:00Z</dc:date>
    </item>
    <item>
      <title>Hi Ben,
Can you show some…</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Multiple-instances-of-Excel-opened-after-loading-the-queue/m-p/71705#M24310</link>
      <description>Hi Ben,
Can you show some screenshots of your process flow or something? We'll be straight up guessing to give any suggestions.
But, while I'm at it... did you verify that the logic that opens Excel is not inside of a loop that happens 19 times? The way you describe it, it sounds like it is supposed to open 19 workbooks if you have it getting an item from the queue, opening the workbook, and then moving to the next item.
Again, it's hard to give suggestions without seeing it, but I'm guessing you may just need a couple extra stages that first attempt to look for an open/existing workbook to use and only open the workbook in a new instance if it is not already open.
Respectfully,
Dave</description>
      <pubDate>Fri, 18 Jan 2019 20:10:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Multiple-instances-of-Excel-opened-after-loading-the-queue/m-p/71705#M24310</guid>
      <dc:creator>david.l.morris</dc:creator>
      <dc:date>2019-01-18T20:10:00Z</dc:date>
    </item>
    <item>
      <title>Hi Dave, 
 
Many thanks for…</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Multiple-instances-of-Excel-opened-after-loading-the-queue/m-p/71706#M24311</link>
      <description>Hi Dave,&amp;nbsp;
&amp;nbsp;
Many thanks for your reply. Please see attached for a few screenshots. The ""Open Workbook"" action is not in a loop, no, and is from the normal Blue Prism MS Excel VBO. The issue seems to be linked to the queue somehow - for example I noticed that whenever the process failed after opening Excel 19 times, it marked the queue item as an exception - however it also marked all 19 queue items as an exception, even though it only retrieved one item from the queue, and that item was locked for working (please see the screenshots).&amp;nbsp;
Screenshots:
#1 This is an image of immediately after the items were added to the queue, using the ""Add to Queue"" action. Then the bot used the ""Get Next Item"" to retrieve the next item from the queue and mark it as ""Locked"" with a padlock.&amp;nbsp;
# 2 After using the ""Get Next Item"" the output was put into two data items (the Item ID, and a collection with all the data for that item - note it has only one row for that item)
#3 The process flow where the error occurs.&amp;nbsp;
#4 The inputs for the ""Open Workbook"" action. The file path is just a normal shared drive location, and works fine in other processes.
#5 The code stage in the Object Studio for the ""Open Workbook"" action.
&amp;nbsp;
Many thanks in advance for any help,
Kind regards,&amp;nbsp;
Ben
&amp;nbsp;</description>
      <pubDate>Sun, 20 Jan 2019 01:10:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Multiple-instances-of-Excel-opened-after-loading-the-queue/m-p/71706#M24311</guid>
      <dc:creator>BenAnderson</dc:creator>
      <dc:date>2019-01-20T01:10:00Z</dc:date>
    </item>
    <item>
      <title>Image #2</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Multiple-instances-of-Excel-opened-after-loading-the-queue/m-p/71707#M24312</link>
      <description>Image #2</description>
      <pubDate>Sun, 20 Jan 2019 01:11:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Multiple-instances-of-Excel-opened-after-loading-the-queue/m-p/71707#M24312</guid>
      <dc:creator>BenAnderson</dc:creator>
      <dc:date>2019-01-20T01:11:00Z</dc:date>
    </item>
    <item>
      <title>Image #3</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Multiple-instances-of-Excel-opened-after-loading-the-queue/m-p/71708#M24313</link>
      <description>Image #3</description>
      <pubDate>Sun, 20 Jan 2019 01:11:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Multiple-instances-of-Excel-opened-after-loading-the-queue/m-p/71708#M24313</guid>
      <dc:creator>BenAnderson</dc:creator>
      <dc:date>2019-01-20T01:11:00Z</dc:date>
    </item>
    <item>
      <title>Image #4</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Multiple-instances-of-Excel-opened-after-loading-the-queue/m-p/71709#M24314</link>
      <description>Image #4</description>
      <pubDate>Sun, 20 Jan 2019 01:11:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Multiple-instances-of-Excel-opened-after-loading-the-queue/m-p/71709#M24314</guid>
      <dc:creator>BenAnderson</dc:creator>
      <dc:date>2019-01-20T01:11:00Z</dc:date>
    </item>
    <item>
      <title>Image #5
(Apologies, I…</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Multiple-instances-of-Excel-opened-after-loading-the-queue/m-p/71710#M24315</link>
      <description>Image #5
(Apologies, I couldn't figure out how to upload multiple images to one post. Thank you).</description>
      <pubDate>Sun, 20 Jan 2019 01:12:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Multiple-instances-of-Excel-opened-after-loading-the-queue/m-p/71710#M24315</guid>
      <dc:creator>BenAnderson</dc:creator>
      <dc:date>2019-01-20T01:12:00Z</dc:date>
    </item>
    <item>
      <title>Hi Ben
To make sure I'm on…</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Multiple-instances-of-Excel-opened-after-loading-the-queue/m-p/71711#M24316</link>
      <description>Hi Ben
To make sure I'm on the same page with you, you're saying that it is locking a single queue item (1/19), opening 19 instances of Excel, failing, and then marking all 19 queue items without actually calling 'Open Workbook' 19 times, but instead only calling that action once?
Just in case it helps me understand: Where is the data coming from that loads the queue? Does it come from within that Workbook by another Process?
And what I'm understanding is that your process flow is like this:
0. Something loads the queue with 19 items and puts data in it (perhaps the location of the Excel workbook).
1. Get Next Item from that queue, locking 1 of the 19 items.
2. Create Instance
3. Show Instance
4. Open Workbook using a file path inside the queue item, creating 19 instances of Excel
5. Apply Slicer
The thing is that it is not possible for pending queue items to be marked as an exception unless they are locked first. That tells me that somehow your process must be locking the other queue items.
As for the 19 instances of Excel, have you tried stepping through the Process in Process Studio and you're saying that when you step over the 'Open Workbook' action that it creates 19 instances?
&amp;nbsp;
Respectfully,
Dave</description>
      <pubDate>Sun, 20 Jan 2019 23:00:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Multiple-instances-of-Excel-opened-after-loading-the-queue/m-p/71711#M24316</guid>
      <dc:creator>david.l.morris</dc:creator>
      <dc:date>2019-01-20T23:00:00Z</dc:date>
    </item>
    <item>
      <title>Hi Dave, 

""To make sure I'm…</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Multiple-instances-of-Excel-opened-after-loading-the-queue/m-p/71712#M24317</link>
      <description>Hi Dave,&amp;nbsp;

""To make sure I'm on the same page with you, you're saying that it is locking a single queue item (1/19), opening 19 instances of Excel, failing, and then marking all 19 queue items without actually calling 'Open Workbook' 19 times, but instead only calling that action once?""

Yes, this is correct. The data that is loaded into the queue, comes from a collection which is two collections merged together earlier in the process, called ""MergedAll"" (please see attached screenshot). The queue data doesn't come from the workbook that is opened 19 times, no.&amp;nbsp;
&amp;nbsp;
In terms of your summary of the process flow, yes that would be accurate. The file path for the workbook comes from the queue data which is output to a collection when it retrieves the next item, called ""DataCollection"". It is one row in this queue&amp;nbsp;collection.
&amp;nbsp;
Yes, I agree on the pending items not being able to be marked as complete/exception, which is what is really stumping me, and makes me think that somehow the process is as you say, locking the other items in the queue.&amp;nbsp;
&amp;nbsp;
Yes, we have tried troubleshooting by stepping through the process, and initially thought it was some recursion in the code stage, but to no avail.&amp;nbsp;
&amp;nbsp;
I appreciate it is a bit of a strange error to encounter, but it is obviously somehow linked to the queue items.
&amp;nbsp;
Many thanks for your reply,
Kind regards,
Ben</description>
      <pubDate>Mon, 21 Jan 2019 02:08:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Multiple-instances-of-Excel-opened-after-loading-the-queue/m-p/71712#M24317</guid>
      <dc:creator>BenAnderson</dc:creator>
      <dc:date>2019-01-21T02:08:00Z</dc:date>
    </item>
    <item>
      <title>After adding to the queue,…</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Multiple-instances-of-Excel-opened-after-loading-the-queue/m-p/71713#M24318</link>
      <description>After adding to the queue, the process, gets the next item, as per the screenshot.&amp;nbsp;
Many thanks,
Ben</description>
      <pubDate>Mon, 21 Jan 2019 02:09:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Multiple-instances-of-Excel-opened-after-loading-the-queue/m-p/71713#M24318</guid>
      <dc:creator>BenAnderson</dc:creator>
      <dc:date>2019-01-21T02:09:00Z</dc:date>
    </item>
    <item>
      <title>Hi Ben,
It just occurred to…</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Multiple-instances-of-Excel-opened-after-loading-the-queue/m-p/71714#M24319</link>
      <description>Hi Ben,
It just occurred to me. One thing you may want to check into is to verify that the data you add to the queue gets cleared out within the process after adding it to the queue.
I have encountered similar issues before when it turned out that I was doing this:
1. Get rows of data from Excel into a Collection
2. Add those rows as individual items in a queue
3. Get Next Item from the queue
3. Start working the Collection
The problem in my example is that even though I added data to the queue and I retrieve the data from the queue, I accidentally referenced the original collection because it is still held in memory. This could cause your process to have access to all 19 rows still.
I would go in and add a stage (if it's not doing this already) that clears the collection just after adding to the queue. This will ensure that the data your loop works with is only coming from a single queue item.
Respectfully,
Dave</description>
      <pubDate>Mon, 21 Jan 2019 03:41:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Multiple-instances-of-Excel-opened-after-loading-the-queue/m-p/71714#M24319</guid>
      <dc:creator>david.l.morris</dc:creator>
      <dc:date>2019-01-21T03:41:00Z</dc:date>
    </item>
    <item>
      <title>Hi Dave, 
 
That sounds very…</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Multiple-instances-of-Excel-opened-after-loading-the-queue/m-p/71715#M24320</link>
      <description>Hi Dave,&amp;nbsp;
&amp;nbsp;
That sounds very sensible. Thank you for the suggestion. I'll give that solution a try today and see how it goes!
Many thanks again for your time,
&amp;nbsp;
Kind regards,&amp;nbsp;
Ben</description>
      <pubDate>Mon, 21 Jan 2019 13:57:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Multiple-instances-of-Excel-opened-after-loading-the-queue/m-p/71715#M24320</guid>
      <dc:creator>BenAnderson</dc:creator>
      <dc:date>2019-01-21T13:57:00Z</dc:date>
    </item>
    <item>
      <title>Hi Dave, 
 
I managed to get…</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Multiple-instances-of-Excel-opened-after-loading-the-queue/m-p/71716#M24321</link>
      <description>Hi Dave,&amp;nbsp;
&amp;nbsp;
I managed to get the process to work and only open one instance of excel. It turns out that whenever it opened the excel report, it used the workbook name/file path from the one row in the data collection. However the very next action in the process was an ""Apply Filter"" action. This second action used a workbook name from a single data item created earlier in the process, (even though it was the exact same name).
Once I changed this data item to the workbook name from the queue collection it worked fine.&amp;nbsp;
Based on your solution above, I went through the whole process and did find a couple of further instances where it should have been using this queue collection for the workbook name, but instead was using this one data item.
&amp;nbsp;
Thought it best to put this solution up here, in case anybody else has the same problem.&amp;nbsp;
Thanks again for your help,
&amp;nbsp;
Kind regards,&amp;nbsp;
Ben&amp;nbsp;&amp;nbsp;
&amp;nbsp;</description>
      <pubDate>Tue, 22 Jan 2019 14:19:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Multiple-instances-of-Excel-opened-after-loading-the-queue/m-p/71716#M24321</guid>
      <dc:creator>BenAnderson</dc:creator>
      <dc:date>2019-01-22T14:19:00Z</dc:date>
    </item>
  </channel>
</rss>

