Calendar IO

Possible use cases

  • Promoting Appian calendars between environments
  • Give non-Designers the ability to create/modify calendars and import them into Appian

Functionality

  • Read Calendar
    • Read an already existing Appian calendar or create a new one if none exist with the given name. Returns a Calendar CDT
  • Import Appian calendar
    • Will only update Appian calendar if id and name matches
    • Similar behavior to writeToDataStoreEntity

The function: Save Calendar is deprecated as it used an old pattern bind which needs the load function which is also deprecated

Anonymous
Parents
  • 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

  • Hi, 

    A new version is going to be published next week, I hope.

    I've made some test about time calculations and it seems to be taking into account only working days.

    After the new version is published and you installed it, if you are still getting problems with time calculation perhaps you could send me an small sample App with a process and a rule reflecting your test

    thanks

  • We are using the latest versions, another note its really seems like nothing is happening when the calendar is saved, no days or hours calculations will take into consideration the non working days.

    I thought that the calculations would be ok even if in the System Calendars the non working days were always the default ones (not taking into consideration newer set via the plugin).

    Thanks,

  • Hi Walter, I've reproduced the point 1 and I'm trying to identify the cause. As a work around I suggest you when importing new Calendar into Appian, fill the defaultDOW field appropiately, perhaps initializing it from the defaultDOW of the Default Calendar which you can get using: readcalendar("Default Calendar")

    please, let mi know if this workaround works for you

Comment
  • Hi Walter, I've reproduced the point 1 and I'm trying to identify the cause. As a work around I suggest you when importing new Calendar into Appian, fill the defaultDOW field appropiately, perhaps initializing it from the defaultDOW of the Default Calendar which you can get using: readcalendar("Default Calendar")

    please, let mi know if this workaround works for you

Children
No Data