Categorie: reference
Bijgewerkt: 2026-04-08
actionfield workflow actionfield151
ActionField151
Beschrijving: Set default MeasurementPoint for ProcessFunction. Custom: Nee
Propertiesbewerken
| Property | Type | Accessor |
|---|---|---|
| NewDefaultMeasurementPoint | ProcessFunctionMeasurementPoint | Root |
XMLbewerken
<Workflow Name="ActionField151" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
<Description>Set default MeasurementPoint for ProcessFunction.</Description>
<Properties>
<Property Name="NewDefaultMeasurementPoint" Type="ProcessFunctionMeasurementPoint" Accessor="Root" Direction="In" />
<Property Name="ContinueAnswer" Type="RequestResult" Accessor="Internal" />
<Property Name="LastValue" Type="ProcessFunctionMeasurementPointValue" Accessor="Internal" />
<Property Name="OldDefaultMeasurementPoint" Type="ProcessFunctionMeasurementPoint" Accessor="Internal" />
<Property Name="PmWorkOrderCount" Type="Int64" Accessor="Internal" />
</Properties>
<Execution>
<UserContent Name="Pre" />
<Transaction>
<Command Name="Get default MeasurementPoint" CommandName="ProcessFunction_GetDefaultMeasurementPoint">
<Parameter Name="AddDefaultMeasurementPointIfMissing" Direction="In" Value="False" />
<Parameter Name="ProcessFunction" Direction="In" Value="${NewDefaultMeasurementPoint.Id.ProcessFunction}" />
<Parameter Name="ProcessFunctionMeasurementPoint" Direction="Out" OutputProperty="${OldDefaultMeasurementPoint}" />
</Command>
</Transaction>
<When Name="Check has Old default » Has Old Default" Condition="${OldDefaultMeasurementPoint} != Empty">
<Transaction>
<GetCount Name="Has PmWorkOrders" Type="PmWorkOrder" OutputProperty="${PmWorkOrderCount}">
<Filters>
<PropertyFilter PropertyName="ProcessFunctionMeasurementPoint" Operator="=" PropertyValue="${OldDefaultMeasurementPoint}" />
</Filters>
</GetCount>
</Transaction>
<When Name="Check Has PmWorkOrders" Condition="${PmWorkOrderCount} > 0">
<Question Name="Ask Continue" Type="YesNo" MessageCode="0696" OutputProperty="${ContinueAnswer}">
<Parameter Name="NewProcessFunctionMeasurementPoint" Direction="In" Value="${NewDefaultMeasurementPoint}" />
<Parameter Name="OldProcessFunctionMeasurementPoint" Direction="In" Value="${OldDefaultMeasurementPoint}" />
</Question>
<When Name="Check AnswerNo" Condition="${ContinueAnswer} == No">
<Stop Name="Stop" Mode="Abort" />
</When>
</When>
</When>
<Transaction>
<ForEach Name="Measurement point" In="${NewDefaultMeasurementPoint.Id.ProcessFunction.ProcessFunctionMeasurementPoints}" As="MeasurementPoint">
<Assign Name="Set default to false" Property="${MeasurementPoint.IsDefault}" Value="False" />
</ForEach>
<Assign Name="Set default to true on new measurementpoint" Property="${NewDefaultMeasurementPoint.IsDefault}" Value="True" />
<Command Name="Get Last Value" CommandName="ProcessFunctionMeasurementPoint_GetLastValue">
<Parameter Name="ProcessFunctionMeasurementPoint" Direction="In" Value="${NewDefaultMeasurementPoint}" />
<Parameter Name="LastValue" Direction="Out" OutputProperty="${LastValue}" />
</Command>
<Choose Name="Check Last Value">
<When Name="Has Last Value" Condition="${LastValue} != Empty">
<Assign Name="Set ProcessFunction.IndicatorValue " Property="${NewDefaultMeasurementPoint.Id.ProcessFunction.IndicatorValue}" Value="${LastValue.Value}" />
<Assign Name="Set ProcessFunction.IndicatorValueLastRecordingDate " Property="${NewDefaultMeasurementPoint.Id.ProcessFunction.IndicatorValueLastRecordingDate}" Value="${LastValue.Date}" />
</When>
<Otherwise Name="No Value">
<Assign Name="Set ProcessFunction.IndicatorValue " Property="${NewDefaultMeasurementPoint.Id.ProcessFunction.IndicatorValue}" Value="0" />
<Assign Name="Set ProcessFunction.IndicatorValueLastRecordingDate " Property="${NewDefaultMeasurementPoint.Id.ProcessFunction.IndicatorValueLastRecordingDate}" Value="Empty" />
</Otherwise>
</Choose>
</Transaction>
<UserContent Name="Post" />
</Execution>
</Workflow>