Categorie: reference
Bijgewerkt: 2026-04-08
actionfield workflow actionfield547
ActionField547
Beschrijving: Create leave(TimeReservation) for Employee. Custom: Nee
Propertiesbewerken
| Property | Type | Accessor |
|---|---|---|
| EmployeeLabour | EmployeeLabour | Root |
| AllowPeriodOutsideEmployeeWeek | Boolean | Optional |
| HourCode | HourCode | Optional |
| RosterGroupEntryValidate | Boolean | Optional |
XMLbewerken
<Workflow Name="ActionField547" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
<Description>Create leave(TimeReservation) for Employee.</Description>
<Properties>
<Property Name="EmployeeLabour" Type="EmployeeLabour" Accessor="Root" Direction="In" />
<Property Name="AllowPeriodOutsideEmployeeWeek" Type="Boolean" Accessor="Optional" Direction="In" Default="True" Comment="When false, range between startDate and endDate must be inside week EmployeeLabour.Id.Week. When true, all time domain is allowed" />
<Property Name="HourCode" Type="HourCode" Accessor="Optional" Direction="In" Comment="Use this HourCode as default in the dialog" />
<Property Name="RosterGroupEntryValidate" Type="Boolean" Accessor="Optional" Direction="In" Default="False" Comment="Validate if EmployeeLabour.Id.Employee belongs to a RosterGroupEntry at week EmployeeLabour.Id.Week. Standard is false." />
<Property Name="Employees" Type="List[Employee]" Accessor="Internal" />
<Property Name="EndDate" Type="DateTime" Accessor="Internal" />
<Property Name="EndDateForGetCount" Type="DateTime" Accessor="Internal" />
<Property Name="Recursive" Type="Boolean" Accessor="Internal" />
<Property Name="RosterGroupEntryCount" Type="Int64" Accessor="Internal" Default="-1" />
<Property Name="StartDate" Type="DateTime" Accessor="Internal" />
<Property Name="TimeslotPattern" Type="TimeslotPattern" Accessor="Internal" />
<Property Name="UnscheduleJobScheduleParts" Type="Boolean" Accessor="Internal" Default="True" Comment="If set to False in UserContent Pre, the checkbox 'Unschedule jobs' will be unticked as default." />
</Properties>
<Execution>
<UserContent Name="Pre" />
<When Name="RosterGroupEntryValidate is true" Condition="${RosterGroupEntryValidate} == True">
<Transaction>
<Command Name="Get endDate for GetCount" CommandName="AddCalendarDaysToDate">
<Parameter Name="NumberOfDays" Direction="In" Value="7" />
<Parameter Name="RoundToMinutes" Direction="In" Value="True" />
<Parameter Name="StartDate" Direction="In" Value="=#setdatetime(${EmployeeLabour.Id.Week.FirstDay}, 0, 0)" />
<Parameter Name="WorkSchedule" Direction="In" Value="Empty" />
<Parameter Name="CalculatedDate" Direction="Out" OutputProperty="${EndDateForGetCount}" />
</Command>
<GetCount Name="Check count" Type="RosterGroupEntry" OutputProperty="${RosterGroupEntryCount}" Comment="Check if employee has assigned an RosterGroup in the week WeekOfYearForValidation">
<Filters>
<PropertyFilter PropertyName="Employee" Operator="=" PropertyValue="${EmployeeLabour.Id.Employee}" />
<CombinedFilter FilterOperator="Or">
<CombinedFilter FilterOperator="And">
<DateFilter PropertyName="StartDate" Operator="<=" PropertyValue="${EmployeeLabour.Id.Week.FirstDay}" />
<DateFilter PropertyName="EndDate" Operator=">=" PropertyValue="${EndDateForGetCount.Date}" />
</CombinedFilter>
<CombinedFilter FilterOperator="And">
<DateFilter PropertyName="StartDate" Operator="<=" PropertyValue="${EmployeeLabour.Id.Week.FirstDay}" />
<DateFilter PropertyName="EndDate" Operator=">=" PropertyValue="${EmployeeLabour.Id.Week.FirstDay}" />
<DateFilter PropertyName="EndDate" Operator="<=" PropertyValue="${EndDateForGetCount.Date}" />
</CombinedFilter>
<CombinedFilter FilterOperator="And">
<DateFilter PropertyName="StartDate" Operator="<" PropertyValue="${EndDateForGetCount.Date}" />
<DateFilter PropertyName="StartDate" Operator=">=" PropertyValue="${EmployeeLabour.Id.Week.FirstDay}" />
<DateFilter PropertyName="EndDate" Operator=">=" PropertyValue="${EndDateForGetCount.Date}" />
</CombinedFilter>
</CombinedFilter>
</Filters>
</GetCount>
</Transaction>
<Validation Name="Validate roster" Condition="${RosterGroupEntryCount} >= 1" MessageCode="1481">
<Parameter Name="Employee" Direction="In" Value="${EmployeeLabour.Id.Employee}" />
<Parameter Name="EmployeeLabour" Direction="In" Value="${EmployeeLabour}" />
</Validation>
</When>
<WorkflowCall Name="Validate HourCodes" WorkflowName="HourCode_ValidateAbsenceHourCodes" />
<SystemDialog Name="AllocateLeaveDialog" DialogName="AllocateLeaveDialog">
<Parameter Name="AllowPeriodOutsideEmployeeWeek" Direction="In" Value="${AllowPeriodOutsideEmployeeWeek}" />
<Parameter Name="Employee" Direction="In" Value="${EmployeeLabour.Id.Employee}" />
<Parameter Name="Week" Direction="In" Value="${EmployeeLabour.Id.Week}" />
<Parameter Name="Employees" Direction="InOut" Value="${Employees}" OutputProperty="${Employees}" />
<Parameter Name="HourCode" Direction="InOut" Value="${HourCode}" OutputProperty="${HourCode}" />
<Parameter Name="UnscheduleJobScheduleParts" Direction="InOut" Value="${UnscheduleJobScheduleParts}" OutputProperty="${UnscheduleJobScheduleParts}" />
<Parameter Name="EndDate" Direction="Out" OutputProperty="${EndDate}" />
<Parameter Name="Recursive" Direction="Out" OutputProperty="${Recursive}" />
<Parameter Name="StartDate" Direction="Out" OutputProperty="${StartDate}" />
<Parameter Name="TimeslotPattern" Direction="Out" OutputProperty="${TimeslotPattern}" />
</SystemDialog>
<Transaction>
<WorkflowCall Name="TimeReservation_CreateLeaveForEmployee" WorkflowName="TimeReservation_CreateLeaveForEmployee">
<Parameter Name="Employees" Direction="In" Value="${Employees}" />
<Parameter Name="EndDate" Direction="In" Value="${EndDate}" />
<Parameter Name="HourCode" Direction="In" Value="${HourCode}" />
<Parameter Name="Recursive" Direction="In" Value="${Recursive}" />
<Parameter Name="StartDate" Direction="In" Value="${StartDate}" />
<Parameter Name="TimeslotPattern" Direction="In" Value="${TimeslotPattern}" />
<Parameter Name="UnscheduleJobScheduleParts" Direction="In" Value="${UnscheduleJobScheduleParts}" />
</WorkflowCall>
</Transaction>
<UserContent Name="Post" />
</Execution>
</Workflow>