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

ActionField1055

Beschrijving: Change status of PaymentTransactionRun (and linked EquipmentMeasurementPointValues) to Processed. Custom: Nee

Propertiesbewerken

Property Type Accessor
PaymentTransactionRun PaymentTransactionRun Root

XMLbewerken

<Workflow Name="ActionField1055" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
	<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
	<Description>Change status of PaymentTransactionRun (and linked EquipmentMeasurementPointValues) to Processed.</Description>
	<Properties>
		<Property	Name="PaymentTransactionRun"	Type="PaymentTransactionRun"	Accessor="Root"		Direction="In" />

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

		<Transaction>
			<Validation Name="PaymentTransactionRunStatus OK?" Condition="${PaymentTransactionRun.Status} == PaymentTransactionRunStatus.Valid" MessageCode="2049">
				<Parameter	Name="Action"					Direction="In"		Value="ProcessValues" />
				<Parameter	Name="PaymentTransactionRun"	Direction="In"		Value="${PaymentTransactionRun}" />
			</Validation>
			<Validation Name="PaymentTransactionRun not already processed?" Condition="${PaymentTransactionRun.ValuesProcessed} == False" MessageCode="2057">
				<Parameter	Name="PaymentTransactionRun"	Direction="In"		Value="${PaymentTransactionRun}" />
			</Validation>

			<GetList Name="Get all transactions" Type="PaymentTransaction" OutputProperty="${PaymentTransactions}" OrderBy="Id" OrderDirection="Ascending">
				<Filters>
					<PropertyFilter	PropertyName="PaymentTransactionRun"	Operator="="		PropertyValue="${PaymentTransactionRun}" />
					<CombinedFilter FilterOperator="Or">
						<CombinedFilter FilterOperator="And">
							<PropertyFilter	PropertyName="ProcessMeasurementPointValue"	Operator="="		PropertyValue="True" />
							<PropertyEmptyFilter PropertyName="EquipmentMeasurementPointValue" />
						</CombinedFilter>
						<CombinedFilter FilterOperator="And">
							<PropertyFilter	PropertyName="CreateMeasurementPointValueForQuantity"	Operator="="		PropertyValue="True" />
							<PropertyEmptyFilter PropertyName="EquipmentMeasurementPointValueForQuantity" />
						</CombinedFilter>
					</CombinedFilter>
				</Filters>
			</GetList>
		</Transaction>

		<ForEach Name="Foreach found PaymentTransaction" In="${PaymentTransactions}" As="PaymentTransaction">
			<WorkflowCall Name="process values for every single transaction" WorkflowName="PaymentTransaction_ProcessValues">
				<Parameter	Name="PaymentTransaction"	Direction="In"		Value="${PaymentTransaction}" />
			</WorkflowCall>
		</ForEach>

		<Comment><![CDATA[ if all PaymentTransaction are processed, then finish the run ]]></Comment>

		<Transaction>
			<Assign Name="Set ValuesProcessed flag" Property="${PaymentTransactionRun.ValuesProcessed}" Value="True" />

			<Choose Name="Check setting to see if all required processing is done">
				<When Name="When setting is ValuesOnly" Condition="#{UltimoSettings.RequirementsToProcessPaymentTransactionRun} == ValuesOnly">
					<ChangeStatus Name="Change status of PaymentTransactionRun" DomainObject="${PaymentTransactionRun}" NewStatus="PaymentTransactionRunStatus.Processed" />
				</When>


				<When Name="When setting is ValuesAndInvoices" Condition="#{UltimoSettings.RequirementsToProcessPaymentTransactionRun} == ValuesAndInvoices">
					<When Name="When invoices are also created already" Condition="${PaymentTransactionRun.InvoicesCreated} == True">
						<ChangeStatus Name="Change status of PaymentTransactionRun" DomainObject="${PaymentTransactionRun}" NewStatus="PaymentTransactionRunStatus.Processed" />
					</When>
				</When>
			</Choose>
		</Transaction>

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