Categorie: reference
Bijgewerkt: 2026-04-08
actionfield workflow actionfield1663
ActionField1663
Beschrijving: Changes status of all LockoutTagoutRequestLines to Placed or to Removed, depending on the current status of the LockoutTagoutRequest Custom: Nee
Propertiesbewerken
| Property | Type | Accessor |
|---|---|---|
| LockoutTagoutRequest | LockoutTagoutRequest | Root |
XMLbewerken
<Workflow Name="ActionField1663" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
<Description>Changes status of all LockoutTagoutRequestLines to Placed or to Removed, depending on the current status of the LockoutTagoutRequest</Description>
<Properties>
<Property Name="LockoutTagoutRequest" Type="LockoutTagoutRequest" Accessor="Root" Direction="In" Comment="the LockoutTagoutRequest for which all lines should be moved to status Placed" />
<Property Name="LockoutTagoutRequestLines" Type="List[LockoutTagoutRequestLine]" Accessor="Internal" Comment="the lines" />
<Property Name="NewStatus" Type="Status" Accessor="Internal" Comment="the status the lines should be moved to" />
</Properties>
<Execution>
<UserContent Name="Pre" />
<Choose Name="Check status of the request" Comment="This WF is used on screen LTR03 that only displays records with status ToPlace, Active and ToClose">
<When Name="ToPlace?" Condition="${LockoutTagoutRequest.Status} == LockoutTagoutRequestStatus.ToPlace">
<Transaction>
<GetList Name="Get all lines to place" Type="LockoutTagoutRequestLine" OutputProperty="${LockoutTagoutRequestLines}" OrderBy="Id" OrderDirection="Ascending">
<Filters>
<PropertyFilter PropertyName="LockoutTagoutRequest" Operator="=" PropertyValue="${LockoutTagoutRequest}" />
<PropertyFilter PropertyName="Status" Operator="=" PropertyValue="LockoutTagoutRequestLineStatus.ToPlace" />
</Filters>
</GetList>
</Transaction>
<Validation Name="ValidatePlaceableLockoutTagoutRequestLinesFound" Condition="${LockoutTagoutRequestLines.Count} != 0" MessageCode="3189" />
<Assign Name="Set NewStatus to Placed" Property="${NewStatus}" Value="LockoutTagoutRequestLineStatus.Placed" />
</When>
<When Name="ToClose?" Condition="${LockoutTagoutRequest.Status} == LockoutTagoutRequestStatus.ToClose">
<Transaction>
<GetList Name="Get all lines to remove" Type="LockoutTagoutRequestLine" OutputProperty="${LockoutTagoutRequestLines}" OrderBy="Id" OrderDirection="Ascending">
<Filters>
<PropertyFilter PropertyName="LockoutTagoutRequest" Operator="=" PropertyValue="${LockoutTagoutRequest}" />
<PropertyFilter PropertyName="Status" Operator="=" PropertyValue="LockoutTagoutRequestLineStatus.Placed" />
</Filters>
</GetList>
</Transaction>
<Validation Name="ValidateClosableLockoutTagoutRequestLinesFound" Condition="${LockoutTagoutRequestLines.Count} != 0" MessageCode="3200" />
<Assign Name="Set NewStatus to Removed" Property="${NewStatus}" Value="LockoutTagoutRequestLineStatus.Removed" />
</When>
<Otherwise Name="Otherwise, status should be Active (using otherwise as catch all for safety)">
<Validation Name="ValidateLockoutTagoutRequestHasStatusToPlace" Condition="False" MessageCode="3199">
<Parameter Name="LockoutTagoutRequest" Direction="In" Value="${LockoutTagoutRequest}" />
</Validation>
</Otherwise>
</Choose>
<Transaction>
<ForEach Name="For each line to update" In="${LockoutTagoutRequestLines}" As="LockoutTagoutRequestLine">
<ChangeStatus Name="Change status to Placed or Removed" DomainObject="${LockoutTagoutRequestLine}" NewStatus="${NewStatus}" />
</ForEach>
</Transaction>
<UserContent Name="Post" />
</Execution>
</Workflow>