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

ActionField556

Beschrijving: Add Employee to rostergroup with Id of property RosterGroupId Custom: Nee

Propertiesbewerken

Property Type Accessor
Employee Employee Root
EndDate DateTime? Optional
RosterGroupId String Optional
StartDate DateTime? Optional

XMLbewerken

<Workflow Name="ActionField556" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
	<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
	<Description>Add Employee to rostergroup with Id of property RosterGroupId</Description>
	<Properties>
		<Property	Name="Employee"			Type="Employee"				Accessor="Root"		Direction="In" />

		<Property	Name="EndDate"			Type="DateTime?"			Accessor="Optional"	Direction="In" />
		<Property	Name="RosterGroupId"	Type="String"				Accessor="Optional"	Direction="In" />
		<Property	Name="StartDate"		Type="DateTime?"			Accessor="Optional"	Direction="In" />

		<Property	Name="RosterGroup"		Type="RosterGroup"			Accessor="Internal" />
		<Property	Name="RosterGroups"		Type="List[RosterGroup]"	Accessor="Internal" />
	</Properties>
	<Execution>
		<UserContent Name="Pre" />

		<Transaction>
			<Validation Name="Validate rostergroup id" Condition="${RosterGroupId} != Empty" MessageCode="0727" />

			<GetItem Name="Get rostergroup" Type="RosterGroup" OutputProperty="${RosterGroup}">
				<Filters>
					<PropertyFilter	PropertyName="Id"	Operator="="		PropertyValue="${RosterGroupId}" />
				</Filters>
			</GetItem>

			<When Name="RosterGroupId not found" Condition="${RosterGroup} == Empty">
				<GetList Name="Get All RosterGroups" Type="RosterGroup" OutputProperty="${RosterGroups}" OrderBy="Id" OrderDirection="Ascending" />

				<When Name="One rostergroupFound" Condition="${RosterGroups.Count} == 1">
					<Assign Name="Set Rostergoup" Property="${RosterGroup}" Value="=#elementat(${RosterGroups}, 0)" />
				</When>
			</When>

			<Validation Name="Validate rostergroup" Condition="${RosterGroup} != Empty" MessageCode="0822">
				<Parameter	Name="Employee"			Direction="In"		Value="${Employee}" />
				<Parameter	Name="RosterGroupId"	Direction="In"		Value="${RosterGroupId}" />
				<Parameter	Name="RosterGroups"		Direction="In"		Value="${RosterGroups}" />
			</Validation>

			<Command Name="Add employee to rostergroup" CommandName="RosterGroup_AddEmployee">
				<Parameter	Name="Employee"		Direction="In"		Value="${Employee}" />
				<Parameter	Name="EndDate"		Direction="In"		Value="${EndDate}" />
				<Parameter	Name="RosterGroup"	Direction="In"		Value="${RosterGroup}" />
				<Parameter	Name="StartDate"	Direction="In"		Value="${StartDate}" />
			</Command>

			<Command Name="Recalculate EmployeeLabourDatelines" CommandName="TimeReservation_RecalculateAllEmployeeLabourDatelines" Comment="Restore TimeReservations after deleting TimeReservation.">
				<Parameter	Name="Employee"		Direction="In"		Value="${Employee}" />
				<Parameter	Name="EndDate"		Direction="In"		Value="${EndDate}" />
				<Parameter	Name="StartDate"	Direction="In"		Value="${StartDate}" />
			</Command>
		</Transaction>

		<UserContent Name="Post" />

		<Message Name="Done" MessageCode="0728">
			<Parameter	Name="Employee"		Direction="In"		Value="${Employee}" />
			<Parameter	Name="RosterGroup"	Direction="In"		Value="${RosterGroup}" />
		</Message>
	</Execution>
</Workflow>