Categorie: reference
Bijgewerkt: 2026-04-08
actionfield workflow actionfield1024
ActionField1024
Beschrijving: Correct EmployeeLabourPeriod (hour administration). Custom: Nee
Propertiesbewerken
| Property | Type | Accessor |
|---|---|---|
| EmployeeLabourPeriod | EmployeeLabourPeriod | Root |
XMLbewerken
<Workflow Name="ActionField1024" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
<Description>Correct EmployeeLabourPeriod (hour administration).</Description>
<Properties>
<Property Name="EmployeeLabourPeriod" Type="EmployeeLabourPeriod" Accessor="Root" Direction="In" />
<Property Name="CreatedEmployeeLabourPeriod" Type="EmployeeLabourPeriod" Accessor="Internal" />
<Property Name="CurrentUser" Type="Employee" Accessor="Internal" Default="#{User.EmployeeId}" />
<Property Name="GrossHours" Type="Decimal?" Accessor="Internal" />
<Property Name="HourCode" Type="HourCode" Accessor="Internal" />
<Property Name="Hours" Type="Decimal?" Accessor="Internal" />
<Property Name="HourTariffCategory" Type="HourTariffCategory" Accessor="Internal" />
<Property Name="NewStopDate" Type="DateTime?" Accessor="Internal" />
<Property Name="StartDate" Type="DateTime?" Accessor="Internal" />
<Property Name="Stop" Type="RequestResult" Accessor="Internal" Default="No" />
<Property Name="UsedStopDate" Type="DateTime?" Accessor="Internal" Default="${EmployeeLabourPeriod.StopDate}" />
</Properties>
<Settings>
<SettingsGroup Name="JobWeekLabour">
<Setting Name="ReopenOtherUsers" Type="Boolean" Value="True" />
</SettingsGroup>
</Settings>
<Execution>
<UserContent Name="Pre" />
<Validation Name="Status" Condition="${EmployeeLabourPeriod.Status} == EmployeeLabourPeriodStatus.Started || ${EmployeeLabourPeriod.Status} == EmployeeLabourPeriodStatus.Stopped || ${EmployeeLabourPeriod.Status} == EmployeeLabourPeriodStatus.Processed" MessageCode="1988">
<Parameter Name="EmployeeLabourPeriod" Direction="In" Value="${EmployeeLabourPeriod}" />
</Validation>
<WorkflowCall Name="EmployeeLabourPeriod_ValidateEmployeeLabour" WorkflowName="EmployeeLabourPeriod_ValidateEmployeeLabour">
<Parameter Name="EmployeeLabourPeriod" Direction="In" Value="${EmployeeLabourPeriod}" />
</WorkflowCall>
<When Name="UserIsSuperIsNotTrue" Condition="#{User.IsSuper} != True && ${EmployeeLabourPeriod.Status} == EmployeeLabourPeriodStatus.Processed">
<Validation Name="UserValidation" Condition="${EmployeeLabourPeriod.Employee.Id} == #{User.EmployeeId}" MessageCode="1990">
<Parameter Name="Employee" Direction="In" Value="${CurrentUser}" />
<Parameter Name="EmployeeLabourPeriod" Direction="In" Value="${EmployeeLabourPeriod}" />
</Validation>
</When>
<When Name="Should ask to stop" Condition="${EmployeeLabourPeriod.Status} == EmployeeLabourPeriodStatus.Started">
<Validation Name="This job not started by this Employee" Condition="${EmployeeLabourPeriod.Employee.Id} == #{User.EmployeeId} || #{User.IsSuper} == True" MessageCode="1952">
<Parameter Name="Employee" Direction="In" Value="${CurrentUser}" />
<Parameter Name="Job" Direction="In" Value="${EmployeeLabourPeriod.Job}" />
</Validation>
<Question Name="Stop?" Type="YesNoCancel" MessageCode="1987" Default="Yes" OutputProperty="${Stop}">
<Parameter Name="EmployeeLabourPeriod" Direction="In" Value="${EmployeeLabourPeriod}" />
</Question>
<When Name="Should Stop" Condition="${Stop} == Yes">
<Assign Name="Set StopDate" Property="${UsedStopDate}" Value="#{Environment.CurrentDateTime}" />
</When>
</When>
<WorkflowCall Name="Dialog_CorrectEmployeeLabourPeriod" WorkflowName="Dialog_CorrectEmployeeLabourPeriod">
<Parameter Name="EmployeeLabourPeriod" Direction="In" Value="${EmployeeLabourPeriod}" />
<Parameter Name="StopDate" Direction="InOut" Value="${UsedStopDate}" OutputProperty="${NewStopDate}" />
<Parameter Name="GrossHours" Direction="Out" OutputProperty="${GrossHours}" />
<Parameter Name="HourCode" Direction="Out" OutputProperty="${HourCode}" />
<Parameter Name="Hours" Direction="Out" OutputProperty="${Hours}" />
<Parameter Name="HourTariffCategory" Direction="Out" OutputProperty="${HourTariffCategory}" />
<Parameter Name="StartDate" Direction="Out" OutputProperty="${StartDate}" />
</WorkflowCall>
<When Name="No Changes made" Condition="${GrossHours} == ${EmployeeLabourPeriod.GrossHours} && ${Hours} == ${EmployeeLabourPeriod.Hours} && ${HourCode} == ${EmployeeLabourPeriod.HourCode} && ${HourTariffCategory} == ${EmployeeLabourPeriod.HourTariffCategory} && ${StartDate} == ${EmployeeLabourPeriod.StartDate} && ${NewStopDate} == ${UsedStopDate}">
<Stop Name="Stop" Mode="EndCurrent" />
</When>
<Transaction>
<When Name="Should Stop" Condition="${Stop} == Yes">
<Assign Name="set InCorrecting" Property="#{Settings.EmployeeLabourPeriod.InCorrecting}" Value="True" />
<ChangeStatus Name="Stop" DomainObject="${EmployeeLabourPeriod}" NewStatus="EmployeeLabourPeriodStatus.Stopped" />
<Assign Name="reset InCorrecting" Property="#{Settings.EmployeeLabourPeriod.InCorrecting}" Value="False" />
</When>
<WorkflowCall Name="EmployeeLabourPeriod_CreateChildCopy" WorkflowName="EmployeeLabourPeriod_CreateChildCopy">
<Parameter Name="EmployeeLabourPeriod" Direction="In" Value="${EmployeeLabourPeriod}" />
<Parameter Name="HourCode" Direction="In" Value="${HourCode}" />
<Parameter Name="HourTariffCategory" Direction="In" Value="${HourTariffCategory}" />
<Parameter Name="StartDate" Direction="In" Value="${StartDate}" />
<Parameter Name="StopDate" Direction="In" Value="${NewStopDate}" />
<Parameter Name="CreatedEmployeeLabourPeriod" Direction="Out" OutputProperty="${CreatedEmployeeLabourPeriod}" />
</WorkflowCall>
<Assign Name="Set GrossHours" Property="${CreatedEmployeeLabourPeriod.GrossHours}" Value="${GrossHours}" />
<Assign Name="Set Hours" Property="${CreatedEmployeeLabourPeriod.Hours}" Value="${Hours}" />
<ChangeStatus Name="Correct" DomainObject="${EmployeeLabourPeriod}" NewStatus="EmployeeLabourPeriodStatus.Corrected" />
</Transaction>
<UserContent Name="Post" />
<Message Name="Corrected" MessageCode="1989">
<Parameter Name="EmployeeLabourPeriod" Direction="In" Value="${EmployeeLabourPeriod}" />
</Message>
</Execution>
</Workflow>