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

ActionField1284

Beschrijving: Create a PmWorkOrder for an ObjectImportedPreventiveMaintenanceTask and open the PmWorkOrder Custom: Nee

Propertiesbewerken

Property Type Accessor
ObjectImportedPreventiveMaintenanceTask ObjectImportedPreventiveMaintenanceTask Root
PmWorkOrderContext Context? Optional

XMLbewerken

<Workflow Name="ActionField1284" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
	<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
	<Description>Create a PmWorkOrder for an ObjectImportedPreventiveMaintenanceTask and open the PmWorkOrder</Description>
	<Properties>
		<Property	Name="ObjectImportedPreventiveMaintenanceTask"	Type="ObjectImportedPreventiveMaintenanceTask"	Accessor="Root"		Direction="In" />

		<Property	Name="PmWorkOrderContext"						Type="Context?"									Accessor="Optional"	Direction="In"		Default="PmWorkOrderContext.Standard" />

		<Property	Name="CostCenter"								Type="CostCenter"								Accessor="Internal" />
		<Property	Name="Department"								Type="Department"								Accessor="Internal" />
		<Property	Name="PmWorkOrder"								Type="PmWorkOrder"								Accessor="Internal" />
		<Property	Name="Site"										Type="Site"										Accessor="Internal" />
	</Properties>
	<Execution>
		<UserContent Name="Pre" />

		<Validation Name="ObjectImportedPreventiveMaintenanceTask should not have a PmWorkorder" Condition="${ObjectImportedPreventiveMaintenanceTask.PmWorkOrder} == Empty" MessageCode="2691">
			<Parameter	Name="ObjectImportedPreventiveMaintenanceTask"	Direction="In"		Value="${ObjectImportedPreventiveMaintenanceTask}" />
			<Parameter	Name="PmWorkOrderContext"						Direction="In"		Value="${PmWorkOrderContext}" />
		</Validation>

		<Choose Name="Equipment or ProcessFunction">
			<When Name="Equipment" Condition="${ObjectImportedPreventiveMaintenanceTask.Equipment} != Empty">
				<Assign Name="Set Department" Property="${Department}" Value="${ObjectImportedPreventiveMaintenanceTask.Equipment.Department}" />
				<Assign Name="Set CostCenter" Property="${CostCenter}" Value="${ObjectImportedPreventiveMaintenanceTask.Equipment.CostCenter}" />
				<Assign Name="Set Site" Property="${Site}" Value="${ObjectImportedPreventiveMaintenanceTask.Equipment.Site}" />
			</When>


			<When Name="ProcessFunction" Condition="${ObjectImportedPreventiveMaintenanceTask.ProcessFunction} != Empty">
				<Assign Name="Set Department" Property="${Department}" Value="${ObjectImportedPreventiveMaintenanceTask.ProcessFunction.Department}" />
				<Assign Name="Set CostCenter" Property="${CostCenter}" Value="${ObjectImportedPreventiveMaintenanceTask.ProcessFunction.CostCenter}" />
				<Assign Name="Set Site" Property="${Site}" Value="${ObjectImportedPreventiveMaintenanceTask.ProcessFunction.Site}" />
			</When>
		</Choose>

		<Transaction>
			<Insert Name="Create PmWorkOrder" ObjectType="PmWorkOrder" OutputProperty="${PmWorkOrder}">
				<Parameter	Name="Context"			Direction="In"		Value="${PmWorkOrderContext}" />
				<Parameter	Name="Status"			Direction="In"		Value="PmWorkOrderStatus.Created" />
				<Parameter	Name="CostCenter"		Direction="In"		Value="${CostCenter}" />
				<Parameter	Name="Department"		Direction="In"		Value="${Department}" />
				<Parameter	Name="Description"		Direction="In"		Value="${ObjectImportedPreventiveMaintenanceTask.Description}" />
				<Parameter	Name="Equipment"		Direction="In"		Value="${ObjectImportedPreventiveMaintenanceTask.Equipment}" />
				<Parameter	Name="Frequency"		Direction="In"		Value="${ObjectImportedPreventiveMaintenanceTask.FrequencyQuantity}" />
				<Parameter	Name="FrequencyPeriod"	Direction="In"		Value="${ObjectImportedPreventiveMaintenanceTask.Frequency}" />
				<Parameter	Name="ProcessFunction"	Direction="In"		Value="${ObjectImportedPreventiveMaintenanceTask.ProcessFunction}" />
				<Parameter	Name="Site"				Direction="In"		Value="${Site}" />
			</Insert>

			<Assign Name="Link PmWorkOrder" Property="${ObjectImportedPreventiveMaintenanceTask.PmWorkOrder}" Value="${PmWorkOrder}" />
		</Transaction>

		<UserContent Name="Post" />

		<View Name="OpenScreen" ViewName="DataEntryScreen">
			<Parameter	Name="DomainObject"			Direction="In"		Value="${PmWorkOrder}" />
			<Parameter	Name="FocusEditableField"	Direction="In"		Value="=${PmWorkOrder.Description} == Empty" />
		</View>
	</Execution>
</Workflow>