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

ActionField1719

Beschrijving: Create a job from an ObjectDowntime record while the unplanned downtime is still active. Custom: Nee

Propertiesbewerken

Property Type Accessor
ObjectDowntime ObjectDowntime Root
EquipmentContext List[Context] Optional
JobContext Context Optional
ProcessFunctionContext List[Context] Optional
WorkOrderTypeContext Context Optional

XMLbewerken

<Workflow Name="ActionField1719" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
	<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
	<Description>Create a job from an ObjectDowntime record while the unplanned downtime is still active.</Description>
	<Properties>
		<Property	Name="ObjectDowntime"					Type="ObjectDowntime"	Accessor="Root"		Direction="In" />

		<Property	Name="EquipmentContext"					Type="List[Context]"	Accessor="Optional"	Direction="In"		Default="EquipmentContext.Installation"																													Comment="Filter the Equipment on the context provided" />
		<Property	Name="JobContext"						Type="Context"			Accessor="Optional"	Direction="In"		Default="JobContext.TD"																																	Comment="Create a Job with the context provided" />
		<Property	Name="ProcessFunctionContext"			Type="List[Context]"	Accessor="Optional"	Direction="In"		Default="ProcessFunctionContext.ProcessFunction"																										Comment="Filter the ProcessFunction on the context provided" />
		<Property	Name="WorkOrderTypeContext"				Type="Context"			Accessor="Optional"	Direction="In"		Default="WorkOrderTypeContext.Standard"																													Comment="Filter the WorkOrderType on the context provided" />

		<Property	Name="ActivateJob"						Type="Boolean"			Accessor="Internal"						Default="=#settingenabled(Job, ${JobContext}, Job.ObjectDowntimeActivateJob) &amp;&amp; #getsetting(Job, ${JobContext}, Job.ObjectDowntimeActivateJob)" />
		<Property	Name="CreatedJob"						Type="Job"				Accessor="Internal" />
		<Property	Name="Description"						Type="UltimoString"		Accessor="Internal"						Default="${ObjectDowntime.Description}" />
		<Property	Name="Equipment"						Type="Equipment"		Accessor="Internal"						Default="${ObjectDowntime.Equipment}" />
		<Property	Name="Priority"							Type="Priority"			Accessor="Internal" />
		<Property	Name="ProcessFunction"					Type="ProcessFunction"	Accessor="Internal"						Default="=${ObjectDowntime.ProcessFunction} != Empty ? ${ObjectDowntime.ProcessFunction} : ${ObjectDowntime.Equipment.ProcessFunction}" />
		<Property	Name="ReportText"						Type="String"			Accessor="Internal" />
		<Property	Name="ShiftLogLine"						Type="ShiftLogLine"		Accessor="Internal" />
		<Property	Name="StatusForJobCreatedWithoutDialog"	Type="Status"			Accessor="Internal"						Default="JobStatus.Requested" />
		<Property	Name="UseDialog"						Type="Boolean"			Accessor="Internal"						Default="=#settingenabled(Job, ${JobContext}, Job.UseDialogWhenReporting) &amp;&amp; #getsetting(Job, ${JobContext}, Job.UseDialogWhenReporting)" />
		<Property	Name="WorkOrderType"					Type="WorkOrderType"	Accessor="Internal" />
	</Properties>
	<Execution>
		<UserContent Name="Pre" />

		<When Name="It is a selfservice user" Condition="#{User.DatabaseUserType} == SelfService">
			<Assign Name="Selfservice users must use dialog" Property="${UseDialog}" Value="True" />
		</When>

		<When Condition="#settingenabled(Job, ${JobContext}, Job.ObjectDowntimeDefaultPriority)">
			<Assign Name="Set default priority from setting" Property="${Priority}" Value="#getsetting(Job, ${JobContext}, Job.ObjectDowntimeDefaultPriority)" />
		</When>

		<When Condition="#settingenabled(Job, ${JobContext}, Job.ObjectDowntimeDefaultWorkOrderType)">
			<Assign Name="Set default work order type from setting" Property="${WorkOrderType}" Value="#getsetting(Job, ${JobContext}, Job.ObjectDowntimeDefaultWorkOrderType)" />
		</When>

		<Validation Name="ValidateJobNotPresentOnDomainObject" Condition="${ObjectDowntime.Job} == Empty" MessageCode="1898">
			<Parameter	Name="DomainObject"	Direction="In"		Value="${ObjectDowntime}" />
		</Validation>

		<When Name="Check whether a dialog must be shown (or a screen)" Condition="${UseDialog} == True">
			<WorkflowCall Name="Dialog_CreateJobForActiveDowntime" WorkflowName="Dialog_CreateJobForActiveDowntime">
				<Parameter	Name="EquipmentContext"			Direction="In"		Value="${EquipmentContext}" />
				<Parameter	Name="JobContext"				Direction="In"		Value="${JobContext}" />
				<Parameter	Name="ProcessFunctionContext"	Direction="In"		Value="${ProcessFunctionContext}" />
				<Parameter	Name="WorkOrderTypeContext"		Direction="In"		Value="${WorkOrderTypeContext}" />
				<Parameter	Name="Description"				Direction="InOut"	Value="${Description}"				OutputProperty="${Description}" />
				<Parameter	Name="WorkOrderType"			Direction="InOut"	Value="${WorkOrderType}"			OutputProperty="${WorkOrderType}" />
				<Parameter	Name="Equipment"				Direction="Out"											OutputProperty="${Equipment}" />
				<Parameter	Name="ProcessFunction"			Direction="Out"											OutputProperty="${ProcessFunction}" />
				<Parameter	Name="ReportText"				Direction="Out"											OutputProperty="${ReportText}" />
			</WorkflowCall>
		</When>

		<Transaction>
			<Assign Name="Set RegistrationType" Property="${ObjectDowntime.RegistrationType}" Value="ActiveReportJob" />

			<WorkflowCall Name="ObjectDowntime_CreateJob" WorkflowName="ObjectDowntime_CreateJob">
				<Parameter	Name="Description"				Direction="In"		Value="${Description}" />
				<Parameter	Name="JobContext"				Direction="In"		Value="${JobContext}" />
				<Parameter	Name="NewStatusOfJob"			Direction="In"		Value="=${UseDialog} == True ? JobStatus.Active : ${StatusForJobCreatedWithoutDialog}" />
				<Parameter	Name="ObjectDowntime"			Direction="In"		Value="${ObjectDowntime}" />
				<Parameter	Name="Priority"					Direction="In"		Value="${Priority}" />
				<Parameter	Name="ReportText"				Direction="In"		Value="${ReportText}" />
				<Parameter	Name="SelectedEquipment"		Direction="In"		Value="=${Equipment} != Empty ? ${Equipment} : ${ProcessFunction} == Empty ? ${ObjectDowntime.Equipment} : Empty" />
				<Parameter	Name="SelectedProcessFunction"	Direction="In"		Value="=${ProcessFunction} != Empty ? ${ProcessFunction} : ${Equipment} == Empty ? ${ObjectDowntime.ProcessFunction} : Empty" />
				<Parameter	Name="WorkOrderType"			Direction="In"		Value="${WorkOrderType}" />
				<Parameter	Name="CreatedJob"				Direction="Out"																																		OutputProperty="${CreatedJob}" />
			</WorkflowCall>
		</Transaction>

		<UserContent Name="Post" />

		<When Name="Check UseDialog" Condition="${UseDialog} == False">
			<View Name="OpenScreen" ViewName="DataEntryScreen">
				<Parameter	Name="DomainObject"			Direction="In"		Value="${CreatedJob}" />
				<Parameter	Name="FocusEditableField"	Direction="In"		Value="=${CreatedJob.Description} == Empty" />
			</View>
		</When>
	</Execution>
</Workflow>