Possible use cases
Functionality
The function: Save Calendar is deprecated as it used an old pattern bind which needs the load function which is also deprecated
Hello, how should the Calendar be saved ? Just by executing the writeToDataStoreEntity and then using the Import Appian Calendar node ?
The calendar is not being updated after changing the working days.
Any help would be appreciated
Hi, sorry for the delay,
I agree with you that calendars seems to not being modified after changing working days when you look at them in the Process Calendar settings but, if you read the calendar and make some calculations you can verify that the change has being applied.
I suggest you to prepare a simple test, create a custom calendar, change the intervals of some working days and load it after to Appian using the "Import Appian Calendar" Smart Service, probably you still will see original values in the designer but, try a simple test calculating working ours and look at the results, my hope is that your interval changes are being used in that calculations.
This is an example of how could be the test, this is working properly, taking into account the changes I made on intervals
a!localVariables( local!testDateTime: todatetime("03/20/2021 9:00 am"), local!prueba2: readcalendar("prueba2"), { intervals: length(local!prueba2.specific[wherecontains(todate(local!testDateTime), todate(local!prueba2.specific.date))][1].entries), since: local!prueba2.specific[wherecontains(todate(local!testDateTime), todate(local!prueba2.specific.date))][1].entries[1].since, until: local!prueba2.specific[wherecontains(todate(local!testDateTime), todate(local!prueba2.specific.date))][1].entries[1].until, plus0: caladdhours(local!testDateTime, 0, "prueba2"), plus2: caladdhours(local!testDateTime, 2, "prueba2"), plus3: caladdhours(local!testDateTime, 3, "prueba2"), plus4: caladdhours(local!testDateTime, 4, "prueba2") })
Finally, the plugin appears to not being updating the Calendar as it's done in the Designer, but the saved modifications are taken into account in working hour calculations.
Of course I will try to update the plugin to modify Calendars in a way visible from the Designer but could you verify that calculations are done well?
Hello, it seems that your suggestion for the defaultDOW fixed basically all of the issues, I set this value as the default from the default Calendar, and then when I created a new calendar, it gets recognized when calculating the non working days and it even appears in the System Calendar Settings.Thanks,
Just another question, I have noticed that no entries are currently being created in the Database for the calendars data, calendar, calendardate, calendardow and calendarinterval do not seem to be updated with anything, is this usual ?
Hi, thanks for the quick response, when its published I'll retest and let you know