Categorie: reference
Bijgewerkt: 2026-04-08
actionfield workflow actionfield1848
ActionField1848
Beschrijving: Approve all EmployeeLabour records for an employee Custom: Nee
Propertiesbewerken
| Property | Type | Accessor |
|---|---|---|
| Employee | Employee | Root |
XMLbewerken
<Workflow Name="ActionField1848" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
<Description>Approve all EmployeeLabour records for an employee</Description>
<Properties>
<Property Name="Employee" Type="Employee" Accessor="Root" Direction="In" />
<Property Name="EmployeeLabourList" Type="List[EmployeeLabour]" Accessor="Internal" />
</Properties>
<Execution>
<UserContent Name="Pre" />
<Validation Name="Not enough rights to approve hours" Condition="#{User.IsSuper} == True" MessageCode="3864">
<Parameter Name="Employee" Direction="In" Value="${Employee}" />
</Validation>
<ContinuationQuestion Name="ApproveAllHours" MessageCode="3863">
<Parameter Name="Employee" Direction="In" Value="${Employee}" />
</ContinuationQuestion>
<Transaction>
<GetList Name="Get EmployeeLabour records of Employee" Type="EmployeeLabour" OutputProperty="${EmployeeLabourList}" OrderBy="Id.Week" OrderDirection="Ascending">
<Filters>
<PropertyFilter PropertyName="Id.Employee" Operator="=" PropertyValue="${Employee.Id}" />
<PropertyFilter PropertyName="Status" Operator="=" PropertyValue="EmployeeLabourStatus.Created" />
</Filters>
</GetList>
<Assign Name="SkipLaterWeekClosedValidation" Property="#{Settings.EmployeeLabour.SkipCreatingNextWeekWhenApprovingAllHours}" Value="True" />
<ForEach Name="EmployeeLabour in list" In="${EmployeeLabourList}" As="EmployeeLabour">
<ChangeStatus Name="Approve EmployeeLabour" DomainObject="${EmployeeLabour}" NewStatus="EmployeeLabourStatus.Approved" />
</ForEach>
</Transaction>
<Message Name="Hours have been approved" MessageCode="3868">
<Parameter Name="Employee" Direction="In" Value="${Employee}" />
</Message>
<UserContent Name="Post" />
</Execution>
</Workflow>