cancel
Showing results for 
Search instead for 
Did you mean: 

The amazing nested collection (in version 6.2.2)

philippeboutry
Level 4
Hi everyone, 

First i have no problem, no bug, everything is fine. My sole problem is "i do not know why it's work, cause it should not"
This is my story. i warn you, it's a long story with a curious ending. 

I used utility - xml to read the blueprim's config file, automate.config (simple one with only two connections configured)
I used an utility to convert this xml to a collection. Got something like this
Collection : Automate.config  with 2 collection
  • Collection  ?xml (row 1 of 1)
  • Collection config(row 1 of 1)
    • A lot of field 
    • Collection connections (row 1 of 1)
      • Collection connection (row 1 of 2)
        • name 
        • server
        • port
        • etc.
I searched a specific connection. name to modify it.
To loop on collection [Automate.config.config.connections.connection], i used a calc stage to copy this collection into a new one . Calc stage : Expression : [Automate.config.config.connections.connection]  + store result in an empty collection [connection]
I set a loop stage on [connection], searched for my specific connection name, modified the server name or added a new row if the connection was not found. 
Then all i had to do was copy back the modified collection [connection] into [Automate.config.config.connections.connection] using another calc stage. Expression : [connection] + store result in [Automate.config.config.connections.connection] 

But it didn't work. Got an error collection [Automate.config.config.connections.connection] does not exist. 
I tried to use Utility-collection-manipulation to modify [Automate.config.config.connections.connection] using the row number. Weirder : Got no error AND collection not updated

Finally i see the stranger thing ever seen in Blueprism. 
Each time i make a modification in [connection] collection (add row or set a new value), the modification is also made in the [Automate.config.config.connections.connection] collection.  ??????
So i deleted my last calc stage and did not copy back the data in [Automate.config.config.connections.connection]
Just reverted the collection to xml and saved the file. I made some test and it's really working. 

I beg you to anwser me if you have any clue to understand this strange behaviour. 

 Thanks to those who read me until the end. 
Best regards

PS : Using version 6.8, the calc stage works perfectly as described
2 REPLIES 2

ewilson
Staff
Staff
What utility did you use to convert the XML to a collection because there's only one <config>...</config> element in the XML.

Cheers,
Eric

philippeboutry
Level 4
Well, perhaps not the best one but speaking of code, i 'm not very good. I found a process who parse a Blueprism release using some code and i reused the code.
Do you have one favorite to recommend me?