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

ActionField053

Beschrijving: Copy Equipment to another Equipment. Custom: Nee

Propertiesbewerken

Property Type Accessor
ToEquipment Equipment Root
ExtraFieldsToCopy List[String] Optional
MaintenanceClassificationContexts List[Context] Optional
MntcSelectionListConfiguration String Optional
NewRecordStatus Status Optional
PmWorkOrderContext Context Optional

Gerelateerde workflowsbewerken

Workflow Beschrijving
Dialog_Actionfield053_UpdateCopyMaintenanceClassification When Equipment is updated, checks if ProcessFunction should be updated as well.

XMLbewerken

<Workflow Name="ActionField053" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
	<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
	<Description>Copy Equipment to another Equipment.</Description>
	<Properties>
		<Property	Name="ToEquipment"							Type="Equipment"		Accessor="Root"		Direction="In" />

		<Property	Name="ExtraFieldsToCopy"					Type="List[String]"		Accessor="Optional"	Direction="In"																	Comment="Indicate additional columns to be copied" />
		<Property	Name="MaintenanceClassificationContexts"	Type="List[Context]"	Accessor="Optional"	Direction="In"		Default="MaintenanceClassificationContext.MT"				Comment="Only change MaintenanceClassification with these contexts" />
		<Property	Name="MntcSelectionListConfiguration"		Type="String"			Accessor="Optional"	Direction="In"		Default="Default"											Comment="Set the ViewFieldConfig for the MaintenanceClassification selection list" />
		<Property	Name="NewRecordStatus"						Type="Status"			Accessor="Optional"	Direction="In"		Default="EquipmentStatus.Active"							Comment="Set this status to the Equipment" />
		<Property	Name="PmWorkOrderContext"					Type="Context"			Accessor="Optional"	Direction="In"		Default="PmWorkOrderContext.Instrument"						Comment="Create PmWorkOrder with this context" />

		<Property	Name="CopyCode"								Type="Boolean"			Accessor="Internal"						Default="False"												Comment="Applicable to context Fleet only." />
		<Property	Name="CopyCodeLabelCode"					Type="UltimoString"		Accessor="Internal" />
		<Property	Name="CopyEquipment"						Type="RequestResult"	Accessor="Internal" />
		<Property	Name="CopyImages"							Type="Boolean"			Accessor="Internal"						Default="True"												Comment="Default will be set to False later on in case of Fleet object, but can be ticked again in dialog CopyOptions." />
		<Property	Name="CopyInstallDate"						Type="Boolean"			Accessor="Internal"						Default="True" />
		<Property	Name="CopyMaintenanceClassification"		Type="Boolean"			Accessor="Internal"						Default="True" />
		<Property	Name="CopyManufactureYear"					Type="Boolean"			Accessor="Internal"						Default="True" />
		<Property	Name="DefaultProgressStatusForContext"		Type="ProgressStatus"	Accessor="Internal" />
		<Property	Name="FromEquipment"						Type="Equipment"		Accessor="Internal"						Default="${ToEquipment.CopyFromEquipment}" />
		<Property	Name="IsFleet"								Type="Boolean"			Accessor="Internal"						Default="=${ToEquipment.Context} == EquipmentContext.Fleet" />
		<Property	Name="LabelCode"							Type="UltimoString"		Accessor="Internal"																					Comment="LabelCode for InstallDate, keep existing property name" />
		<Property	Name="ObjectHasImages"						Type="Boolean"			Accessor="Internal" />
		<Property	Name="ObjectHasMaintenanceClassification"	Type="Boolean"			Accessor="Internal" />
		<Property	Name="ProgressStatusContext"				Type="Context"			Accessor="Internal" />
		<Property	Name="ShowOptionsForFleet"					Type="Boolean"			Accessor="Internal" />
	</Properties>
	<Execution>
		<UserContent Name="Pre" />

		<Validation Name="Has CopyFromEquipment" Condition="${FromEquipment} != Empty" MessageCode="0964">
			<Parameter	Name="ToEquipment"	Direction="In"		Value="${ToEquipment}" />
		</Validation>

		<Question Name="Copy equipment?" Type="YesNo" MessageCode="0131" Default="Yes" OutputProperty="${CopyEquipment}">
			<Parameter	Name="ToEquipment"	Direction="In"		Value="${ToEquipment}" />
		</Question>

		<Validation Name="Check To and From are not the same" Condition="${ToEquipment} != ${FromEquipment}" MessageCode="0001">
			<Parameter	Name="ToEquipment"	Direction="In"		Value="${ToEquipment}" />
		</Validation>

		<When Name="Check copy equipment answer » Answer is yes" Condition="${CopyEquipment} == Yes">
			<When Name="Is it a Fleet object?" Condition="${IsFleet} == True">
				<When Name="Are there properties to copy?" Condition="${FromEquipment.Code} != Empty || ${FromEquipment.SerialNumber} != Empty || ${FromEquipment.ImageFile} != Empty || ${FromEquipment.ImageFile2} != Empty || ${FromEquipment.ImageFile3} != Empty || ${FromEquipment.ImageFile4} != Empty">
					<Assign Name="Assign ShowOptionsForFleet" Property="${ShowOptionsForFleet}" Value="True" />
				</When>
			</When>

			<Assign Name="Assign ObjectHasMaintenanceClassification" Property="${ObjectHasMaintenanceClassification}" Value="=${FromEquipment.MaintenanceClassification} != Empty" />
			<Assign Name="Assign CopyMaintenanceClassification" Property="${CopyMaintenanceClassification}" Value="=${ObjectHasMaintenanceClassification} == True" />
			<Assign Name="ObjectHasImages" Property="${ObjectHasImages}" Value="=(${FromEquipment.ImageFile} != Empty || ${FromEquipment.ImageFile2} != Empty || ${FromEquipment.ImageFile3} != Empty || ${FromEquipment.ImageFile4} != Empty) == True" />

			<When Name="Only dialog if there's something to select" Condition="${FromEquipment.InstallDate} != Empty || ${FromEquipment.ManufactureYear} != 0 || ${ObjectHasMaintenanceClassification} == True || ${ShowOptionsForFleet} == True">
				<Choose Name="Check ToEquipment is a Fleet object">
					<When Name="Is it a Fleet object?" Condition="${IsFleet} == True">
						<Choose Name="Check if this is a fleet object or equipment">
							<When Name="When it's a fleet object/vehicle (Not an ExchangePart)" Condition="${FromEquipment.ExchangePart} == False">
								<Assign Name="Set vehicle LabelCode" Property="${LabelCode}" Value="LICENSEPLATEISSUEDATE" />
								<Assign Name="Set vehicle CopyCodeLabelCode" Property="${CopyCodeLabelCode}" Value="LICENSEPLATE" />
							</When>

							<Otherwise Name="Otherwise fleet equipment (ExchangePart)">
								<Assign Name="Set exchangepart LabelCode" Property="${LabelCode}" Value="INSTALLATION_DATE" />
								<Assign Name="Set exchangepart CopyCodeLabelCode" Property="${CopyCodeLabelCode}" Value="CODE" />
							</Otherwise>
						</Choose>

						<Assign Name="Must be set explicitly in dialog" Property="${CopyImages}" Value="False" />
					</When>

					<Otherwise Name="non-Fleet object">
						<Assign Name="Set non Fleet InstallDate LabelCode" Property="${LabelCode}" Value="INSTALLATION_DATE" />
					</Otherwise>
				</Choose>

				<Dialog Name="CopyOptions" TitleCode="COPYOPTIONS">
					<Container>
						<CheckBox Name="ManufactureYear" Visible="=${FromEquipment.ManufactureYear} != 0" Value="${CopyManufactureYear}" OutputProperty="${CopyManufactureYear}" LabelCode="YEAR_OF_CONSTRUCTION" />

						<CheckBox Name="InstallDate" Visible="=${FromEquipment.InstallDate} != Empty" Value="${CopyInstallDate}" OutputProperty="${CopyInstallDate}" LabelCode="${LabelCode}" />

						<CheckBox Name="LicensePlateNumberOrCode" Visible="=${IsFleet} == True &amp;&amp; ${FromEquipment.Code} != Empty" Value="${CopyCode}" OutputProperty="${CopyCode}" LabelCode="${CopyCodeLabelCode}" />

						<CheckBox Name="Images" Visible="${ObjectHasImages}" Value="=${CopyImages} == True" OutputProperty="${CopyImages}" LabelCode="IMAGES" />

						<CheckBox Name="MaintenanceClassification" Visible="=${ObjectHasMaintenanceClassification} == True" Value="${CopyMaintenanceClassification}" OutputProperty="${CopyMaintenanceClassification}" ReadOnly="=(${CopyInstallDate}==false)" LabelCode="MAINTENANCECLASSIFICATION2" />
					</Container>
					<Updates>
						<UpdateWorkflow Name="Dialog_Actionfield053_UpdateCopyMaintenanceClassification" WorkflowName="Dialog_Actionfield053_UpdateCopyMaintenanceClassification">
							<Parameter	Name="CopyInstallDate"					Direction="In"		Value="${CopyInstallDate}" />
							<Parameter	Name="CopyMaintenanceClassification"	Direction="InOut"	Value="${CopyMaintenanceClassification}"	OutputProperty="${CopyMaintenanceClassification}" />
						</UpdateWorkflow>
					</Updates>
				</Dialog>
			</When>

			<Choose Name="How to handle IndividualPM">
				<When Name="GroupPM but no InstallDate" Condition="${CopyMaintenanceClassification} == True &amp;&amp; ${FromEquipment.IndividualPM} == False &amp;&amp; ${FromEquipment.InstallDate} == Empty">
					<Message Name="No periodic activities can be generated" MessageCode="3209">
						<Parameter	Name="FromEquipment"	Direction="In"		Value="${FromEquipment}" />
						<Parameter	Name="ToEquipment"		Direction="In"		Value="${ToEquipment}" />
					</Message>

					<Assign Name="Turn IndividualPM on" Property="${ToEquipment.IndividualPM}" Value="True" />
				</When>

				<Otherwise>
					<Assign Name="Copy IndividualPM" Property="${ToEquipment.IndividualPM}" Value="${FromEquipment.IndividualPM}" />
				</Otherwise>
			</Choose>

			<Transaction>
				<Command Name="Copy equipment" CommandName="Equipment_Copy">
					<Parameter	Name="CopyImages"						Direction="In"		Value="${CopyImages}" />
					<Parameter	Name="CopyInstallDate"					Direction="In"		Value="${CopyInstallDate}" />
					<Parameter	Name="CopyLicensePlateNumber"			Direction="In"		Value="${CopyCode}" />
					<Parameter	Name="CopyMaintenanceClassification"	Direction="In"		Value="${CopyMaintenanceClassification}" />
					<Parameter	Name="CopyManufactureYear"				Direction="In"		Value="${CopyManufactureYear}" />
					<Parameter	Name="ExtraFieldsToCopy"				Direction="In"		Value="${ExtraFieldsToCopy}" />
					<Parameter	Name="ToEquipment"						Direction="In"		Value="${ToEquipment}" />
				</Command>

				<When Name="Copy MaintenanceClassification" Condition="${CopyMaintenanceClassification} == True">
					<WorkflowCall Name="ChangeMaintenanceClassification" WorkflowName="Equipment_ChangeMaintenanceClassification">
						<Parameter	Name="AutoAnswerMaintenanceClassification"					Direction="In"		Value="${FromEquipment.MaintenanceClassification}" />
						<Parameter	Name="AutoAnswerQuestionChangeMaintenanceClassification"	Direction="In"		Value="Yes"											Comment="No question allowed inside current transaction" />
						<Parameter	Name="Equipment"											Direction="In"		Value="${ToEquipment}" />
						<Parameter	Name="MaintenanceClassificationContexts"					Direction="In"		Value="${MaintenanceClassificationContexts}" />
						<Parameter	Name="MergeFeatures"										Direction="In"		Value="True"										Comment="Preserve existing equipment features" />
						<Parameter	Name="MntcSelectionListConfiguration"						Direction="In"		Value="${MntcSelectionListConfiguration}" />
						<Parameter	Name="PmWorkOrderContext"									Direction="In"		Value="${PmWorkOrderContext}" />
						<Parameter	Name="ShowResultMessage"									Direction="In"		Value="False"										Comment="No message allowed inside current transaction" />
					</WorkflowCall>
				</When>

				<Assign Name="Reset CopyFromEquipment" Property="${ToEquipment.CopyFromEquipment}" Value="Empty" />

				<When Name="Check new status » New status passed" Condition="${NewRecordStatus} != EquipmentStatus.None">
					<When Name="Check progress status of from equipment" Condition="${FromEquipment.ProgressStatus} != Empty">
						<WorkflowCall Name="DomainObject_GetProgressStatusContext" WorkflowName="DomainObject_GetProgressStatusContext">
							<Parameter	Name="DomainObject"				Direction="In"		Value="${ToEquipment}" />
							<Parameter	Name="ProgressStatusContext"	Direction="Out"								OutputProperty="${ProgressStatusContext}" />
						</WorkflowCall>

						<Command Name="Get progress status to set" CommandName="GetDefaultProgressStatusForRecordStatusLinkedToEntityWithStandardContext">
							<Parameter	Name="ProgressStatusContext"			Direction="In"		Value="${ProgressStatusContext}" />
							<Parameter	Name="RecordStatus"						Direction="In"		Value="${NewRecordStatus}" />
							<Parameter	Name="TableName"						Direction="In"		Value="EQUIPMENT" />
							<Parameter	Name="DefaultProgressStatusForContext"	Direction="Out"											OutputProperty="${DefaultProgressStatusForContext}" />
						</Command>

						<Assign Name="Sets progress status" Property="${ToEquipment.ProgressStatus}" Value="${DefaultProgressStatusForContext}" />
					</When>

					<ChangeStatus Name="Change status" DomainObject="${ToEquipment}" NewStatus="${NewRecordStatus}" />
				</When>
			</Transaction>

			<UserContent Name="Post" />

			<Message Name="Equipment copied" MessageCode="0134">
				<Parameter	Name="EquipmentContext"	Direction="In"		Value="${ToEquipment.Context}" />
			</Message>
		</When>
	</Execution>
</Workflow>

Sub-workflow XMLbewerken

Dialog_Actionfield053_UpdateCopyMaintenanceClassificationbewerken

Beschrijving: When Equipment is updated, checks if ProcessFunction should be updated as well.

<Workflow Name="Dialog_Actionfield053_UpdateCopyMaintenanceClassification" Version="2025.07.28" WorkflowType="Standard" AllowUserInteraction="False" xmlns="urn:Ultimo.Framework.Workflow-mapping">
	<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
	<Description>When Equipment is updated, checks if ProcessFunction should be updated as well.</Description>
	<Properties>
		<Property	Name="CopyInstallDate"					Type="Boolean"	Accessor="Required"	Direction="In" />

		<Property	Name="CopyMaintenanceClassification"	Type="Boolean"	Accessor="Required"	Direction="InOut" />
	</Properties>
	<Execution>
		<UserContent Name="Pre" />

		<When Name="If CopyInstallDate is false" Condition="${CopyInstallDate} == False">
			<Assign Name="Set CopyMaintenanceClassification" Property="${CopyMaintenanceClassification}" Value="False" />
		</When>

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