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

ActionField1761

Beschrijving: Modify leave(EmployeeLabourDateline) for Employee (jobplanner via dragging). Custom: Nee

Propertiesbewerken

Property Type Accessor
EmployeeId String Optional
EndDateTime DateTime Optional
StartDateTime DateTime Optional
TimeReservation TimeReservation Root
DeletedJobIds List[String] Optional
DeletedJobSchedulePartsIds List[String] Optional
ExistingJobScheduleParts List[JobSchedulePart] Optional

XMLbewerken

<Workflow Name="ActionField1761" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
	<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
	<Description>Modify leave(EmployeeLabourDateline) for Employee (jobplanner via dragging).</Description>
	<Properties>
		<Property	Name="EmployeeId"					Type="String"					Accessor="Optional"	Direction="In"		Default="Empty"			Comment="Moved to another employee" />
		<Property	Name="EndDateTime"					Type="DateTime"					Accessor="Optional"	Direction="In"								Comment="The enddate of the leave" />
		<Property	Name="StartDateTime"				Type="DateTime"					Accessor="Optional"	Direction="In"								Comment="The startdate of the leave" />

		<Property	Name="TimeReservation"				Type="TimeReservation"			Accessor="Root"		Direction="InOut" />

		<Property	Name="DeletedJobIds"				Type="List[String]"				Accessor="Optional"	Direction="Out"								Comment="List with Ids of the deleted jobs" />
		<Property	Name="DeletedJobSchedulePartsIds"	Type="List[String]"				Accessor="Optional"	Direction="Out"								Comment="List with Ids of the deleted jobscheduleparts" />
		<Property	Name="ExistingJobScheduleParts"		Type="List[JobSchedulePart]"	Accessor="Optional"	Direction="Out"								Comment="List with Ids of the existing jobscheduleparts" />

		<Property	Name="Employee"						Type="Employee"					Accessor="Internal"						Default="${EmployeeId}" />
		<Property	Name="Timeslots"					Type="List[Timeslot]"			Accessor="Internal" />
		<Property	Name="UnscheduleJobScheduleParts"	Type="Boolean"					Accessor="Internal"						Default="True"			Comment="If set to False in UserContent Pre, the checkbox 'Unschedule jobs' will be unticked as default." />
	</Properties>
	<Execution>
		<UserContent Name="Pre" />

		<Validation Name="Check TimeReservationPattern" Condition="${TimeReservation.Pattern} == Empty" MessageCode="3503" Comment="It is not possible to schedule recursive leave" />
		<Validation Name="Check Employee" Condition="${Employee} == Empty || ${TimeReservation.Employee} == ${Employee}" MessageCode="3574" Comment="It is not possible to move a leave to another employee">
			<Parameter	Name="Employee"			Direction="In"		Value="${Employee}" />
			<Parameter	Name="TimeReservation"	Direction="In"		Value="${TimeReservation}" />
		</Validation>

		<Transaction>
			<WorkflowCall Name="Update leave for employee" WorkflowName="TimeReservation_CreateOrUpdateLeaveForEmployee">
				<Parameter	Name="Employee"						Direction="In"		Value="${TimeReservation.Employee}" />
				<Parameter	Name="EndDate"						Direction="In"		Value="${EndDateTime}" />
				<Parameter	Name="HourCode"						Direction="In"		Value="${TimeReservation.HourCode}" />
				<Parameter	Name="Recursive"					Direction="In"		Value="False" />
				<Parameter	Name="StartDate"					Direction="In"		Value="${StartDateTime}" />
				<Parameter	Name="TimeslotPattern"				Direction="In"		Value="Empty" />
				<Parameter	Name="UnscheduleJobScheduleParts"	Direction="In"		Value="${UnscheduleJobScheduleParts}" />
				<Parameter	Name="TimeReservation"				Direction="InOut"	Value="${TimeReservation}"				OutputProperty="${TimeReservation}" />
				<Parameter	Name="DeletedJobIds"				Direction="Out"												OutputProperty="${DeletedJobIds}" />
				<Parameter	Name="DeletedJobSchedulePartsIds"	Direction="Out"												OutputProperty="${DeletedJobSchedulePartsIds}" />
				<Parameter	Name="Timeslots"					Direction="Out"												OutputProperty="${Timeslots}" />
			</WorkflowCall>
		</Transaction>

		<Transaction>
			<GetList Name="Get existing JobScheduleParts" Type="JobSchedulePart" OutputProperty="${ExistingJobScheduleParts}" OrderBy="Id" OrderDirection="Ascending">
				<Joins>
					<Join	Name="Job"	Alias="job"	Type="InnerJoin" />
				</Joins>
				<Filters>
					<PropertyFilter	PropertyName="Employee"	Operator="="		PropertyValue="${TimeReservation.Employee}" />
					<NotFilter>
						<InFilter PropertyName="job.Status" Values="JobStatus.Completed,JobStatus.Finished,JobStatus.Closed" />
					</NotFilter>
				</Filters>
			</GetList>
		</Transaction>

		<When Name="ScheduleMethod" Condition="#{Settings.GraphicOverviewJobScheduler.ScheduleMethod} == JobSequence &amp;&amp; ${DeletedJobIds} != Empty &amp;&amp; ${DeletedJobIds.Count} &gt; 0">
			<Message Name="Show deleted Jobs" MessageCode="3580">
				<Parameter	Name="JobIds"	Direction="In"		Value="${DeletedJobIds}" />
			</Message>
		</When>

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