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

ActionField1844

Beschrijving: Change status of PermitType to Open or Approved. Custom: Nee

Propertiesbewerken

Property Type Accessor
PermitType PermitType Root
Status Status Optional

XMLbewerken

<Workflow Name="ActionField1844" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
	<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
	<Description>Change status of PermitType to Open or Approved.</Description>
	<Properties>
		<Property	Name="PermitType"				Type="PermitType"	Accessor="Root"		Direction="In" />

		<Property	Name="Status"					Type="Status"		Accessor="Optional"	Direction="In" />

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

		<When Name="The PermitType is reopened?" Condition="${Status} == PermitTypeStatus.Created">
			<Transaction>
				<GetList Type="Permit" OutputProperty="${LinkedPermitTemplates}" OrderBy="Id" OrderDirection="Ascending">
					<Filters>
						<PropertyFilter	PropertyName="Context"	Operator="="		PropertyValue="PermitContext.WorkPermitTemplate" />
						<PropertyFilter	PropertyName="Status"	Operator="="		PropertyValue="PermitStatus.TemplateApproved" />
						<InFilter PropertyName="Id">
							<Subquery Type="PermitPermitType">
								<Filters>
									<PropertyFilter	PropertyName="PermitType"	Operator="="		PropertyValue="${PermitType}" />
								</Filters>
								<Properties>
									<Property Name="Permit" Type="Property" />
								</Properties>
							</Subquery>
						</InFilter>
					</Filters>
				</GetList>
			</Transaction>

			<When Name="There are already approved linked work permit templates?" Condition="${LinkedPermitTemplates.Count} &gt; 0">
				<ContinuationQuestion Name="Continue to reopen?" MessageCode="3859">
					<Parameter	Name="NumberOfLinkedPermitTemplates"	Direction="In"		Value="${LinkedPermitTemplates.Count}" />
					<Parameter	Name="PermitType"						Direction="In"		Value="${PermitType}" />
				</ContinuationQuestion>
			</When>
		</When>

		<Transaction>
			<ForEach In="${LinkedPermitTemplates}" As="LinkedPermitTemplate">
				<ChangeStatus Name="Reopen Template" DomainObject="${LinkedPermitTemplate}" NewStatus="PermitStatus.TemplateCreated" />
			</ForEach>

			<ChangeStatus DomainObject="${PermitType}" NewStatus="${Status}" />
		</Transaction>

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