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

ActionField1592

Beschrijving: Open AssetPlanner. Custom: Nee

Propertiesbewerken

Property Type Accessor
PmSchedule PmSchedule Root
JobContext Context Optional
ReadOnly Boolean Optional
Title UltimoString Optional
JobContextsToSearch List[Context] Optional
MaximumNumberOfAssets Int32 Optional
PmWorkOrderContextsToSearch List[Context] Optional
EquipmentContextsAndIcons Dictionary[String] Optional
ProcessFunctionContextsAndIcons Dictionary[String] Optional

XMLbewerken

<Workflow Name="ActionField1592" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
	<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
	<Description>Open AssetPlanner.</Description>
	<Properties>
		<Property	Name="PmSchedule"						Type="PmSchedule"			Accessor="Root"		Direction="In" />

		<Property	Name="JobContext"						Type="Context"				Accessor="Optional"	Direction="In"		Default="JobContext.TD"										Comment="Context of the created job default TD" />
		<Property	Name="ReadOnly"							Type="Boolean"				Accessor="Optional"	Direction="In"		Default="#{Settings.GraphicOverviewAssetPlanner.ReadOnly}"	Comment="Set scheduler view to readonly" />
		<Property	Name="Title"							Type="UltimoString"			Accessor="Optional"	Direction="In"																	Comment="Title for the scheduler" />

		<Property	Name="JobContextsToSearch"				Type="List[Context]"		Accessor="Optional"	Direction="InOut"																Comment="Search only Jobs with these contexts" />
		<Property	Name="MaximumNumberOfAssets"			Type="Int32"				Accessor="Optional"	Direction="InOut"	Default="250"												Comment="Maximum number of assets. (Absolute max. is 1000)" />
		<Property	Name="PmWorkOrderContextsToSearch"		Type="List[Context]"		Accessor="Optional"	Direction="InOut"																Comment="Search only PmWorkorders with these contexts default Standard and PeriodicActivityChild" />

		<Property	Name="EquipmentContextsAndIcons"		Type="Dictionary[String]"	Accessor="Optional"	Direction="Out"																	Comment="contexts for equipment to search and icons to show" />
		<Property	Name="ProcessFunctionContextsAndIcons"	Type="Dictionary[String]"	Accessor="Optional"	Direction="Out"																	Comment="contexts for processfunction to search and icons to show" />

		<Property	Name="EndDate"							Type="Date"					Accessor="Internal"						Default="Empty" />
		<Property	Name="ResourceExpandLevel"				Type="AssetExpandLevel"		Accessor="Internal"						Default="Collapsed"											Comment="TODO! ExpandLevel for the scheduler view. Accepted values: [Collapsed, WorkOrder, Job]" />
		<Property	Name="StartDate"						Type="Date"					Accessor="Internal"						Default="Empty" />
	</Properties>
	<Execution>
		<Command Name="AssetPlanner_GetContextsAndIcons" CommandName="AssetPlanner_GetContextsAndIcons">
			<Parameter	Name="PmSchedule"						Direction="In"		Value="${PmSchedule}" />
			<Parameter	Name="EquipmentContextsAndIcons"		Direction="Out"								OutputProperty="${EquipmentContextsAndIcons}" />
			<Parameter	Name="ProcessFunctionContextsAndIcons"	Direction="Out"								OutputProperty="${ProcessFunctionContextsAndIcons}" />
		</Command>

		<UserContent Name="Pre" />

		<When Name="It is a Light or Technician user" Condition="#{User.DatabaseUserType} == Light || #{User.DatabaseUserType} == Technician">
			<Assign Name="ReadOnly is true" Property="${ReadOnly}" Value="True" />
		</When>

		<Command Name="AssetPlanner_GetDates" CommandName="AssetPlanner_GetDates">
			<Parameter	Name="PmSchedule"	Direction="In"		Value="${PmSchedule}" />
			<Parameter	Name="EndDate"		Direction="Out"								OutputProperty="${EndDate}" />
			<Parameter	Name="StartDate"	Direction="Out"								OutputProperty="${StartDate}" />
		</Command>

		<Validation Name="EndDate before StartDate" Condition="${StartDate} &lt; ${EndDate}" MessageCode="2981" />

		<When Name="Period greater than 2 year" Condition="${PmSchedule.StartDate} != Empty &amp;&amp; ${PmSchedule.EndDate} != Empty &amp;&amp; ${PmSchedule.StartDate} &lt; #addyears(${PmSchedule.EndDate},-2)">
			<Message Name="Period greater than 2 year" MessageCode="2980" />
		</When>

		<Transaction>
			<Comment><![CDATA[ behaviour for searching should be like the properties set here ]]></Comment>

			<Assign Name="IncludeAutoPmWorkOrders" Property="${PmSchedule.IncludeAutoPmWorkOrders}" Value="True" />
			<Assign Name="PmWorkOrderContextSearchType" Property="${PmSchedule.PmWorkOrderContextSearchType}" Value="NoCourseRoutes" />
			<Assign Name="PmWorkOrderInSchemaSearchType" Property="${PmSchedule.PmWorkOrderInSchemaSearchType}" Value="0" Comment="Also find in schema" />
			<Assign Name="SearchOnlyDateNextMaintenance" Property="${PmSchedule.SearchOnlyDateNextMaintenance}" Value="False" />
		</Transaction>

		<UserContent Name="Post" />

		<View Name="Open Assetplanner" ViewName="Scheduler">
			<Parameter	Name="DomainObject"						Direction="In"		Value="${PmSchedule}" />
			<Parameter	Name="EquipmentContextsAndIcons"		Direction="In"		Value="${EquipmentContextsAndIcons}" />
			<Parameter	Name="GetAllData"						Direction="In"		Value="AssetPlanner_GetAllData"				Comment="Workflow called to get the required data" />
			<Parameter	Name="GetLegendData"					Direction="In"		Value="AssetPlanner_GetLegendData"			Comment="Workflow called to get the legend data" />
			<Parameter	Name="GetMetadata"						Direction="In"		Value="AssetPlanner_GetMetadata"			Comment="Workflow called to get the metadata" />
			<Parameter	Name="JobContext"						Direction="In"		Value="${JobContext}" />
			<Parameter	Name="JobContextsToSearch"				Direction="In"		Value="${JobContextsToSearch}" />
			<Parameter	Name="MaximumNumberOfAssets"			Direction="In"		Value="${MaximumNumberOfAssets}" />
			<Parameter	Name="Name"								Direction="In"		Value="Asset" />
			<Parameter	Name="PmWorkOrderContextsToSearch"		Direction="In"		Value="${PmWorkOrderContextsToSearch}" />
			<Parameter	Name="ProcessFunctionContextsAndIcons"	Direction="In"		Value="${ProcessFunctionContextsAndIcons}" />
			<Parameter	Name="ReadOnly"							Direction="In"		Value="${ReadOnly}" />
			<Parameter	Name="ResourceExpandLevel"				Direction="In"		Value="${ResourceExpandLevel}" />
			<Parameter	Name="Title"							Direction="In"		Value="${Title}" />
			<Parameter	Name="Type"								Direction="In"		Value="Asset" />
		</View>
	</Execution>
</Workflow>