Jump to content

Direct IC or BPM based on whether in or out of hours by Working Time Calendar


Berto2002

Recommended Posts

Is there a way for an IC or BPM to 'Get' the Details of the active Working Calendar and then make a Decision through an Expression based on whether we are 'in' or 'out' of hours?

In short, something like:

 - if in-hours then assign to team A

 - if out-of-hours, then assign to team B

image.thumb.png.1293b44d83eb4bbed91801638cab79d7.png

There is no content here or linked from here on how or if this data is available to IC/BPM: Working Time Calendars - Hornbill

If it's not, I guess I would need to 'hardcode' my own lookups of current time using Cloud utils and comparing them against set values?

Link to comment
Share on other sites

  • Berto2002 changed the title to Direct IC or BPM based on whether in or out of hours by Working Time Calendar

@James Ainsworth you usually have a way around things if there's no such feature. Any ideas?

For example, it would be easy if we had a time-only cloud node so we could use an expression like:

IF [current time] > [08:00] AND [current time] < 18:00 THEN...

But I can only find date/time lookups where we cannot ignore the date so cannot 'hardcode'' a time on a 24 hour cycle.

And perhaps we have a very obvious enhancement request here to allow BPM to detect whether we are in working time at any given point in the workflow?

Link to comment
Share on other sites

On 10/17/2022 at 1:38 AM, Berto2002 said:

allow BPM to detect whether we are in working time at any given point in the workflow

Hi @Berto2002

This is the bit of your original post that I'm not too clear on.  A colleague has shown me how to check the log time of a ticket if it was raised during work hours or out of hours.  However, the above statement "at any given point in the workflow" suggests that what you are looking for is not related to the time it was logged.  Would I be right in thinking that what you are looking for is prior to any team assignment, you want to check if the current time is out of hours or not, and assign based on that.  It's not to do with the time the ticket was raised at? 

Link to comment
Share on other sites

In Conor's example above, he is using the Date Formatter utility to get the hour of the day.  This automation takes in the standard date format taken from the Get Local Time automation and the output format is simply using G which is just the hours.  The formats for input and output can be seen here.

image.png

Once you have this information, you can then use a decision node to check the workhours.

image.png

  • Like 1
Link to comment
Share on other sites

@Berto2002 great to hear that you have it working.  I will feedback the request for a Hornbill Automation to lookup the working time calendar.  There are a lot of big projects going on with some great new features being worked on.  Not sure when this would be reviewed for consideration, but I'll make sure it is in the list.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...