another technical blog...technically

Monday, March 12, 2018

Namespace collisions in BluePrism

This will be one of the shortest both on my blog and is about a short and sad story about code refactoring.
I was trying to reorder business objects introducing namespaces, as you already know BP encourage to create more than just one business object per application: the problem is you will commonly use at least one business object which holds the most common actions.
Let’s imagine an application called Generic Bank Web System (yep it’s not an original name) and a VBO called GBW with this actions:
  • Login 
  • Log out 
  • Navigate to function 
  • Check payments 
  • Do payments 
  • Get customer data 
  • Set customer data 
Now we can imagine this place to split this object into three objects, this will help us to keep objects small and maintainable, will also help us to prevent performance issues.
  • GBW 
    • Login 
    • Log out 
    • Navigate to function 
  • GBW.Payments 
    • Check payments 
    • Do payments 
  • GBW.Customer 
    • Get customer data 
    • Set customer data 
You can also choose other criteria when sleeping your dress you can choose to split by functional area, by process etc.
What you cannot do is to name the group exactly as one of the existing business objects because BP is not able to recognize the difference between group and business objects when compiling the process: even if during debug sessions everything seems to work like a charm, when you switch to production and you launch the process from the control room or maybe from the scheduler the result will be an error

Failed to create session on machine... - failed to get effective run mode – Unable to calculate run mode – object GBW does not exist 
KABOOM
Good to go
In this case, the solution is simply to rename the object GBW in GBW.Common, by the way, be careful to include in the common object just the error-proof actions in order to avoid regressions.
Thanks to Antonio Durante for the useful brainstorming sessions … yes! again 😊
written in: Milano MI, Italia

0 commenti:

Post a Comment

Because of a lot of SPAM about courses, I need to moderate all comments here.
I ensure you that I will answer whenever possible (if you are not a spammer).

Me, myself and I

My Photo
I'm just another IT guy sharing his knowledge with all of you out there.
Wanna know more?