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

ActionField1066

Beschrijving: Delete/Create ObjectBatch when WarehouseServeOutType is changed. Custom: Nee

Propertiesbewerken

Property Type Accessor
WarehouseServeOut WarehouseServeOut Root

XMLbewerken

<Workflow Name="ActionField1066" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
	<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
	<Description>Delete/Create ObjectBatch when WarehouseServeOutType is changed.</Description>
	<Properties>
		<Property	Name="WarehouseServeOut"			Type="WarehouseServeOut"			Accessor="Root"		Direction="In" />

		<Property	Name="WareHouseServeOutlines"		Type="List[WarehouseServeOutline]"	Accessor="Internal" />
		<Property	Name="WareHouseServeOutlinesCount"	Type="Int64"						Accessor="Internal" />
	</Properties>
	<Execution>
		<UserContent Name="Pre" />

		<When Name="Check if WareHouseServeOutType is Correction" Condition="${WarehouseServeOut.Type} == WarehouseServeOutType.Correction">
			<Transaction>
				<GetCount Name="Get WareHouseServeOutlines" Type="WarehouseServeOutline" OutputProperty="${WareHouseServeOutlinesCount}">
					<Joins>
						<Join	Name="Article"	Alias="art"	Type="InnerJoin" />
					</Joins>
					<Filters>
						<PropertyFilter	PropertyName="Id.WarehouseServeOut"	Operator="="		PropertyValue="${WarehouseServeOut}" />
						<PropertyFilter	PropertyName="art.RegisterStock"	Operator="="		PropertyValue="False" />
					</Filters>
				</GetCount>
			</Transaction>

			<When Name="WareHouseServeOutlinesCount is positive" Condition="${WareHouseServeOutlinesCount} &gt; 0">
				<Message Name="ArticleRegisterStock is false" MessageCode="2324">
					<Parameter	Name="WarehouseServeOut"	Direction="In"		Value="${WarehouseServeOut}" />
				</Message>

				<Transaction>
					<Assign Name="Rollback WarehouseServeOut.Type" Property="${WarehouseServeOut.Type}" Value="WarehouseServeOutType.Warehouse" />
				</Transaction>

				<Stop Name="Stop" Mode="EndAll" />
			</When>
		</When>

		<Transaction>
			<GetList Name="Get WareHouseServeOutlines" Type="WarehouseServeOutline" OutputProperty="${WareHouseServeOutlines}" OrderBy="Id" OrderDirection="Ascending">
				<Filters>
					<PropertyFilter	PropertyName="Id.WarehouseServeOut"	Operator="="		PropertyValue="${WarehouseServeOut}" />
				</Filters>
			</GetList>
		</Transaction>

		<ForEach Name="Loop WareHouseServeOutlines" In="${WareHouseServeOutlines}" As="WarehouseServeOutline">
			<When Name="Check if inventory method" Condition="${WarehouseServeOutline.Article.InventoryMethod?} != Empty">
				<When Name="Check if WareHouseServeOutType is Correction" Condition="${WarehouseServeOutline.Id.WarehouseServeOut.Type} == WarehouseServeOutType.Correction">
					<WorkflowCall Name="ActionField1066_WarehouseServeOutline_CreateObjectBatchForCorrection" WorkflowName="WarehouseServeOutline_CreateObjectBatchForCorrection">
						<Parameter	Name="WarehouseServeOutline"	Direction="In"		Value="${WarehouseServeOutline}" />
					</WorkflowCall>
				</When>

				<When Name="Check if WareHouseServeOutType is Mutation" Condition="${WarehouseServeOutline.Id.WarehouseServeOut.Type} == WarehouseServeOutType.Warehouse">
					<WorkflowCall Name="ActionField1066_WarehouseServeOutline_CreateObjectBatchForMutation" WorkflowName="WarehouseServeOutline_CreateObjectBatchForMutation">
						<Parameter	Name="WarehouseServeOutline"	Direction="In"		Value="${WarehouseServeOutline}" />
					</WorkflowCall>
				</When>
			</When>

			<WorkflowCall Name="WarehouseServeOutline_SetDefaultWarehouseLocation" WorkflowName="WarehouseServeOutline_SetDefaultWarehouseLocation">
				<Parameter	Name="WarehouseServeOutline"	Direction="In"		Value="${WarehouseServeOutline}" />
			</WorkflowCall>
		</ForEach>

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