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

ActionField599

Beschrijving: Change status of PurchaseRequest via dialog (to status Concept, Active or Closed). Custom: Nee

Propertiesbewerken

Property Type Accessor
PurchaseRequest PurchaseRequest Root

XMLbewerken

<Workflow Name="ActionField599" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
	<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
	<Description>Change status of PurchaseRequest via dialog (to status Concept, Active or Closed).</Description>
	<Properties>
		<Property	Name="PurchaseRequest"		Type="PurchaseRequest"				Accessor="Root"		Direction="In" />

		<Property	Name="ContinueClosing"		Type="RequestResult"				Accessor="Internal" />
		<Property	Name="PurchaseRequestLines"	Type="List[PurchaseRequestLine]"	Accessor="Internal" />
		<Property	Name="Status"				Type="Status"						Accessor="Internal" />
	</Properties>
	<Execution>
		<UserContent Name="Pre" />

		<WorkflowCall Name="StatusDialog" WorkflowName="Dialog_ChooseStatus">
			<Parameter	Name="DomainObject"	Direction="In"		Value="${PurchaseRequest}" />
			<Parameter	Name="Status"		Direction="Out"									OutputProperty="${Status}" />
		</WorkflowCall>

		<UserContent Name="AfterDialog" />

		<When Name="Is the target status closed?" Condition="${Status} == PurchaseRequestStatus.Closed">
			<Transaction>
				<GetList Name="GetPurchaseRequestLines" Type="PurchaseRequestLine" OutputProperty="${PurchaseRequestLines}" OrderBy="Id" OrderDirection="Ascending">
					<Filters>
						<PropertyFilter	PropertyName="Tender"	Operator="="		PropertyValue="${PurchaseRequest}" />
						<PropertyFilter	PropertyName="Status"	Operator="="		PropertyValue="PurchaseRequestLineStatus.Tender" />
					</Filters>
				</GetList>
			</Transaction>
		</When>

		<When Name="If there are PurchaseRequestLines having status tender" Condition="${PurchaseRequestLines} != Empty &amp;&amp; ${PurchaseRequestLines} != Empty">
			<Question Name="Continue Closing Tender If PurchaseRequestLines Are Being Rejected" Type="YesNo" MessageCode="1189" OutputProperty="${ContinueClosing}">
				<Parameter	Name="PurchaseRequest"	Direction="In"		Value="${PurchaseRequest}" />
			</Question>

			<When Name="Continue Closing Tender Answer » Answer Not Affirmative" Condition="${ContinueClosing} != Yes">
				<Stop Name="Stop" Mode="EndAll" />
			</When>
		</When>

		<Transaction>
			<ChangeStatus Name="ChangePurchaseRequestStatus" DomainObject="${PurchaseRequest}" NewStatus="${Status}" />
		</Transaction>

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