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

ActionField1638

Beschrijving: Create job from assetplanner (via dialog). Custom: Nee

Propertiesbewerken

Property Type Accessor
DomainObject DomainObject Root
EmployeeContextToSearch List[Context] Optional
JobContext Context Optional
JobStatus Status Optional
Job Job Optional

XMLbewerken

<Workflow Name="ActionField1638" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
	<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
	<Description>Create job from assetplanner (via dialog).</Description>
	<Properties>
		<Property	Name="DomainObject"				Type="DomainObject"		Accessor="Root"		Direction="In" />

		<Property	Name="EmployeeContextToSearch"	Type="List[Context]"	Accessor="Optional"	Direction="In"		Default="EmployeeContext.Standard"	Comment="Select Employee from Employees with these contexts" />
		<Property	Name="JobContext"				Type="Context"			Accessor="Optional"	Direction="In"		Default="JobContext.TD"				Comment="Jobcontext for the created Job" />
		<Property	Name="JobStatus"				Type="Status"			Accessor="Optional"	Direction="In"		Default="JobStatus.Created"			Comment="Jobstatus for the created Job" />

		<Property	Name="Job"						Type="Job"				Accessor="Optional"	Direction="Out"		Default="Empty" />

		<Property	Name="Description"				Type="String"			Accessor="Internal"						Default="Empty" />
		<Property	Name="Employee"					Type="Employee"			Accessor="Internal"						Default="Empty" />
		<Property	Name="Equipment"				Type="Equipment"		Accessor="Internal"						Default="Empty" />
		<Property	Name="ProcessFunction"			Type="ProcessFunction"	Accessor="Internal"						Default="Empty" />
		<Property	Name="ScheduledStartDate"		Type="DateTime?"		Accessor="Internal"						Default="Empty" />
		<Property	Name="TargetDate"				Type="DateTime?"		Accessor="Internal"						Default="Empty" />
	</Properties>
	<Settings>
		<SettingsGroup Name="Job">
			<Setting	Name="UseEquipment"	Type="Boolean"	Value="False" />
		</SettingsGroup>
	</Settings>
	<Execution>
		<UserContent Name="Pre" />

		<WorkflowCall Name="Dialog_CreateJobForAssetplanner" WorkflowName="Dialog_CreateJobForAssetplanner">
			<Parameter	Name="DomainObject"				Direction="In"		Value="${DomainObject}" />
			<Parameter	Name="EmployeeContextsToSearch"	Direction="In"		Value="${EmployeeContextToSearch}" />
			<Parameter	Name="Description"				Direction="InOut"	Value="${Description}"				OutputProperty="${Description}" />
			<Parameter	Name="Employee"					Direction="InOut"	Value="${Employee}"					OutputProperty="${Employee}" />
			<Parameter	Name="ScheduledStartDate"		Direction="InOut"	Value="${ScheduledStartDate}"		OutputProperty="${ScheduledStartDate}" />
			<Parameter	Name="TargetDate"				Direction="InOut"	Value="${TargetDate}"				OutputProperty="${TargetDate}" />
		</WorkflowCall>

		<Choose Name="is this an Equipment or a ProcessFunction">
			<When Name="Is this an Equiment" Condition="${DomainObject.EntityName} == Equipment">
				<Assign Name="Set Equipment" Property="${Equipment}" Value="${DomainObject}" />
			</When>


			<When Name="Is this a ProcessFunction" Condition="${DomainObject.EntityName} == ProcessFunction">
				<Assign Name="Set ProcessFunction" Property="${ProcessFunction}" Value="${DomainObject}" />
			</When>

			<Otherwise Name="invalid">
				<Stop Name="Stop" Mode="Abort" />
			</Otherwise>
		</Choose>

		<Transaction>
			<Command Name="Job_CreateAndInitialize" CommandName="Job_CreateAndInitialize">
				<Parameter	Name="Equipment"		Direction="In"		Value="${Equipment}" />
				<Parameter	Name="InitialStatus"	Direction="In"		Value="JobStatus.Created" />
				<Parameter	Name="JobContext"		Direction="In"		Value="${JobContext}" />
				<Parameter	Name="JobCreateMethod"	Direction="In"		Value="CreateStandard" />
				<Parameter	Name="ProcessFunction"	Direction="In"		Value="${ProcessFunction}" />
				<Parameter	Name="Job"				Direction="Out"									OutputProperty="${Job}" />
			</Command>

			<ChangeStatus Name="Change JobStatus" DomainObject="${Job}" NewStatus="${JobStatus}" />

			<Assign Name="Set Description" Property="${Job.Description}" Value="${Description}" />
			<Assign Name="Set ScheduledStartDate" Property="${Job.ScheduledStartDate}" Value="${ScheduledStartDate}" />
			<Assign Name="Set TargetDate" Property="${Job.TargetDate}" Value="${TargetDate}" />
			<Assign Name="Set Employee" Property="${Job.Employee}" Value="${Employee}" />
		</Transaction>

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

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

		<When Name="if no relevant servicelevel found, set planning fields from priority" Condition="${Job.ServiceLevel} == Empty || (${Job.ServiceLevel.ScheduledStartTimeQuantity} == 0 &amp;&amp; #{UltimoSettings.TargetDateFromSlaToJob} == False)">
			<WorkflowCall Name="Job_SetPlanningDatesByPriority" WorkflowName="Job_SetPlanningDatesByPriority">
				<Parameter	Name="Job"	Direction="In"		Value="${Job}" />
			</WorkflowCall>
		</When>

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