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

ActionField1661

Beschrijving: Create a LockoutTagoutRequest based on a Permit/Job and link them Custom: Nee

Propertiesbewerken

Property Type Accessor
DomainObject DomainObject Root

XMLbewerken

<Workflow Name="ActionField1661" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
	<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
	<Description>Create a LockoutTagoutRequest based on a Permit/Job and link them</Description>
	<Properties>
		<Property	Name="DomainObject"					Type="DomainObject"					Accessor="Root"		Direction="In"		Comment="the Permit/Job the LockoutTagoutRequest must be created for" />

		<Property	Name="LockoutTagoutRequest"			Type="LockoutTagoutRequest"			Accessor="Internal"						Comment="this will contain the created LOTO-request" />
		<Property	Name="ObjectLockoutTagoutRequest"	Type="ObjectLockoutTagoutRequest"	Accessor="Internal"						Comment="this will contain the link between the two" />
	</Properties>
	<Execution>
		<UserContent Name="Pre" />

		<Choose Name="type of DomainObject">
			<When Name="Permit" Condition="${DomainObject.EntityName} == Permit">
				<Validation Name="ValidatePermitHasCorrectStatus" Condition="(${DomainObject.Status} &amp; (PermitStatus.Created | PermitStatus.Requested)) &gt; 0" MessageCode="3184">
					<Parameter	Name="DomainObject"	Direction="In"		Value="${DomainObject}" />
				</Validation>
			</When>


			<When Name="Job" Condition="${DomainObject.EntityName} == Job">
				<Validation Name="ValidateJobHasCorrectStatus" Condition="(${DomainObject.Status} &amp; (JobStatus.Created | JobStatus.Approved)) &gt; 0" MessageCode="3184">
					<Parameter	Name="DomainObject"	Direction="In"		Value="${DomainObject}" />
				</Validation>
			</When>

			<Otherwise Name="not implemented">
				<Stop Name="Stop" Mode="Abort" />
			</Otherwise>
		</Choose>

		<Validation Name="ValidateLOTOApplicableIsSetOnDomainObject" Condition="${DomainObject.LockoutTagoutApplicable} == True" MessageCode="3183">
			<Parameter	Name="DomainObject"	Direction="In"		Value="${DomainObject}" />
		</Validation>

		<Comment><![CDATA[ now create a LockoutTagoutRequest and link it to the DomainObject through an ObjectLockoutTagoutRequest ]]></Comment>

		<Transaction>
			<Insert Name="create the LockoutTagoutRequest" ObjectType="LockoutTagoutRequest" OutputProperty="${LockoutTagoutRequest}">
				<Parameter	Name="Context"			Direction="In"		Value="LockoutTagoutRequestContext.Standard" />
				<Parameter	Name="Status"			Direction="In"		Value="LockoutTagoutRequestStatus.Open" />
				<Parameter	Name="Equipment"		Direction="In"		Value="${DomainObject.Equipment}" />
				<Parameter	Name="ProcessFunction"	Direction="In"		Value="${DomainObject.ProcessFunction}" />
				<Parameter	Name="Site"				Direction="In"		Value="${DomainObject.Site}" />
			</Insert>

			<Insert Name="link them through this" ObjectType="ObjectLockoutTagoutRequest" OutputProperty="${ObjectLockoutTagoutRequest}">
				<Parameter	Name="LockoutTagoutRequest"	Direction="In"		Value="${LockoutTagoutRequest}" />
			</Insert>

			<Choose Name="type of DomainObject">
				<When Name="Permit" Condition="${DomainObject.EntityName} == Permit">
					<Assign Name="set Permit on ObjectLockoutTagoutRequest" Property="${ObjectLockoutTagoutRequest.Permit}" Value="${DomainObject}" />
				</When>


				<When Name="Job" Condition="${DomainObject.EntityName} == Job">
					<Assign Name="set Job on ObjectLockoutTagoutRequest" Property="${ObjectLockoutTagoutRequest.Job}" Value="${DomainObject}" />
				</When>
			</Choose>
		</Transaction>

		<UserContent Name="Post" />

		<View Name="Open the new LockoutTagoutRequest" ViewName="DataEntryScreen">
			<Parameter	Name="DomainObject"	Direction="In"		Value="${LockoutTagoutRequest}" />
		</View>
	</Execution>
</Workflow>