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

ActionField1133

Beschrijving: Add AssortmentReservableObjectType (ReservableObjectType) to Assortment. Custom: Nee

Propertiesbewerken

Property Type Accessor
Assortment Assortment Root

XMLbewerken

<Workflow Name="ActionField1133" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
	<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
	<Description>Add AssortmentReservableObjectType (ReservableObjectType) to Assortment.</Description>
	<Properties>
		<Property	Name="Assortment"								Type="Assortment"							Accessor="Root"		Direction="In" />

		<Property	Name="AssortmentReservableObjectTypeList"		Type="List[AssortmentReservableObjectType]"	Accessor="Internal" />
		<Property	Name="CreatedAssortmentReservableObjectType"	Type="AssortmentReservableObjectType"		Accessor="Internal" />
		<Property	Name="EntityName"								Type="String"								Accessor="Internal" />
		<Property	Name="SelectedDomainObject"						Type="DomainObject"							Accessor="Internal" />
		<Property	Name="SelectionList"							Type="String"								Accessor="Internal" />
		<Property	Name="SqlWhereClause"							Type="String"								Accessor="Internal" />
	</Properties>
	<Execution>
		<UserContent Name="Pre" />

		<Validation Name="Check assortment type" Condition="${Assortment.Type} != 0" MessageCode="2243" />
		<Validation Name="Check if type has reservable object types" Condition="${Assortment.Type} == 2 || ${Assortment.Type} == 3 || ${Assortment.Type} == 8" MessageCode="2244" />

		<Transaction>
			<GetList Name="Get current reservable object types on assortment" Type="AssortmentReservableObjectType" OutputProperty="${AssortmentReservableObjectTypeList}" OrderBy="Id.ReservableObjectType" OrderDirection="Ascending">
				<Filters>
					<PropertyFilter	PropertyName="Id.Assortment"	Operator="="		PropertyValue="${Assortment}" />
				</Filters>
			</GetList>

			<When Name="List not empty" Condition="${AssortmentReservableObjectTypeList} != Empty">
				<Assign Name="Set sql where clause" Property="${SqlWhereClause}" Value="ResotId NOT IN (#foreach(${ReservableObjectType} in ${AssortmentReservableObjectTypeList})#each'${ReservableObjectType.Id.ReservableObjectType.Id}'#between, #end)" />
			</When>
		</Transaction>

		<Assign Name="Set selection list configuration" Property="${SelectionList}" Value="Default" />

		<UserContent Name="BeforeDialog" />

		<SystemDialog Name="DialogSelectReservableObject" DialogName="SelectDomainObject">
			<Parameter	Name="EntityName"					Direction="In"		Value="ReservableObjectType" />
			<Parameter	Name="SelectionListConfiguration"	Direction="In"		Value="${SelectionList}" />
			<Parameter	Name="SqlWhereClause"				Direction="In"		Value="${SqlWhereClause}" />
			<Parameter	Name="DomainObject"					Direction="Out"										OutputProperty="${SelectedDomainObject}" />
		</SystemDialog>

		<Transaction>
			<Insert Name="InsertAssortmentReservableObjectType" ObjectType="AssortmentReservableObjectType" OutputProperty="${CreatedAssortmentReservableObjectType}">
				<Parameter	Name="Id.Assortment"			Direction="In"		Value="${Assortment}" />
				<Parameter	Name="Id.ReservableObjectType"	Direction="In"		Value="${SelectedDomainObject}" />
				<Parameter	Name="Context"					Direction="In"		Value="AssortmentReservableObjectTypeContext.Reservation" />
			</Insert>
		</Transaction>

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