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

ActionField631

Beschrijving: First check BuildingPartType with ElementType and then that the part-of-structure of Equipment is valid. Custom: Nee

Propertiesbewerken

Property Type Accessor
Equipment Equipment Root

XMLbewerken

<Workflow Name="ActionField631" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
	<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
	<Description>First check BuildingPartType with ElementType and then that the part-of-structure of Equipment is valid.</Description>
	<Properties>
		<Property	Name="Equipment"					Type="Equipment"		Accessor="Root"		Direction="In" />

		<Property	Name="EquipmentIdList"				Type="String"			Accessor="Internal" />
		<Property	Name="EquipmentTypeHierarchyCount"	Type="Int64"			Accessor="Internal" />
		<Property	Name="ErrorType"					Type="PartOfErrorType"	Accessor="Internal" />
		<Property	Name="OtherEquipment"				Type="Equipment"		Accessor="Internal" />
		<Property	Name="Remark"						Type="String"			Accessor="Internal" />
	</Properties>
	<Execution>
		<UserContent Name="Pre" />

		<When Name="Only for context infra" Condition="${Equipment.Context} == EquipmentContext.BuildingPart || ${Equipment.Context} == EquipmentContext.Element">
			<When Name="ElementIsEmpty?" Condition="${Equipment.PartOfEquipment} == Empty">
				<Transaction>
					<Assign Name="Empty element's building part type" Property="${Equipment.EquipmentType}" Value="Empty" />
				</Transaction>

				<Stop Name="Context Element" Mode="EndAll" />
			</When>

			<When Name="EquipmentType" Condition="${Equipment.EquipmentType} != Empty &amp;&amp; ${Equipment.PartOfEquipment} != Empty">
				<Transaction>
					<GetCount Name="Get EquipmentTypeHierarchy" Type="EquipmentTypeHierarchy" OutputProperty="${EquipmentTypeHierarchyCount}">
						<Filters>
							<PropertyFilter	PropertyName="Id.EquipmentType"			Operator="="		PropertyValue="${Equipment.EquipmentType}" />
							<PropertyFilter	PropertyName="Id.PartOfEquipmentType"	Operator="="		PropertyValue="${Equipment.PartOfEquipment.EquipmentType}" />
						</Filters>
					</GetCount>
				</Transaction>

				<When Name="EquipmentTypeHierarchyCount" Condition="${EquipmentTypeHierarchyCount} == 0">
					<Choose Name="Element has equipment type?">
						<When Name="Element has equipment type" Condition="${Equipment.PartOfEquipment.EquipmentType} != Empty">
							<Message Name="Element's equipment type" MessageCode="2333">
								<Parameter	Name="DomainObject"	Direction="In"		Value="${Equipment}" />
							</Message>
						</When>

						<Otherwise Name="Element doesn't have an equipment type">
							<Message Name="Element has no equipment type" MessageCode="2405">
								<Parameter	Name="DomainObject"	Direction="In"		Value="${Equipment}" />
							</Message>
						</Otherwise>
					</Choose>

					<Transaction>
						<Assign Name="Empty element's EquipmentType" Property="${Equipment.EquipmentType}" Value="Empty" />
					</Transaction>

					<Stop Name="Context Element" Mode="EndAll" />
				</When>
			</When>
		</When>

		<When Name="Only for contexts Fleet and Installation" Condition="${Equipment.Context} == EquipmentContext.Fleet || ${Equipment.Context} == EquipmentContext.Installation">
			<WorkflowCall Name="Equipment_InformUserWhenProcessFunctionsDiffer" WorkflowName="Equipment_InformUserWhenProcessFunctionsDiffer">
				<Parameter	Name="Equipment"		Direction="In"		Value="${Equipment}" />
				<Parameter	Name="ProcessFunction"	Direction="In"		Value="${Equipment.ProcessFunction}" />
			</WorkflowCall>
		</When>

		<Transaction>
			<Command Name="Check PartOf" CommandName="DomainObject_CheckPartOf">
				<Parameter	Name="DomainObject"			Direction="In"		Value="${Equipment}" />
				<Parameter	Name="PartOfPropertyName"	Direction="In"		Value="PartOfEquipment" />
				<Parameter	Name="ChainWithPartOfIds"	Direction="Out"								OutputProperty="${EquipmentIdList}" />
				<Parameter	Name="OtherDomainObject"	Direction="Out"								OutputProperty="${OtherEquipment}" />
				<Parameter	Name="PartOfErrorType"		Direction="Out"								OutputProperty="${ErrorType}" />
			</Command>

			<When Name="When parent equipment has a process function" Condition="${Equipment.PartOfEquipment.ProcessFunction?} != Empty">
				<FormatText Name="Create remark" TextCode="3981" OutputProperty="${Remark}">
					<Parameters>
						<Parameter	Name="Equipment"	Direction="In"		Value="${Equipment}" />
					</Parameters>
				</FormatText>

				<Command Name="Build equipment into the parent's process function" CommandName="ProcessFunction_BuildInEquipment">
					<Parameter	Name="Action"					Direction="In"		Value="EquipmentIn" />
					<Parameter	Name="BuildInChildEquipments"	Direction="In"		Value="True" />
					<Parameter	Name="Equipment"				Direction="In"		Value="${Equipment}" />
					<Parameter	Name="IncludeExchangeParts"		Direction="In"		Value="False" />
					<Parameter	Name="InstallDate"				Direction="In"		Value="#{Environment.CurrentDateTime}" />
					<Parameter	Name="InstalledBy"				Direction="In"		Value="#{User.EmployeeId}" />
					<Parameter	Name="ProcessFunction"			Direction="In"		Value="${Equipment.PartOfEquipment.ProcessFunction}" />
					<Parameter	Name="Remark"					Direction="In"		Value="${Remark}" />
				</Command>
			</When>
		</Transaction>

		<UserContent Name="Post" />

		<Choose Name="Check Error Type">
			<When Name="Error Type is Self" Condition="${ErrorType} == Self">
				<Message Name="ErrorSelf" MessageCode="0942">
					<Parameter	Name="Equipment"	Direction="In"		Value="${Equipment}" />
				</Message>
			</When>


			<When Name="Error Type is Other" Condition="${ErrorType} == Other">
				<Message Name="ErrorOther" MessageCode="0966">
					<Parameter	Name="Equipment"		Direction="In"		Value="${Equipment}" />
					<Parameter	Name="OtherEquipment"	Direction="In"		Value="${OtherEquipment}" />
				</Message>
			</When>


			<When Name="Error Type is List" Condition="${ErrorType} == List">
				<Message Name="ErrorList" MessageCode="0967">
					<Parameter	Name="Equipment"		Direction="In"		Value="${Equipment}" />
					<Parameter	Name="EquipmentIdList"	Direction="In"		Value="${EquipmentIdList}" />
					<Parameter	Name="OtherEquipment"	Direction="In"		Value="${OtherEquipment}" />
				</Message>
			</When>
		</Choose>

		<When Name="Only for context infra" Condition="${Equipment.Context} == EquipmentContext.BuildingPart || ${Equipment.Context} == EquipmentContext.Element">
			<WorkflowCall Name="EquipmentOrProcessFunction_CopyMaintenanceState" WorkflowName="EquipmentOrProcessFunction_CopyMaintenanceState">
				<Parameter	Name="CopyFromHigherLevelObject"	Direction="In"		Value="True" />
				<Parameter	Name="DomainObject"					Direction="In"		Value="${Equipment}" />
			</WorkflowCall>
		</When>
	</Execution>
</Workflow>