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

ActionField718

Beschrijving: Add a Subjob to an existing Multijob. Custom: Nee

Propertiesbewerken

Property Type Accessor
IncomingJob Job Root
CreateSubJobForServiceDeskReportType ServiceDeskReportType Optional
CreateSubJobWithExecutionWindowQuantity Decimal Optional
CreateSubJobWithExecutionWindowTimeUnit TimeUnit Optional
IncomingJobIsMultijob Boolean Optional
LabelCode String Optional
SelectionListConfiguration String Optional
CreatedJob Job Optional

XMLbewerken

<Workflow Name="ActionField718" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
	<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
	<Description>Add a Subjob to an existing Multijob.</Description>
	<Properties>
		<Property	Name="IncomingJob"								Type="Job"						Accessor="Root"		Direction="In" />

		<Property	Name="CreateSubJobForServiceDeskReportType"		Type="ServiceDeskReportType"	Accessor="Optional"	Direction="In"																							Comment="When setting this value no dialog will be shown just a subjob created based on this ServiceDeskReportType, starting at the same time as the Multijob" />
		<Property	Name="CreateSubJobWithExecutionWindowQuantity"	Type="Decimal"					Accessor="Optional"	Direction="In"		Default="1"																			Comment="Only used i.c.w. CreateSubJobForServiceDeskReportType and StopRelated is False" />
		<Property	Name="CreateSubJobWithExecutionWindowTimeUnit"	Type="TimeUnit"					Accessor="Optional"	Direction="In"		Default="00000000008"																Comment="Days; only used i.c.w. CreateSubJobForServiceDeskReportType and StopRelated is False" />
		<Property	Name="IncomingJobIsMultijob"					Type="Boolean"					Accessor="Optional"	Direction="In"		Default="False"																		Comment="Set to True to override default behaviour and create a child when incoming Job is a subjob itself" />
		<Property	Name="LabelCode"								Type="String"					Accessor="Optional"	Direction="In"		Default="ADDSUBJOB"																	Comment="Labelcode for the title of dialog Job_AddSubJob_SelectServiceDeskReportType" />
		<Property	Name="SelectionListConfiguration"				Type="String"					Accessor="Optional"	Direction="In"		Default="DEFAULT"																	Comment="Use this SelectionListConfiguration for the dalog Job_AddSubJob_SelectServiceDeskReportType" />

		<Property	Name="CreatedJob"								Type="Job"						Accessor="Optional"	Direction="Out"																							Comment="Created Subjob" />

		<Property	Name="AllowedMultijobStatuses"					Type="List[Status]"				Accessor="Internal"						Default="JobStatus.Created,JobStatus.Approved,JobStatus.Postponed,JobStatus.Active" />
		<Property	Name="Description"								Type="String"					Accessor="Internal" />
		<Property	Name="DurationCalculated"						Type="Decimal"					Accessor="Internal" />
		<Property	Name="Employee"									Type="Employee"					Accessor="Internal" />
		<Property	Name="ExecutionWindowQuantity"					Type="Decimal"					Accessor="Internal"						Default="0" />
		<Property	Name="ExecutionWindowQuantityInHours"			Type="Decimal"					Accessor="Internal"						Default="0" />
		<Property	Name="ExecutionWindowTimeUnit"					Type="TimeUnit"					Accessor="Internal"						Default="00000000008" />
		<Property	Name="HasStatusTransition"						Type="Boolean"					Accessor="Internal" />
		<Property	Name="Hours"									Type="String"					Accessor="Internal" />
		<Property	Name="ItilChange"								Type="Boolean"					Accessor="Internal" />
		<Property	Name="ItilChangeJobContext"						Type="Context"					Accessor="Internal"						Default="JobContext.ItilChangeJob" />
		<Property	Name="JobContext"								Type="Context"					Accessor="Internal"						Default="JobContext.ServiceDesk" />
		<Property	Name="JobJobPlanContext"						Type="Context"					Accessor="Internal" />
		<Property	Name="MaximalDurationCalculated"				Type="Decimal"					Accessor="Internal"						Default="100000" />
		<Property	Name="MaximalStartDate"							Type="DateTime?"				Accessor="Internal" />
		<Property	Name="MinimalDurationCalculated"				Type="Decimal"					Accessor="Internal"						Default="0.25" />
		<Property	Name="MinimalStartDate"							Type="DateTime?"				Accessor="Internal" />
		<Property	Name="Multijob"									Type="Job"						Accessor="Internal" />
		<Property	Name="Now"										Type="DateTime"					Accessor="Internal"						Default="#{Environment.CurrentDateTime}" />
		<Property	Name="ReportText"								Type="UltimoString"				Accessor="Internal" />
		<Property	Name="ScheduledStartDate"						Type="DateTime"					Accessor="Internal"						Default="=#settime(${Now}, 8 ,0)" />
		<Property	Name="ServiceDeskReportType"					Type="ServiceDeskReportType"	Accessor="Internal" />
		<Property	Name="SkillCategory"							Type="SkillCategory"			Accessor="Internal" />
		<Property	Name="SqlWhereClause"							Type="String"					Accessor="Internal" />
		<Property	Name="StopRelatedJob"							Type="Boolean"					Accessor="Internal"																											Comment="(Multi)Job.StopRelated equals to true" />
		<Property	Name="Subjob"									Type="Job"						Accessor="Internal" />
		<Property	Name="SubjobDuration"							Type="Decimal"					Accessor="Internal" />
		<Property	Name="SubjobExecutionWindowEndDate"				Type="DateTime"					Accessor="Internal" />
		<Property	Name="TargetDateCalculated"						Type="DateTime?"				Accessor="Internal" />
		<Property	Name="TempDate"									Type="DateTime?"				Accessor="Internal" />
		<Property	Name="Vendor"									Type="Vendor"					Accessor="Internal" />
		<Property	Name="WorkSchedule"								Type="WorkSchedule"				Accessor="Internal"						Default="Empty" />
	</Properties>
	<Execution>
		<UserContent Name="Pre" />

		<WorkflowCall Name="Job_AddSubJob_Validations" WorkflowName="Job_AddSubJob_Validations">
			<Parameter	Name="IncomingJob"				Direction="In"		Value="${IncomingJob}" />
			<Parameter	Name="IncomingJobIsMultijob"	Direction="In"		Value="${IncomingJobIsMultijob}" />
			<Parameter	Name="AllowedMultijobStatuses"	Direction="InOut"	Value="${AllowedMultijobStatuses}"	OutputProperty="${AllowedMultijobStatuses}" />
			<Parameter	Name="ExecutionWindowTimeUnit"	Direction="InOut"	Value="${ExecutionWindowTimeUnit}"	OutputProperty="${ExecutionWindowTimeUnit}" />
			<Parameter	Name="Hours"					Direction="InOut"	Value="${Hours}"					OutputProperty="${Hours}" />
			<Parameter	Name="ItilChangeJobContext"		Direction="InOut"	Value="${ItilChangeJobContext}"		OutputProperty="${ItilChangeJobContext}" />
			<Parameter	Name="JobContext"				Direction="InOut"	Value="${JobContext}"				OutputProperty="${JobContext}" />
			<Parameter	Name="MaximalStartDate"			Direction="InOut"	Value="${MaximalStartDate}"			OutputProperty="${MaximalStartDate}" />
			<Parameter	Name="MinimalStartDate"			Direction="InOut"	Value="${MinimalStartDate}"			OutputProperty="${MinimalStartDate}" />
			<Parameter	Name="Multijob"					Direction="InOut"	Value="${Multijob}"					OutputProperty="${Multijob}" />
			<Parameter	Name="ScheduledStartDate"		Direction="InOut"	Value="${ScheduledStartDate}"		OutputProperty="${ScheduledStartDate}" />
			<Parameter	Name="SqlWhereClause"			Direction="InOut"	Value="${SqlWhereClause}"			OutputProperty="${SqlWhereClause}" />
			<Parameter	Name="StopRelatedJob"			Direction="InOut"	Value="${StopRelatedJob}"			OutputProperty="${StopRelatedJob}" />
			<Parameter	Name="WorkSchedule"				Direction="InOut"	Value="${WorkSchedule}"				OutputProperty="${WorkSchedule}" />
		</WorkflowCall>

		<Comment><![CDATA[Be able to update the sql where clause]]></Comment>

		<UserContent Name="PreFirstDialog" />

		<Comment><![CDATA[First ask for ServiceDeskReportType seperately to use its values for next dialog]]></Comment>

		<Assign Name="Set ItilChange" Property="${ItilChange}" Value="=(${Multijob.Context} == JobContext.ItilChange)" />

		<WorkflowCall Name="Job_AddSubJob_GetServiceDeskReportType" WorkflowName="Job_AddSubJob_GetServiceDeskReportType">
			<Parameter	Name="CreateSubJobForServiceDeskReportType"		Direction="In"		Value="${CreateSubJobForServiceDeskReportType}" />
			<Parameter	Name="CreateSubJobWithExecutionWindowQuantity"	Direction="In"		Value="${CreateSubJobWithExecutionWindowQuantity}" />
			<Parameter	Name="CreateSubJobWithExecutionWindowTimeUnit"	Direction="In"		Value="${CreateSubJobWithExecutionWindowTimeUnit}" />
			<Parameter	Name="ItilChange"								Direction="In"		Value="${ItilChange}" />
			<Parameter	Name="LabelCode"								Direction="In"		Value="${LabelCode}" />
			<Parameter	Name="Multijob"									Direction="In"		Value="${Multijob}" />
			<Parameter	Name="SelectionListConfiguration"				Direction="In"		Value="${SelectionListConfiguration}" />
			<Parameter	Name="SqlWhereClause"							Direction="In"		Value="${SqlWhereClause}" />
			<Parameter	Name="StopRelatedJob"							Direction="In"		Value="${StopRelatedJob}" />
			<Parameter	Name="ExecutionWindowQuantity"					Direction="InOut"	Value="${ExecutionWindowQuantity}"					OutputProperty="${ExecutionWindowQuantity}" />
			<Parameter	Name="ExecutionWindowTimeUnit"					Direction="InOut"	Value="${ExecutionWindowTimeUnit}"					OutputProperty="${ExecutionWindowTimeUnit}" />
			<Parameter	Name="MinimalDurationCalculated"				Direction="InOut"	Value="${MinimalDurationCalculated}"				OutputProperty="${MinimalDurationCalculated}" />
			<Parameter	Name="ScheduledStartDate"						Direction="InOut"	Value="${ScheduledStartDate}"						OutputProperty="${ScheduledStartDate}" />
			<Parameter	Name="Vendor"									Direction="InOut"	Value="${Vendor}"									OutputProperty="${Vendor}" />
			<Parameter	Name="Description"								Direction="Out"															OutputProperty="${Description}" />
			<Parameter	Name="DurationCalculated"						Direction="Out"															OutputProperty="${DurationCalculated}" />
			<Parameter	Name="Employee"									Direction="Out"															OutputProperty="${Employee}" />
			<Parameter	Name="ServiceDeskReportType"					Direction="Out"															OutputProperty="${ServiceDeskReportType}" />
			<Parameter	Name="SkillCategory"							Direction="Out"															OutputProperty="${SkillCategory}" />
			<Parameter	Name="TargetDateCalculated"						Direction="Out"															OutputProperty="${TargetDateCalculated}" />
		</WorkflowCall>

		<WorkflowCall Name="Job_AddSubJob_GetInfo" WorkflowName="Job_AddSubJob_GetInfo">
			<Parameter	Name="CreateSubJobForServiceDeskReportType"	Direction="In"		Value="${CreateSubJobForServiceDeskReportType}" />
			<Parameter	Name="ExecutionWindowQuantityInHours"		Direction="In"		Value="${ExecutionWindowQuantityInHours}" />
			<Parameter	Name="Hours"								Direction="In"		Value="${Hours}" />
			<Parameter	Name="ItilChange"							Direction="In"		Value="${ItilChange}" />
			<Parameter	Name="JobContext"							Direction="In"		Value="${JobContext}"							OutputProperty="${JobContext}" />
			<Parameter	Name="MaximalDurationCalculated"			Direction="In"		Value="${MaximalDurationCalculated}" />
			<Parameter	Name="MaximalStartDate"						Direction="In"		Value="${MaximalStartDate}" />
			<Parameter	Name="MinimalDurationCalculated"			Direction="In"		Value="${MinimalDurationCalculated}" />
			<Parameter	Name="MinimalStartDate"						Direction="In"		Value="${MinimalStartDate}" />
			<Parameter	Name="Description"							Direction="InOut"	Value="${Description}"							OutputProperty="${Description}" />
			<Parameter	Name="DurationCalculated"					Direction="InOut"	Value="${DurationCalculated}"					OutputProperty="${DurationCalculated}" />
			<Parameter	Name="Employee"								Direction="InOut"	Value="${Employee}"								OutputProperty="${Employee}" />
			<Parameter	Name="ExecutionWindowQuantity"				Direction="InOut"	Value="${ExecutionWindowQuantity}"				OutputProperty="${ExecutionWindowQuantity}" />
			<Parameter	Name="ExecutionWindowTimeUnit"				Direction="InOut"	Value="${ExecutionWindowTimeUnit}"				OutputProperty="${ExecutionWindowTimeUnit}" />
			<Parameter	Name="Multijob"								Direction="InOut"	Value="${Multijob}"								OutputProperty="${Multijob}" />
			<Parameter	Name="ReportText"							Direction="InOut"	Value="${ReportText}"							OutputProperty="${ReportText}" />
			<Parameter	Name="ScheduledStartDate"					Direction="InOut"	Value="${ScheduledStartDate}"					OutputProperty="${ScheduledStartDate}" />
			<Parameter	Name="ServiceDeskReportType"				Direction="InOut"	Value="${ServiceDeskReportType}"				OutputProperty="${ServiceDeskReportType}" />
			<Parameter	Name="SkillCategory"						Direction="InOut"	Value="${SkillCategory}"						OutputProperty="${SkillCategory}" />
			<Parameter	Name="StopRelatedJob"						Direction="InOut"	Value="${StopRelatedJob}"						OutputProperty="${StopRelatedJob}" />
			<Parameter	Name="SubjobDuration"						Direction="InOut"	Value="${SubjobDuration}"						OutputProperty="${SubjobDuration}" />
			<Parameter	Name="SubjobExecutionWindowEndDate"			Direction="InOut"	Value="${SubjobExecutionWindowEndDate}"			OutputProperty="${SubjobExecutionWindowEndDate}" />
			<Parameter	Name="Vendor"								Direction="InOut"	Value="${Vendor}"								OutputProperty="${Vendor}" />
			<Parameter	Name="WorkSchedule"							Direction="InOut"	Value="${WorkSchedule}"							OutputProperty="${WorkSchedule}" />
		</WorkflowCall>

		<Transaction>
			<WorkflowCall Name="Job_AddSubJob_CreateSubJob" WorkflowName="Job_AddSubJob_CreateSubJob">
				<Parameter	Name="Description"				Direction="In"		Value="${Description}" />
				<Parameter	Name="DurationCalculated"		Direction="In"		Value="${DurationCalculated}" />
				<Parameter	Name="Employee"					Direction="In"		Value="${Employee}" />
				<Parameter	Name="ExecutionWindowQuantity"	Direction="In"		Value="${ExecutionWindowQuantity}" />
				<Parameter	Name="ExecutionWindowTimeUnit"	Direction="In"		Value="${ExecutionWindowTimeUnit}" />
				<Parameter	Name="JobContext"				Direction="In"		Value="${JobContext}" />
				<Parameter	Name="ReportText"				Direction="In"		Value="${ReportText}" />
				<Parameter	Name="ScheduledStartDate"		Direction="In"		Value="${ScheduledStartDate}" />
				<Parameter	Name="ServiceDeskReportType"	Direction="In"		Value="${ServiceDeskReportType}" />
				<Parameter	Name="SkillCategory"			Direction="In"		Value="${SkillCategory}" />
				<Parameter	Name="Vendor"					Direction="In"		Value="${Vendor}" />
				<Parameter	Name="IncomingJob"				Direction="InOut"	Value="${IncomingJob}"				OutputProperty="${IncomingJob}" />
				<Parameter	Name="Multijob"					Direction="InOut"	Value="${Multijob}"					OutputProperty="${Multijob}" />
				<Parameter	Name="Subjob"					Direction="InOut"	Value="${Subjob}"					OutputProperty="${Subjob}" />
			</WorkflowCall>

			<When Name="When ServiceDeskReportType is set" Condition="${Subjob.ServiceDeskReportType} != Empty">
				<Choose Name="Check context to set job to">
					<When Name="When context Fleet" Condition="${Subjob.ServiceDeskReportType.SetContext} == JobContext.Fleet">
						<Assign Name="Set JobJobPlanContext to Fleet" Property="${JobJobPlanContext}" Value="JobJobPlanContext.Fleet" />
					</When>

					<Otherwise Name="Otherwise, context non-Fleet">
						<Assign Name="Set JobJobPlanContext to Fleet" Property="${JobJobPlanContext}" Value="JobJobPlanContext.Standard" />
					</Otherwise>
				</Choose>

				<UserContent Name="AfterJobJobPlanContext" />

				<WorkflowCall Name="Job_AddSubJob_ServiceDeskReportType" WorkflowName="Job_AddSubJob_ServiceDeskReportType" Comment="When ServiceDeskReportType is set">
					<Parameter	Name="JobJobPlanContext"	Direction="In"		Value="${JobJobPlanContext}" />
					<Parameter	Name="DurationCalculated"	Direction="InOut"	Value="${DurationCalculated}"	OutputProperty="${DurationCalculated}" />
					<Parameter	Name="JobContext"			Direction="InOut"	Value="${JobContext}"			OutputProperty="${JobContext}" />
					<Parameter	Name="ReportText"			Direction="InOut"	Value="${ReportText}"			OutputProperty="${ReportText}" />
					<Parameter	Name="SkillCategory"		Direction="InOut"	Value="${SkillCategory}"		OutputProperty="${SkillCategory}" />
					<Parameter	Name="Subjob"				Direction="InOut"	Value="${Subjob}"				OutputProperty="${Subjob}" />
					<Parameter	Name="Vendor"				Direction="InOut"	Value="${Vendor}"				OutputProperty="${Vendor}" />
				</WorkflowCall>

				<Command Name="Check if subjob has status transition from current to the one defined in ServiceDeskReportType" CommandName="DomainObject_HasStatusTransition">
					<Parameter	Name="DomainObject"			Direction="In"		Value="${Subjob}" />
					<Parameter	Name="NewStatus"			Direction="In"		Value="${Subjob.ServiceDeskReportType.SetStatus}" />
					<Parameter	Name="OldStatus"			Direction="In"		Value="${Subjob.Status}" />
					<Parameter	Name="HasStatusTransition"	Direction="Out"															OutputProperty="${HasStatusTransition}" />
				</Command>

				<Validation Name="ValidateTransition" Condition="${HasStatusTransition} == True" MessageCode="2039">
					<Parameter	Name="DomainObject"	Direction="In"		Value="${Subjob}" />
					<Parameter	Name="NewStatus"	Direction="In"		Value="${Subjob.ServiceDeskReportType.SetStatus}" />
				</Validation>

				<ChangeStatus Name="Status" DomainObject="${Subjob}" NewStatus="${Subjob.ServiceDeskReportType.SetStatus}" />

				<Assign Name="ProgressStatus" Property="${Subjob.ProgressStatus}" Value="${Subjob.ServiceDeskReportType.ProgressStatusForJob}" />
			</When>

			<Comment><![CDATA[ round duration ]]></Comment>

			<Command Name="RoundNumberOfHours" CommandName="RoundNumberOfHours">
				<Parameter	Name="GrossHours"								Direction="In"		Value="${Subjob.DurationCalculated}" />
				<Parameter	Name="RoundedHoursMinimumValueIsRoundingUnit"	Direction="In"		Value="True" />
				<Parameter	Name="RoundMethod"								Direction="In"		Value="Quarter" />
				<Parameter	Name="RoundedHours"								Direction="Out"												OutputProperty="${Subjob.DurationCalculated}" />
			</Command>

			<WorkflowCall Name="Job_AddSubJob_SetStopRelated" WorkflowName="Job_AddSubJob_SetStopRelated" Comment="StopRelated">
				<Parameter	Name="DurationCalculated"			Direction="In"		Value="${DurationCalculated}" />
				<Parameter	Name="Multijob"						Direction="In"		Value="${Multijob}" />
				<Parameter	Name="StopRelatedJob"				Direction="In"		Value="${StopRelatedJob}" />
				<Parameter	Name="SubjobExecutionWindowEndDate"	Direction="In"		Value="${SubjobExecutionWindowEndDate}" />
				<Parameter	Name="WorkSchedule"					Direction="In"		Value="${WorkSchedule}" />
				<Parameter	Name="Subjob"						Direction="InOut"	Value="${Subjob}"						OutputProperty="${Subjob}" />
			</WorkflowCall>

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

			<WorkflowCall Name="Job_AddSubJob_TargetDate" WorkflowName="Job_AddSubJob_TargetDate">
				<Parameter	Name="Subjob"		Direction="In"		Value="${Subjob}" />
				<Parameter	Name="WorkSchedule"	Direction="In"		Value="${WorkSchedule}" />
				<Parameter	Name="Multijob"		Direction="InOut"	Value="${Multijob}"		OutputProperty="${Multijob}" />
			</WorkflowCall>

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

			<Assign Name="Priority" Property="${Subjob.Priority}" Value="${IncomingJob.Priority}" />
			<Assign Name="Set Feedback" Property="${CreatedJob}" Value="${Subjob}" />
		</Transaction>

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

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