cancel
Showing results for 
Search instead for 
Did you mean: 

Copying elements from one page into another page and how BluePrism handles it

DexterWhelan1
Level 4
Hey all, This is a general 'under-the-hood'/nitty-gritty operations sort of question. And for the purpose of this question I'll talk about copying from Object A into Object B but this could refer to process -> process or object -> process as well. What are the implications of copying a bunch of elements in one action in Object A into Object B? Specifically I want to talk about how Blueprism identifies that something from the clipboard is blueprism friendly (i.e. bp readable xml) and then, how BP re-identifies these pasted code elements as belonging to sub-page elements in Object B which they are now housed in. Here are two code examples to help talking points, I have copied 3 elements into notepad to talk about the differences. It consists of a read stage, a decision stage and navigate stage. Here is Object A 39701f87-6a4e-4602-9cf4-0c1897c23d56 15 -45 60 30 5ae4a277-a3af-4143-af02-2f4a723bfe37 IsConnected 39701f87-6a4e-4602-9cf4-0c1897c23d56 15 30 60 60 02d685da-d7e1-46e3-a586-4b6485ca7ab6 39701f87-6a4e-4602-9cf4-0c1897c23d56 135 30 60 30 AttachApplication WindowTitlesCollection WindowTitle [Window Title] ProcessName ChildIndex And here is object B this is the copy and paste version of the above 349088a1-dbdc-4989-9383-b9bcb61d390f 15 -45 60 30 079080d8-da5a-43e4-a7a0-0f630d9dbd08 IsConnected 349088a1-dbdc-4989-9383-b9bcb61d390f 15 30 60 60 e86c32e7-c1fb-4eb9-b1f4-c4db02e24071 349088a1-dbdc-4989-9383-b9bcb61d390f 135 30 60 30 AttachApplication WindowTitlesCollection WindowTitle [Window Title] ProcessName ChildIndex So if you copy and paste them yourselves wherever is easiest for you to read them you'll notice that once copied the stage ID's for ObjectB xml have changed to new values. The element ID for a data variable didn't change though, so I guess that means variables that are local have set id's that don't need to be changed when copied from process to process. (side note: the implication of this, is that if I don't copy the variable across but instead create one in Object B the copied XML won't actually see the variable I created despite it having the same name as the original one. I will test this and come back to this later.) So, more experienced people than I, how does this way of generating stage ID's affect BluePrism if at all? Does generating new stage ID's on the fly from copy paste cause any issues that don't arise if you were to create the stages manually in Object B? To be clear I mean when you create stages/actions from scratch and are assigned stage ID's by BP, does that way of creating ID's have any less/more impact than copy pasting a selection of objects into BP? I know it's nitty-gritty operations stuff but I think it's interesting to know as an exercise in increasing understanding of the tool we all develop on. This is not a question about what is best practice on creating objects/processes/stages either, please don't bash me for copying objects from time to time :) Testing cntd: so mentioned above, I did some testing. I think my understanding of element ID's was flawed (and still could be), I think element ID's refer to elements in the application modeller (
1 REPLY 1

John__Carter
Staff
Staff
As you've seen copy/paste is a useful trick under the right circumstances. BP does validate what you try to paste into a diagram, so you can only paste valid XML. What it doesn't do is remap ID references, unless the ID is the same in both diagrams. Eg Navigate1 references Element1 in Object A. Object B also has an Element1 but when you paste in Navigate1 the reference is broken. This is because the underlying IDs of the two Element1s is different. The Action stage is different - it references the Object and Object page by name, not by ID.