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

ActionField1599

Beschrijving: Updates the Job's Equipment and EquipmentType(Fleet), LOTO, SLA and planning dates when its ProcessFunction is modified by the user. Custom: Nee

Propertiesbewerken

Property Type Accessor
Job Job Root
AllowedNonITJobContexts List[Context] Optional
CreateCheckListAcceptation Boolean Optional
SearchContext UltimoString Optional
SearchDomain UltimoString Optional
SearchProperties List[UltimoString] Optional
UseSLA Boolean Optional

XMLbewerken

<Workflow Name="ActionField1599" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
	<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
	<Description>Updates the Job's Equipment and EquipmentType(Fleet), LOTO, SLA and planning dates when its ProcessFunction is modified by the user.</Description>
	<Properties>
		<Property	Name="Job"								Type="Job"					Accessor="Root"		Direction="In" />

		<Property	Name="AllowedNonITJobContexts"			Type="List[Context]"		Accessor="Optional"	Direction="In"		Default="JobContext.ServiceRequest, JobContext.ServiceDesk"	Comment="Check if the job is a Non IT-Job with these contexts" />
		<Property	Name="CreateCheckListAcceptation"		Type="Boolean"				Accessor="Optional"	Direction="In"		Default="False"												Comment="Create check list acceptation with JobPlan from ProcessFunction" />
		<Property	Name="SearchContext"					Type="UltimoString"			Accessor="Optional"	Direction="In"																	Comment="Context to be used during the search of KnowledgeTopics" />
		<Property	Name="SearchDomain"						Type="UltimoString"			Accessor="Optional"	Direction="In"																	Comment="SearchDomain to search" />
		<Property	Name="SearchProperties"					Type="List[UltimoString]"	Accessor="Optional"	Direction="In"																	Comment="Property or properties (Description,ReportText,EquipmentType,Text) to search in table KnowledgeTopic. Required if setting KnowledgeTopicSearchShowDialog is not DoNotSearch" />
		<Property	Name="UseSLA"							Type="Boolean"				Accessor="Optional"	Direction="In"		Default="True"												Comment="Set this to False in screens where a job is reported after it has been completed (SLA is not applicable in that case)." />

		<Property	Name="ConditionFlawsPresentCount"		Type="Int64"				Accessor="Internal" />
		<Property	Name="CurrentJobEquipment"				Type="Equipment"			Accessor="Internal"																					Comment="Used to detect if Equipment on job has changed." />
		<Property	Name="EquipmentAtProcessFunction"		Type="Equipment"			Accessor="Internal"																					Comment="Controls the actions to perform in case equipment at process function differs from equipment on job." />
		<Property	Name="EquipmentChanged"					Type="Boolean"				Accessor="Internal"						Default="False" />
		<Property	Name="OriginalJobScheduledStartDate"	Type="DateTime?"			Accessor="Internal"																					Comment="To detect if the ScheduledStartDate has been changed." />
		<Property	Name="OriginalJobSLATargetDate"			Type="DateTime?"			Accessor="Internal"																					Comment="To detect if the SLA TargetDate has been changed." />
		<Property	Name="OriginalJobTargetDate"			Type="DateTime?"			Accessor="Internal"																					Comment="To detect if the TargetDate has been changed." />
	</Properties>
	<Settings>
		<SettingsGroup Name="Job">
			<Setting	Name="RollbackJobEquipmentMethod"	Type="RollbackJobEquipmentMethod"	Value="RollbackWithQuestion" />
		</SettingsGroup>
	</Settings>
	<Execution>
		<UserContent Name="Pre" />

		<Comment><![CDATA[Explicitly assigning values from the job guaranties these wf properties will keep their value in case they are changed on the job by the BL followed by displaying a user message.]]></Comment>

		<Assign Name="CurrentJobEquipment" Property="${CurrentJobEquipment}" Value="${Job.Equipment}" />
		<Assign Name="OriginalJobScheduledStartDate" Property="${OriginalJobScheduledStartDate}" Value="${Job.ScheduledStartDate}" />
		<Assign Name="OriginalJobTargetDate" Property="${OriginalJobTargetDate}" Value="${Job.TargetDate}" />
		<Assign Name="OriginalJobSLATargetDate" Property="${OriginalJobSLATargetDate}" Value="${Job.ServiceContractTargetFinishedDate}" />

		<Comment><![CDATA[Set EquipmentType as early as possible so it can be overridden with EquipmentType on the piece of equipment that may be assigned to this job later on in this workflow.]]></Comment>

		<When Name="Change of EquipmentType?" Condition="${Job.EquipmentType} != ${Job.ProcessFunction.EquipmentType?}">
			<Assign Name="Assign EquipmentType" Property="${Job.EquipmentType}" Value="${Job.ProcessFunction.EquipmentType?}" />
			<Assign Name="Change check list" Property="${CreateCheckListAcceptation}" Value="True" />
		</When>

		<When Name="Set the Department and CostCenter on a Job from the linked ProcessFunction" Condition="#{UltimoSettings.CostCenterFindMethod} == CostCenterProcessFunctionAfterEquipment || #{UltimoSettings.CostCenterFindMethod} == CostCenterProcessFunctionAfterWorkOrderEquipment || #{UltimoSettings.DepartmentFindMethod} == DepartmentProcessFunctionAfterEquipment || #{UltimoSettings.DepartmentFindMethod} == DepartmentProcessFunctionAfterWorkOrderEquipment">
			<WorkflowCall Name="Job_SetDepartmentCostCenterCustomer" WorkflowName="Job_SetDepartmentCostCenterCustomer">
				<Parameter	Name="Job"	Direction="In"		Value="${Job}" />
			</WorkflowCall>
		</When>

		<When Name="It's a Fleet job" Condition="${Job.Context} == JobContext.Fleet">
			<Transaction>
				<Command Name="Get Equipment" CommandName="DomainObject_GetEquipmentForProcessFunction">
					<Parameter	Name="DomainObject"	Direction="In"		Value="${Job}" />
					<Parameter	Name="Equipment"	Direction="Out"						OutputProperty="${EquipmentAtProcessFunction}" />
				</Command>
			</Transaction>

			<When Name="Equipment on job differs from equipment at process function" Condition="${Job.Equipment} != ${EquipmentAtProcessFunction}">
				<WorkflowCall Name="Job_SetEquipmentWhenJobHasPmJobWithEquipment" WorkflowName="Job_SetEquipmentWhenJobHasPmJobWithEquipment" Comment="Execute outside transaction because it can ask user for response.">
					<Parameter	Name="Equipment"					Direction="In"		Value="${EquipmentAtProcessFunction}" />
					<Parameter	Name="Job"							Direction="In"		Value="${Job}" />
					<Parameter	Name="RollbackJobEquipmentMethod"	Direction="In"		Value="#{Settings.Job.RollbackJobEquipmentMethod}" />
				</WorkflowCall>

				<When Name="Equipment on job has changed" Condition="${Job.Equipment} != ${CurrentJobEquipment}">
					<Assign Name="EquipmentChanged" Property="${EquipmentChanged}" Value="True" />

					<When Name="EquipmentType will change" Condition="${Job.EquipmentType} != ${Job.Equipment.EquipmentType?}">
						<Comment><![CDATA[NOTE: when you make changes here it's most likely you also need to make them in ActionField1598.wfl in the case the Job.EquipmentType has changed.]]></Comment>

						<Assign Name="EquipmentType" Property="${Job.EquipmentType}" Value="${Job.Equipment.EquipmentType?}" />

						<Comment><![CDATA[Although Job_SetKnowledgeTopicCount.wfl currently doesnot apply for Fleet, it's here to keep the code in sync with AF1598.]]></Comment>

						<WorkflowCall Name="Job_SetKnowledgeTopicCount" WorkflowName="Job_SetKnowledgeTopicCount">
							<Parameter	Name="AllowedNonITJobContexts"	Direction="In"		Value="${AllowedNonITJobContexts}" />
							<Parameter	Name="Job"						Direction="In"		Value="${Job}" />
							<Parameter	Name="SearchContext"			Direction="In"		Value="${SearchContext}" />
							<Parameter	Name="SearchDomain"				Direction="In"		Value="${SearchDomain}" />
							<Parameter	Name="SearchProperties"			Direction="In"		Value="${SearchProperties}" />
						</WorkflowCall>
					</When>
				</When>
			</When>

			<When Name="EquipmentChanged" Condition="${EquipmentChanged} == True">
				<Transaction>
					<WorkflowCall Name="Job_SetDepartmentCostCenterCustomer" WorkflowName="Job_SetDepartmentCostCenterCustomer">
						<Parameter	Name="Job"	Direction="In"		Value="${Job}" />
					</WorkflowCall>

					<WorkflowCall Name="Job_SetBuildingAndSpaceFromEquipment" WorkflowName="Job_SetBuildingAndSpaceFromEquipment">
						<Parameter	Name="Job"	Direction="In"		Value="${Job}" />
					</WorkflowCall>
				</Transaction>
			</When>
		</When>

		<WorkflowCall Name="Job_UpdateOperationLoss" WorkflowName="Job_UpdateOperationLoss">
			<Parameter	Name="Job"	Direction="In"		Value="${Job}" />
		</WorkflowCall>

		<When Name="CreateCheckListAcceptation is True" Condition="${CreateCheckListAcceptation} == True">
			<WorkflowCall Name="Create Check List Acceptation" WorkflowName="Job_CreateCheckListAcceptation">
				<Parameter	Name="Job"	Direction="In"		Value="${Job}" />
			</WorkflowCall>
		</When>

		<When Name="UseSLA?" Condition="${UseSLA} == True">
			<WorkflowCall Name="Job_SetPlanningDatesBySLA" WorkflowName="Job_SetPlanningDatesBySLA">
				<Parameter	Name="Job"	Direction="In"		Value="${Job}" />
			</WorkflowCall>
		</When>

		<WorkflowCall Name="Job_WarnIfStartOrTargetDateIsInThePast" WorkflowName="Job_WarnIfStartOrTargetDateIsInThePast">
			<Parameter	Name="Job"								Direction="In"		Value="${Job}" />
			<Parameter	Name="OriginalJobScheduledStartDate"	Direction="In"		Value="${OriginalJobScheduledStartDate}" />
			<Parameter	Name="OriginalJobTargetDate"			Direction="In"		Value="${OriginalJobTargetDate}" />
		</WorkflowCall>

		<WorkflowCall Name="Job_WarnIfTargetDateIsPastSLATargetDate" WorkflowName="Job_WarnIfTargetDateIsPastSLATargetDate">
			<Parameter	Name="Job"						Direction="In"		Value="${Job}" />
			<Parameter	Name="OriginalJobSLATargetDate"	Direction="In"		Value="${OriginalJobSLATargetDate}" />
			<Parameter	Name="OriginalJobTargetDate"	Direction="In"		Value="${OriginalJobTargetDate}" />
		</WorkflowCall>

		<WorkflowCall Name="Job_InformUserInCaseOfMultipleJobScheduleParts" WorkflowName="Job_InformUserInCaseOfMultipleJobScheduleParts">
			<Parameter	Name="Job"								Direction="In"		Value="${Job}" />
			<Parameter	Name="OriginalJobScheduledStartDate"	Direction="In"		Value="${OriginalJobScheduledStartDate}" />
			<Parameter	Name="OriginalJobTargetDate"			Direction="In"		Value="${OriginalJobTargetDate}" />
		</WorkflowCall>

		<WorkflowCall Name="Job_DeleteJobConditionFlawPresent" WorkflowName="Job_DeleteJobConditionFlawPresent">
			<Parameter	Name="Job"							Direction="In"		Value="${Job}" />
			<Parameter	Name="ConditionFlawPresentsCount"	Direction="Out"						OutputProperty="${ConditionFlawsPresentCount}" />
		</WorkflowCall>

		<WorkflowCall Name="Job_ResetStructuredFailureDataFields" WorkflowName="Job_ResetStructuredFailureDataFields">
			<Parameter	Name="Job"	Direction="In"		Value="${Job}" />
		</WorkflowCall>

		<WorkflowCall Name="Job_UpdateSiteFromJobMat" WorkflowName="Job_UpdateSiteFromJobMat">
			<Parameter	Name="Job"	Direction="In"		Value="${Job}" />
		</WorkflowCall>

		<UserContent Name="Post" />

		<When Name="ConditionFlawPresents are found" Condition="${ConditionFlawsPresentCount} &gt; 0">
			<Choose Name="Check context on Job">
				<When Name="When job is for Infra" Condition="${Job.Context} == JobContext.Infra">
					<Message Name="Show Message 2645" MessageCode="2645" />
				</When>

				<Otherwise Name="Otherwise, other context">
					<Message Name="Show Message 2641" MessageCode="2641" />
				</Otherwise>
			</Choose>
		</When>
	</Execution>
</Workflow>