Categorie: reference Bijgewerkt: 2026-04-08 actionfield workflow actionfield1673

ActionField1673

Beschrijving: Select a unique PnID and attach it to the approved LockoutTagoutPlan. Custom: Nee

Propertiesbewerken

Property Type Accessor
LockoutTagoutPlan LockoutTagoutPlan Root

XMLbewerken

<Workflow Name="ActionField1673" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
	<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
	<Description>Select a unique PnID and attach it to the approved LockoutTagoutPlan.</Description>
	<Properties>
		<Property	Name="LockoutTagoutPlan"	Type="LockoutTagoutPlan"	Accessor="Root"		Direction="In"		Comment="The LockoutTagoutPlan to attach the PnID to" />

		<Property	Name="InsertedPlotPlan"		Type="PlotPlan"				Accessor="Internal" />
		<Property	Name="SelectedPlotPlan"		Type="PlotPlan"				Accessor="Internal" />
		<Property	Name="SqlWhereClause"		Type="String"				Accessor="Internal" />
	</Properties>
	<Execution>
		<UserContent Name="Pre" />

		<Validation Name="LockoutTagoutPlan must have status Open to link a PnID" Condition="${LockoutTagoutPlan.Status} == LockoutTagoutPlanStatus.Open" MessageCode="3226">
			<Parameter	Name="LockoutTagoutPlan"	Direction="In"		Value="${LockoutTagoutPlan}" />
		</Validation>

		<Comment><![CDATA[ Exclude the P&IDs that are already attached to this LockoutTagoutPlan. PpContext 32 = PlotPlanContext.LockoutTagout. ]]></Comment>

		<Assign Name="Build sql where clause for selection list" Property="${SqlWhereClause}" Value="PpContext = 32 AND PpLtrId IS NULL AND PpLtpId IS NULL AND PpId NOT IN (SELECT a.PpCopyFromPpId FROM dba.PlotPlan a WHERE a.PpContext = 32 AND a.PpLtpId = '${LockoutTagoutPlan.Id}' AND a.PpCopyFromPpId IS NOT NULL)" />

		<SystemDialog Name="Select a LockoutTagoutPlan to add" DialogName="SelectDomainObject" Comment="Enable user to select a unique PnID.">
			<Parameter	Name="IsSystem"						Direction="In"		Value="True" />
			<Parameter	Name="SelectionListConfiguration"	Direction="In"		Value="Default" />
			<Parameter	Name="SqlWhereClause"				Direction="In"		Value="${SqlWhereClause}" />
			<Parameter	Name="TableName"					Direction="In"		Value="PlotPlan" />
			<Parameter	Name="DomainObject"					Direction="Out"									OutputProperty="${SelectedPlotPlan}" />
		</SystemDialog>

		<Transaction>
			<Insert Name="Insert a copy of SelectedPlotPlan into PlotPlan" ObjectType="PlotPlan" OutputProperty="${InsertedPlotPlan}">
				<Parameter	Name="Context"				Direction="In"		Value="${SelectedPlotPlan.Context}" />
				<Parameter	Name="Status"				Direction="In"		Value="${SelectedPlotPlan.Status}" />
				<Parameter	Name="CopyFromPlotPlan"		Direction="In"		Value="${SelectedPlotPlan}"				Comment="Used to exclude this PnID from the selection list." />
				<Parameter	Name="Description"			Direction="In"		Value="${SelectedPlotPlan.Description}" />
				<Parameter	Name="ImageFile"			Direction="In"		Value="${SelectedPlotPlan.ImageFile}" />
				<Parameter	Name="LockoutTagoutPlan"	Direction="In"		Value="${LockoutTagoutPlan}" />
				<Parameter	Name="LockoutTagoutRequest"	Direction="In"		Value="Empty" />
				<Parameter	Name="Site"					Direction="In"		Value="${SelectedPlotPlan.Site}" />
			</Insert>
		</Transaction>

		<UserContent Name="Post" />
	</Execution>
</Workflow>