2 weeks ago
Hello, I have the following question. Is it possible to track different things within a loop, e.g. several data items are filled each time within the loop and then again in the next loop? Can I somehow save or log the contents of these data items so that I have access to them at the end?
2 weeks ago
Hello @lorenzwagner ,
The shortest answer is "Almost certainly, yes."
My next shortest answer "Probably using Blue Prism Work Queues and Items, but..."
...Is it possible you could elaborate on your process and its steps. How I would approach it would probably waver based on what you mean by 'save', 'log' and 'have access'.
I know this is not really an answer, but I am sure we can get started down the right path.
Good luck,
Red
2 weeks ago
We have a process that first reads all unread Outlook items and then saves the attachments for each item (1st loop). Then, one by one, each attachment would be processed separately (2nd loop). Then we use Word to copy the text of the PDF into a data item and then search this data item for a specific number pattern using various regexes (3rd loop). We then print the document via Powershell. Now we would like to extract the text from the PDF for each attachment, the sequence of numbers found, as well as the information about the mail and whether the document was printed. Preferably in an XLSX. Is that possible?
2 weeks ago
Hi @lorenzwagner,
Okay. I am with you, and I would definitely lean towards my 'next shorter answer', although you would not know it from the response that follows.
Speaking only for myself, and hoping others will chime in, I would absolutely use BP Work Queues (BPWQ) to manage this process.
First, you will need to create a BPWQ, named according to whatever rubric fits your organization. For the purposes of this response, in my head I am going to call it 'Email Attachments' (because I am still waiting for my coffee to kick in). You will need to determine a 'Key' field value. Ideally, I would want this value to be something directly connected to the transaction (like a PO or Invoice number, perhaps an Employee ID). I do not think you can use the MS Outlook Email ID (or whatever it is called in the version you are using). I have found that long values tend to be trickier to play with. However, it appears that you are only interested in the actual email in the first loop. So, you can create a unique key, based on a date and serialized value (as an example the first email processed today would be '2501100001').
There is a bit of a caveat here, as I am going to suggest that your BPWQ is going to be the source of your reporting data. That will require scoping out all of the data elements you are looking to report out on--some of which you may not know or think about in the very early stages of Development.
So, now the first process is exactly as you describe: poll Outlook for emails, identify and save off the attachments. In addition, you are going to create a BPWQ record for each attachment. Keeping the caveat I mentioned in mind, I would store elements like the path where I stored the attachment, the title of the attachment, the document type, and anything else of note. From now on, your automation is going to be managed/directed by the BPWQ.
From here, I think there is a bit of artistic license. Depending on how you are 'processing' your attachments, I might have that as one or two discrete BP Processes. We use Blue Prism's Decipher, and I have broken it into a "Load" and "Retrieve" processes. The rest of the steps you list (get the text from the PDF, using RegEx and printing via PowerShell) could probably fall into one Process, but there may be reasons to separate them. Up to you.
So what is this getting you? As you move through the process you can store the values you find in your BPWQ item. The text from the attachment? Done? The match values returned by your RegEx search? No problem. The DateTime stamps of when each activity occurred? Done and done. All of this goes back to the caveat of preparing your item to hold whatever data you consider important for report. Because...
Your reporting is based on looping through your BPWQ items for the duration of work, taking all of that into a Collection and then saving it to Excel.
There is one last topic that I feel needs to be addressed, and I call it 'gating'. That is, making sure that an item moves through whatever Processes in the correct order and is only acted on by an appropriate Process. There are a couple of ways to do this: via the BPWQ item 'Status' or by the use of 'Tags'. I would lean towards Tags, as Blue Prism facilitates that much more with the 'Get Next Item' and a 'Tag Filter'. If you choose Status, you have to explicitly loop through all of your Pending Items until you come across the appropriate Status. It is cumbersome.
Using Tags, I would do something like the following.
Processes two through four are 'looking' for the specific Tag to tell them that there are items to work. When they successfully complete their work, they change out the Tag, in order to pass it onto the next Process. Additionally, this formatting makes it very easy for me to scan the BPWQ in the Control Room and see where items are in the overall automation.
That was a lot. Even for me, and I know that I am effusive in my general responses, that was a lot. And there is more to is. But I will let this sink in, and I will be happy to try an answer any other questions.
Take care,
Red