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
  • Hi, 

    From the stacktrace you can see that the error is at java level, java is saying IST isd an unknow time zone id

    TimeZone is not the same as ZoneId.... documentation: "The default set of data is supplied by the IANA Time Zone Database (TZDB). This has region IDs of the form '{area}/{city}', such as 'Europe/Paris' or 'America/New_York'."

    It depends on what you mean by IST. For example ZoneId.of("Europe/Dublin") for Irish Summer Time, ZoneId.of("Asia/Tel_Aviv") for Israel Standard TIme or ZoneId.of("Asia/Kolkata") for India Standard Time.

    hope this help

  • Hi,

    I am not able to retrieve data using the readCalendar() function in case the timezone in the calendar is set to the IST time zone value.

    2023-08-10 12:17:55,841 [ajp-nio-0.0.0.0-8009-exec-75022] ERROR com.appiancorp.ps.calendar.functions.ReadCalendarFunction - Error build the response
    java.time.zone.ZoneRulesException: Unknown time-zone ID: IST
    	at java.time.zone.ZoneRulesProvider.getProvider(ZoneRulesProvider.java:272)
    	at java.time.zone.ZoneRulesProvider.getRules(ZoneRulesProvider.java:227)
    	at java.time.ZoneRegion.ofId(ZoneRegion.java:120)
    	at java.time.ZoneId.of(ZoneId.java:411)
    	at java.time.ZoneId.of(ZoneId.java:359)
    	at com.appiancorp.ps.calendar.utils.FromAppianCalendar.initializeCalendar(FromAppianCalendar.java:104)
    	at com.appiancorp.ps.calendar.utils.FromAppianCalendar.overrideEntries(FromAppianCalendar.java:128)
    	at com.appiancorp.ps.calendar.utils.FromAppianCalendar.readCalendar(FromAppianCalendar.java:56)
    	at com.appiancorp.ps.calendar.functions.ReadCalendarFunction.readCalendar(ReadCalendarFunction.java:55)
    	at sun.reflect.GeneratedMethodAccessor53413.invoke(Unknown Source)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:498)
    	at com.appiancorp.process.expression.CustomFunction$1.call(CustomFunction.java:846)
    	at com.appiancorp.common.ContextClassLoaderSwitcher.runInContext(ContextClassLoaderSwitcher.java:27)
    	at com.appiancorp.process.expression.CustomFunction.evaluate(CustomFunction.java:840)
    	at com.appiancorp.process.expression.CustomFunction.evalDynamic0(CustomFunction.java:248)
    	at com.appiancorp.process.expression.CustomFunction.lambda$evalDynamic$0(CustomFunction.java:240)
    	at com.appiancorp.plugins.PluginUsageLogger.callWithPluginInformation(PluginUsageLogger.java:41)
    	at com.appiancorp.process.expression.CustomFunction.evalDynamic(CustomFunction.java:239)
    	at com.appiancorp.process.expression.CustomFunction.eval0(CustomFunction.java:208)
    	at com.appiancorp.core.expr.DefaultEvaluable.eval(DefaultEvaluable.java:213)
    	at com.appiancorp.process.expression.ExpressionEvaluator.evaluate(ExpressionEvaluator.java:319)
    	at com.appiancorp.core.expr.FunctionCallDelegate$ExternalFunctionCallWithContext.evaluateCustomerPluginFunction(FunctionCallDelegate.java:398)
    	at com.appiancorp.core.expr.FunctionCallDelegate$ExternalFunctionCallWithContext.doCallWithMetrics(FunctionCallDelegate.java:365)
    	at com.appiancorp.core.expr.FunctionCallDelegate$ExternalFunctionCallWithContext.eval(FunctionCallDelegate.java:336)
    	at com.appiancorp.core.expr.FunctionCallDelegate.evalCacheableFunctionCall(FunctionCallDelegate.java:140)
    	at com.appiancorp.core.expr.FunctionCallDelegate.evalFunctionCall(FunctionCallDelegate.java:105)

    Any help would be appreciated.
  • v1.1.3 Release Notes
    • Restoring the use of the Default Calendar when creating new Calendars
  • 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

  • Hi Walter,

       What version of Appian are you using ?