-
Notifications
You must be signed in to change notification settings - Fork 20
Description
folder = Folder("SampleFolder", when=Folder.When(week_days=['SUN']...)
That code only works with Job objects, not Folders. It generates JSON where the when gets ignored on deployment. At the Folder level RuleBasedCalendars require a "name" and that's missing.
I used the following code to correctly implement a when with RuleBasedCalendars in a Folder...
mycal = CalendarRuleBased("mwf", when=Folder.When(week_days=['MON', 'WED', 'FRI'])) workflow.add( Folder( "SampleFolder", order_method = "Manual", when=Folder.When( rule_based_calendars=Folder.When.RuleBasedCalendars( # this is a list of CalendarRuleBased objects calendar_rule_based_list=[mycal], # this is the complete list of folder based and global RuleBasedCalendars included=["mwf", "EVERYDAY", "jfi-weekdays3", "jfi-friday"] ), from_time="1000" ) ) )