Categorie: reference
Bijgewerkt: 2026-04-08
actionfield workflow actionfield1107
ActionField1107
Beschrijving: Change the status of Batches (with status Emptied) to Expired. Only selected Batches on ArticleGroup and EmptiedDate are changed. Custom: Nee
XMLbewerken
<Workflow Name="ActionField1107" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
<Description>Change the status of Batches (with status Emptied) to Expired. Only selected Batches on ArticleGroup and EmptiedDate are changed.</Description>
<Properties>
<Property Name="Batches" Type="List[Batch]" Accessor="Internal" />
<Property Name="RemarkToAdd" Type="String" Accessor="Internal" />
<Property Name="SetArticleGroup" Type="ArticleGroup" Accessor="Internal" />
<Property Name="SetExpiredBeforeDate" Type="DateTime?" Accessor="Internal" Default="Empty" />
</Properties>
<Execution>
<UserContent Name="Pre" />
<Dialog Name="SetToExpiredBeforeDate" TitleCode="BATCHESTOEXPIRED">
<Container>
<SelectionList Name="ArticleGroup" OutputProperty="${SetArticleGroup}" ColumnName="AgId" />
<DateTime Name="ExpiredBeforeDate" OutputProperty="${SetExpiredBeforeDate}" Required="True" LabelCode="BATCHESTOEXPIREDBEFOREDATE" />
</Container>
</Dialog>
<FormatText Name="BATCHEXPIRED_BEFOREDATE" TextCode="BATCHEXPIRED_BEFOREDATE" Application="LABEL" OutputProperty="${RemarkToAdd}">
<Parameters>
<Parameter Name="SetExpiredBeforeDate" Direction="In" Value="${SetExpiredBeforeDate}" />
</Parameters>
</FormatText>
<Transaction>
<GetList Name="Get Batches to Change to status Expired" Type="Batch" OutputProperty="${Batches}" OrderBy="Id" OrderDirection="Ascending">
<Filters>
<WhenFilter Condition="${SetArticleGroup} != Empty">
<PropertyFilter PropertyName="ArticleGroup" Operator="=" PropertyValue="${SetArticleGroup}" />
</WhenFilter>
<PropertyFilter PropertyName="StatusEmptiedDate" Operator="<" PropertyValue="${SetExpiredBeforeDate}" />
<PropertyFilter PropertyName="Status" Operator="=" PropertyValue="BatchWarehouseLocationStatus.Emptied" />
</Filters>
</GetList>
<ForEach Name="Batch" In="${Batches}" As="Batch">
<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>
<ChangeStatus Name="BatchToExpired" DomainObject="${Batch}" NewStatus="BatchStatus.Expired" />
</ForEach>
</Transaction>
<Message Name="Batches set to expired" MessageCode="2314">
<Parameter Name="Count" Direction="In" Value="${Batches.Count}" />
</Message>
<UserContent Name="Post" />
</Execution>
</Workflow>