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

ActionField1070

Beschrijving: Change status of Batch(WarehouseLocations) to Active when status is Blocked. Change status of Batch(WarehouseLocations) to Blocked when status is Active or Emptied. Custom: Nee

Propertiesbewerken

Property Type Accessor
Batch Batch Root

XMLbewerken

<Workflow Name="ActionField1070" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
	<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
	<Description>Change status of Batch(WarehouseLocations) to Active when status is Blocked. Change status of Batch(WarehouseLocations) to Blocked when status is Active or Emptied.</Description>
	<Properties>
		<Property	Name="Batch"		Type="Batch"						Accessor="Root"		Direction="In" />

		<Property	Name="Locations"	Type="List[BatchWarehouseLocation]"	Accessor="Internal" />
		<Property	Name="RemarkToAdd"	Type="String"						Accessor="Internal" />
	</Properties>
	<Execution>
		<UserContent Name="Pre" />

		<Dialog Name="Batch Remark" TitleCode="REMARKS">
			<Container>
				<TextArea Name="RemarkToAdd" OutputProperty="${RemarkToAdd}" Required="True" LabelCode="REMARK" />
			</Container>
		</Dialog>

		<Transaction>
			<Choose Name="Change Batch Status">
				<When Name="Current state is Blocked" Condition="${Batch.Status} == BatchStatus.Blocked">
					<GetList Name="Get BatchWarehouseLocations to change" Type="BatchWarehouseLocation" OutputProperty="${Locations}" OrderBy="Id" OrderDirection="Ascending">
						<Filters>
							<PropertyFilter	PropertyName="Id.Batch"	Operator="="		PropertyValue="${Batch}" />
							<InFilter PropertyName="Status" Values="BatchWarehouseLocationStatus.Blocked, BatchWarehouseLocationStatus.Emptied" />
						</Filters>
					</GetList>

					<ChangeStatus Name="Set Batch to Active" DomainObject="${Batch}" NewStatus="BatchStatus.Active" />

					<ForEach Name="Location" In="${Locations}" As="Location">
						<ChangeStatus Name="Set Location to Active" DomainObject="${Location}" NewStatus="BatchWarehouseLocationStatus.Active" />

						<WorkflowCall Name="BatchWarehouseLocation_DetermineStatus" WorkflowName="BatchWarehouseLocation_DetermineStatus">
							<Parameter	Name="BatchWarehouseLocation"	Direction="In"		Value="${Location}" />
						</WorkflowCall>
					</ForEach>
				</When>

				<Otherwise Name="State is Active or Empty">
					<When Name="Current state is Active or Empty" Condition="${Batch.Status} == BatchStatus.Active || ${Batch.Status} == BatchStatus.Emptied">
						<ChangeStatus Name="Set Batch to Blocked" DomainObject="${Batch}" NewStatus="BatchStatus.Blocked" />
					</When>
				</Otherwise>
			</Choose>

			<FormatText Name="BATCHSTATUS_UNLOCK_LOCK" TextCode="BATCHSTATUS_UNLOCK_LOCK" Application="LABEL" OutputProperty="${RemarkToAdd}">
				<Parameters>
					<Parameter	Name="Batch"		Direction="In"		Value="${Batch}" />
					<Parameter	Name="RemarkToAdd"	Direction="In"		Value="${RemarkToAdd}" />
				</Parameters>
			</FormatText>

			<Command Name="Remark" CommandName="HtmlColumn_GetComment">
				<Parameter	Name="AddDescription"		Direction="In"		Value="${RemarkToAdd}" />
				<Parameter	Name="CurrentDescription"	Direction="In"		Value="${Batch.RemarkText}" />
				<Parameter	Name="Date"					Direction="In"		Value="#{Environment.CurrentDateTime}" />
				<Parameter	Name="Employee"				Direction="In"		Value="#{User.EmployeeId}" />
				<Parameter	Name="CombinedDescription"	Direction="Out"												OutputProperty="${Batch.RemarkText}" />
			</Command>
		</Transaction>

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