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

ActionField793

Beschrijving: Process PickListRun (Change status of PickLists to Active (when Picklist.Activate is true) or delete PickLists (when Picklist.Activate is false)). Custom: Nee

Propertiesbewerken

Property Type Accessor
PickListRun PickListRun Root
CreateReport RequestResult? Optional

XMLbewerken

<Workflow Name="ActionField793" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
	<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
	<Description>Process PickListRun (Change status of PickLists to Active (when Picklist.Activate is true) or delete PickLists (when Picklist.Activate is false)).</Description>
	<Properties>
		<Property	Name="PickListRun"	Type="PickListRun"		Accessor="Root"		Direction="In" />

		<Property	Name="CreateReport"	Type="RequestResult?"	Accessor="Optional"	Direction="In"																												Comment="Set default answer for Question 1600 'Print picklists?' (Yes/No or Empty), when Empty the question will be shown" />

		<Property	Name="Count"		Type="Int64"			Accessor="Internal"						Default="0" />
		<Property	Name="PickLists"	Type="List[PickList]"	Accessor="Internal" />
		<Property	Name="ReportData"	Type="ReportData"		Accessor="Internal" />
		<Property	Name="ReportName"	Type="String"			Accessor="Internal"						Default="=${PickListRun.Context} == PickListRunContext.JobMaterial ? 'PltPrint02-01' : 'PltPrint01-01'" />
	</Properties>
	<Execution>
		<UserContent Name="Pre" />

		<Transaction>
			<GetCount Name="Get Created PickLists" Type="PickList" OutputProperty="${Count}">
				<Filters>
					<PropertyFilter	PropertyName="PickListRun"	Operator="="		PropertyValue="${PickListRun}" />
				</Filters>
			</GetCount>

			<Validation Name="PickLists Generated" Condition="${Count} &gt; 0" MessageCode="1625" />

			<GetCount Name="Get Created PickLists" Type="PickList" OutputProperty="${Count}">
				<Filters>
					<CombinedFilter FilterOperator="And">
						<PropertyFilter	PropertyName="PickListRun"	Operator="="		PropertyValue="${PickListRun}" />
						<PropertyFilter	PropertyName="Activate"		Operator="="		PropertyValue="True" />
					</CombinedFilter>
				</Filters>
			</GetCount>
		</Transaction>

		<Choose Name="Activate">
			<When Name="Nothing to activate" Condition="${Count} == 0">
				<ContinuationQuestion Name="Continue" MessageCode="1608" />
			</When>


			<When Name="should ask CreateReport" Condition="${CreateReport} == Empty">
				<Question Name="CreateReport Yes/No" Type="YesNo" MessageCode="1600" OutputProperty="${CreateReport}" />
			</When>
		</Choose>

		<Transaction>
			<GetList Name="Get removable PickLists" Type="PickList" OutputProperty="${PickLists}" OrderBy="Id" OrderDirection="Ascending">
				<Filters>
					<CombinedFilter FilterOperator="And">
						<PropertyFilter	PropertyName="PickListRun"	Operator="="		PropertyValue="${PickListRun}" />
						<PropertyFilter	PropertyName="Activate"		Operator="="		PropertyValue="False" />
					</CombinedFilter>
				</Filters>
			</GetList>

			<ForEach Name="RemovePickList" In="${PickLists}" As="RemovePickList">
				<DeleteObject Name="Delete PickList" DomainObject="${RemovePickList}" />
			</ForEach>

			<GetList Name="Get activatable PickLists" Type="PickList" OutputProperty="${PickLists}" OrderBy="Id" OrderDirection="Ascending">
				<Filters>
					<CombinedFilter FilterOperator="And">
						<PropertyFilter	PropertyName="PickListRun"	Operator="="		PropertyValue="${PickListRun}" />
						<PropertyFilter	PropertyName="Activate"		Operator="="		PropertyValue="True" />
					</CombinedFilter>
				</Filters>
			</GetList>

			<ForEach Name="PickList" In="${PickLists}" As="PickList">
				<ChangeStatus Name="Active PickList" DomainObject="${PickList}" NewStatus="PickListStatus.Active" />
			</ForEach>
		</Transaction>

		<UserContent Name="Post" />

		<When Name="Activated picklists" Condition="${Count} &gt; 0">
			<Message Name="Activated_PickLists" MessageCode="1624">
				<Parameter	Name="PickLists"	Direction="In"		Value="${PickLists}" />
			</Message>

			<When Name="Should show report" Condition="${CreateReport} == Yes">
				<CreateReport Name="Report" ReportName="${ReportName}" ReportType="Pdf" OutputProperty="${ReportData}">
					<ReportFormulaValue Name="F1" ColumnName="PltId" Operator="In" Value="${PickLists}" ResultType="String" />
				</CreateReport>

				<View Name="Report" ViewName="Report">
					<Parameter	Name="ReportData"	Direction="In"		Value="${ReportData}" />
				</View>
			</When>
		</When>
	</Execution>
</Workflow>