Search code examples
blueprism

Calculate Last Working Day


I am trying to calculate the last working day for a process. Typically, this will be yesterday. However, if the process runs on a Monday it should bring back the date of Friday.

My calculation is:

Today()-MakeTimeSpan(1, 0, 0, 0)

Current code stage enter image description here


Solution

  • The Best Practice in this area is to use VBO called "Calendars", that is a Internal one, built in the BluePrism.

    Object: Calendar
    Action: Add working days
    Calendar Name: "Working Week / No Holidays"
    Date: Today()
    Days -1
    

    An advantage of that solution is that you can customize the calendar to add all Holidays that are Bank Holidays for your company.