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

ActionField377

Beschrijving: Change status of WarehouseServeOut(Lines) to Approved (status must be TransferCreated). Custom: Nee

Propertiesbewerken

Property Type Accessor
WarehouseServeOut WarehouseServeOut Root
AutoAnswerAskAllowNegativeArticleStock Boolean? Optional

XMLbewerken

<Workflow Name="ActionField377" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
	<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
	<Description>Change status of WarehouseServeOut(Lines) to Approved (status must be TransferCreated).</Description>
	<Properties>
		<Property	Name="WarehouseServeOut"						Type="WarehouseServeOut"			Accessor="Root"		Direction="In" />

		<Property	Name="AutoAnswerAskAllowNegativeArticleStock"	Type="Boolean?"						Accessor="Optional"	Direction="In"		Comment="Answer for question AskAllowNegativeArticleStock. If Empty, question appears" />

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

		<Validation Name="ValidateTransferCreated" Condition="${WarehouseServeOut.Status} == WarehouseServeOutStatus.TransferCreated" MessageCode="0771">
			<Parameter	Name="WarehouseServeOut"	Direction="In"		Value="${WarehouseServeOut}" />
		</Validation>
		<Assign Name="AssignAllowNegativeArticleStock" Property="#{Settings.WarehouseServeOutline.AutoAnswerAskAllowNegativeArticleStock}" Value="${AutoAnswerAskAllowNegativeArticleStock}" />

		<When Name="AutoAnswerAskAllowNegativeArticleStock is false" Condition="${AutoAnswerAskAllowNegativeArticleStock} == False || ${AutoAnswerAskAllowNegativeArticleStock} == Empty">
			<Transaction>
				<GetList Name="WarehouseServeOutlines" Type="WarehouseServeOutline" OutputProperty="${WarehouseServeOutlines}" OrderBy="Id" OrderDirection="Ascending">
					<Filters>
						<PropertyFilter	PropertyName="Id.WarehouseServeOut"	Operator="="		PropertyValue="${WarehouseServeOut}" />
					</Filters>
				</GetList>

				<Validation Name="WarehouseServeOutlines available" Condition="${WarehouseServeOutlines.Count} &gt; 0" MessageCode="1408">
					<Parameter	Name="WarehouseServeOut"	Direction="In"		Value="${WarehouseServeOut}" />
				</Validation>
				<Validation Name="ValidateToWarehouse" Condition="${WarehouseServeOut.ToWarehouse} != Empty" MessageCode="0963">
					<Parameter	Name="WarehouseServeOut"	Direction="In"		Value="${WarehouseServeOut}" />
				</Validation>
			</Transaction>

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

			<Assign Name="AssignAllowNegativeArticleStock" Property="#{Settings.WarehouseServeOutline.AutoAnswerAskAllowNegativeArticleStock}" Value="True" />
		</When>

		<Transaction>
			<ChangeStatus Name="ApproveWarehouseServeOut" DomainObject="${WarehouseServeOut}" NewStatus="WarehouseServeOutStatus.TransferApproved" Comment="Will trigger WarehouseServeOut_PreApprove" />
		</Transaction>

		<Message Name="ChangeProjectStatusToTransferApprovedMessage" MessageCode="0778">
			<Parameter	Name="WarehouseServeOut"	Direction="In"		Value="${WarehouseServeOut}" />
		</Message>

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