Categorie: reference
Bijgewerkt: 2026-04-08
actionfield workflow actionfield916
ActionField916
Beschrijving: Toggle NotApplicable of ObjectInspectionPlan. Custom: Nee
Propertiesbewerken
| Property | Type | Accessor |
|---|---|---|
| ObjectInspectionPlan | ObjectInspectionPlan | Root |
XMLbewerken
<Workflow Name="ActionField916" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
<Description>Toggle NotApplicable of ObjectInspectionPlan.</Description>
<Properties>
<Property Name="ObjectInspectionPlan" Type="ObjectInspectionPlan" Accessor="Root" Direction="In" />
<Property Name="ChangeAllowed" Type="Boolean" Accessor="Internal" />
<Property Name="Count" Type="Int64" Accessor="Internal" />
<Property Name="Employee" Type="Employee" Accessor="Internal" Default="#{User.EmployeeId}" />
<Property Name="ObjectInspectionLines" Type="List[ObjectInspectionLine]" Accessor="Internal" />
<Property Name="Revert" Type="Boolean" Accessor="Internal" Default="False" />
<Property Name="ShowNoHighRiskNeeded" Type="Boolean" Accessor="Internal" />
</Properties>
<Execution>
<UserContent Name="Pre" />
<When Name="Has checkbox NotApplicable been ticked?" Condition="${ObjectInspectionPlan.NotApplicable} == True">
<Transaction>
<GetCount Name="Count option lines having checkbox Applicable ticked" Type="ObjectInspectionLine" OutputProperty="${Count}" Comment="Regardless of ApplicableEmployee.">
<Filters>
<CombinedFilter FilterOperator="And">
<PropertyFilter PropertyName="Id.ObjectInspectionPlan" Operator="=" PropertyValue="${ObjectInspectionPlan}" />
<PropertyFilter PropertyName="Applicable" Operator="=" PropertyValue="True" />
</CombinedFilter>
</Filters>
</GetCount>
<When Name="Applicable option lines found?" Condition="${Count} > 0">
<Assign Name="Untick checkbox NotApplicable" Property="${ObjectInspectionPlan.NotApplicable}" Value="False" />
</When>
</Transaction>
<Validation Name="No applicable option lines are found." Condition="${Count} == 0" MessageCode="3358">
<Parameter Name="Count" Direction="In" Value="${Count}" />
<Parameter Name="ObjectInspectionPlan" Direction="In" Value="${ObjectInspectionPlan}" />
</Validation>
</When>
<Transaction>
<When Name="CheckSetBySomeOneElse" Condition="${ObjectInspectionPlan.NotApplicable} == True && ${ObjectInspectionPlan.Permit} != Empty && ${ObjectInspectionPlan.Permit.Status} != PermitStatus.Created">
<GetCount Name="Count Highrisk lines" Type="ObjectInspectionLine" OutputProperty="${Count}">
<Filters>
<CombinedFilter FilterOperator="And">
<PropertyFilter PropertyName="Id.ObjectInspectionPlan" Operator="=" PropertyValue="${ObjectInspectionPlan}" />
<PropertyFilter PropertyName="Done" Operator="=" PropertyValue="True" />
<NotFilter>
<PropertyFilter PropertyName="DoneEmployee" Operator="=" PropertyValue="${Employee}" Comment="Not the current user.employee." />
</NotFilter>
</CombinedFilter>
</Filters>
</GetCount>
<When Name="Items from someone else found" Condition="${Count} != 0">
<WorkflowCall Name="aren't we allowed after all?" WorkflowName="Employee_ConfirmationRoleCheckChangeAllowed">
<Parameter Name="Employee" Direction="In" Value="${Employee}" />
<Parameter Name="ChangeAllowed" Direction="Out" OutputProperty="${ChangeAllowed}" />
</WorkflowCall>
<When Name="Change Allowed" Condition="${ChangeAllowed} == False">
<Assign Name="Set Revert true" Property="${Revert}" Value="True" />
</When>
</When>
</When>
<Choose Name=" Choose Revert">
<When Name="Should Revert" Condition="${Revert} == True">
<Assign Name="Revert" Property="${ObjectInspectionPlan.NotApplicable}" Value="False" />
</When>
<Otherwise Name="Revert is not required">
<GetList Name="Lines that need to be reset" Type="ObjectInspectionLine" OutputProperty="${ObjectInspectionLines}" OrderBy="Id" OrderDirection="Ascending">
<Filters>
<PropertyFilter PropertyName="Id.ObjectInspectionPlan" Operator="=" PropertyValue="${ObjectInspectionPlan}" />
</Filters>
</GetList>
<GetCount Name="Count Highrisk lines now" Type="ObjectInspectionLine" OutputProperty="${Count}">
<Filters>
<CombinedFilter FilterOperator="And">
<PropertyFilter PropertyName="SetsPermitHighRisk" Operator="=" PropertyValue="True" />
<PropertyFilter PropertyName="Id.ObjectInspectionPlan" Operator="=" PropertyValue="${ObjectInspectionPlan}" />
</CombinedFilter>
</Filters>
</GetCount>
<ForEach Name="Line" In="${ObjectInspectionPlan.InspectionLines}" As="Line">
<Assign Name="set NotApplicable" Property="${Line.NotApplicable}" Value="${ObjectInspectionPlan.NotApplicable}" />
<When Name="Clear NotApplicable" Condition="${ObjectInspectionPlan.NotApplicable} == True">
<Assign Name="clear Applicable" Property="${Line.Applicable}" Value="False" />
<Assign Name="clear Done" Property="${Line.Done}" Value="False" />
<Assign Name="clear RemarkText" Property="${Line.RemarkText}" Value="Empty" />
<WorkflowCall Name="Done values" WorkflowName="ObjectInspectionLine_SetDoneValues">
<Parameter Name="ObjectInspectionLine" Direction="In" Value="${Line}" />
</WorkflowCall>
<WorkflowCall Name="Applicable values" WorkflowName="ObjectInspectionLine_SetApplicableValues">
<Parameter Name="Applicable" Direction="In" Value="${Line.Applicable}" />
<Parameter Name="ObjectInspectionLine" Direction="In" Value="${Line}" />
</WorkflowCall>
</When>
</ForEach>
<When Name="Might show no high risk message" Condition="${Count} != 0">
<When Name="Check High Risk" Condition="${ObjectInspectionPlan.Permit} != Empty && ${ObjectInspectionPlan.Permit.HighRisk} == True && ${ObjectInspectionPlan.NotApplicable} == True && ${ObjectInspectionPlan.Permit.HighRiskEmployee} == Empty">
<GetCount Name="Count Highrisk lines" Type="ObjectInspectionLine" OutputProperty="${Count}">
<Filters>
<CombinedFilter FilterOperator="And">
<PropertyFilter PropertyName="SetsPermitHighRisk" Operator="=" PropertyValue="True" />
<PropertyFilter PropertyName="Applicable" Operator="=" PropertyValue="True" />
<PropertyFilter PropertyName="Permit" Operator="=" PropertyValue="${ObjectInspectionPlan.Permit}" />
</CombinedFilter>
</Filters>
</GetCount>
<When Name="Should show no high risk message" Condition="${Count} == 0">
<Assign Name="Set Show to true" Property="${ShowNoHighRiskNeeded}" Value="True" />
</When>
</When>
</When>
<When Name="Permit" Condition="${ObjectInspectionPlan.Permit} != Empty">
<WorkflowCall Name="Permit_ChangeRequiredConfirmationRoles" WorkflowName="Permit_ChangeRequiredConfirmationRoles">
<Parameter Name="Permit" Direction="In" Value="${ObjectInspectionPlan.Permit}" />
</WorkflowCall>
</When>
</Otherwise>
</Choose>
</Transaction>
<UserContent Name="Post" />
<Choose Name="Message to show">
<When Name="Should show revert message" Condition="${Revert} == True">
<Message Name="Reverted" MessageCode="1685">
<Parameter Name="ObjectInspectionPlan" Direction="In" Value="${ObjectInspectionPlan}" />
</Message>
</When>
<When Name="Should show no option" Condition="${ShowNoHighRiskNeeded} == True">
<Message Name="Show message ShowNoHighRiskNeeded" MessageCode="1686">
<Parameter Name="ObjectInspectionPlan" Direction="In" Value="${ObjectInspectionPlan}" />
</Message>
</When>
</Choose>
</Execution>
</Workflow>