Jump to content

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


Recommended Posts

Posted

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?

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

@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?

Posted

Hi @Berto2002

There are some automation under Cloud Integrations that deal with time and days of the week.  I've not had a chance to piece it together to see if it can be used for your scenario, but I'll try and have a look to see what options there are.

image.png

Posted
19 hours ago, Berto2002 said:

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...

Well... this is where I am too.  I'll keep looking.

  • Like 1
Posted
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? 

Posted

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
Posted

Ah, an inspiration. I am going to try this. Things like Regex and these date formats are a nightmare unless you're trained but looks like I can copy the above...

Posted

Ah, it only works :-)

Thank you @Conor and @James Ainsworth

I guess it's back to Hornbill now to consider whether you guys want cloud automations being called for this stuff (cost etc) or whether a solution to this should be more local like a lookup on the working time calendar, hint hint... :-)

Posted

@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

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...