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

ActionField1588

Beschrijving: Synchronizes the RiskClass with LongTermAsset. Custom: Nee

Propertiesbewerken

Property Type Accessor
DomainObject DomainObject Root

XMLbewerken

<Workflow Name="ActionField1588" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
	<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
	<Description>Synchronizes the RiskClass with LongTermAsset.</Description>
	<Properties>
		<Property	Name="DomainObject"			Type="DomainObject"			Accessor="Root"		Direction="In" />

		<Property	Name="LongTermAssets"		Type="List[LongTermAsset]"	Accessor="Internal" />
		<Property	Name="UpdateLongTermAsset"	Type="RequestResult"		Accessor="Internal" />
	</Properties>
	<Execution>
		<UserContent Name="Pre" />

		<When Name="DomainObject is a piece of Equipment or a Process Function" Condition="${DomainObject.EntityName} == Equipment || ${DomainObject.EntityName} == ProcessFunction">
			<Transaction>
				<GetList Name="Get LTA" Type="LongTermAsset" OutputProperty="${LongTermAssets}" OrderBy="Id" OrderDirection="Ascending" Comment="There should be only one!">
					<Filters>
						<WhenFilter Condition="${DomainObject.EntityName} == Equipment">
							<PropertyFilter	PropertyName="Equipment"	Operator="="		PropertyValue="${DomainObject}" />
						</WhenFilter>
						<WhenFilter Condition="${DomainObject.EntityName} == ProcessFunction">
							<PropertyFilter	PropertyName="ProcessFunction"	Operator="="		PropertyValue="${DomainObject}" />
						</WhenFilter>
					</Filters>
				</GetList>
			</Transaction>

			<ForEach Name="LTA" In="${LongTermAssets}" As="LongTermAsset">
				<Choose Name="Check if RiskScore and RiskClass currently set or not">
					<When Name="When currently set" Condition="${LongTermAsset.RiskScore} != 0 || ${LongTermAsset.RiskClass} != Empty">
						<Question Name="AskIfLongTermAssetShouldBeUpdated" Type="YesNo" MessageCode="2972" Default="Yes" OutputProperty="${UpdateLongTermAsset}">
							<Parameter	Name="LongTermAsset"	Direction="In"		Value="${LongTermAsset}" />
						</Question>
					</When>

					<Otherwise Name="Otherwise, not currently set">
						<Question Name="AskIfLongTermAssetShouldBeSet" Type="YesNo" MessageCode="2973" Default="Yes" OutputProperty="${UpdateLongTermAsset}">
							<Parameter	Name="LongTermAsset"	Direction="In"		Value="${LongTermAsset}" />
						</Question>
					</Otherwise>
				</Choose>

				<When Name="When LongTermAsset should be updated" Condition="${UpdateLongTermAsset} == True">
					<WorkflowCall Name="DomainObject_SynchronizeRiskWithLongTermAsset" WorkflowName="DomainObject_SynchronizeRiskWithLongTermAsset">
						<Parameter	Name="DomainObject"			Direction="In"		Value="${DomainObject}" />
						<Parameter	Name="SynchronizeRiskScore"	Direction="In"		Value="False" />
					</WorkflowCall>
				</When>
			</ForEach>
		</When>

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