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

ActionField1862

Beschrijving: Delete ComponentProblems linked to Component when the Component should no longer be linked to specific ComponentProblems. Custom: Nee

Propertiesbewerken

Property Type Accessor
Component Component Root

XMLbewerken

<Workflow Name="ActionField1862" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
	<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
	<Description>Delete ComponentProblems linked to Component when the Component should no longer be linked to specific ComponentProblems.</Description>
	<Properties>
		<Property	Name="Component"				Type="Component"						Accessor="Root"		Direction="In" />

		<Property	Name="DeleteComponentProblems"	Type="RequestResult"					Accessor="Internal"						Default="Yes" />
		<Property	Name="LinkedComponentProblems"	Type="List[ComponentComponentProblem]"	Accessor="Internal" />
	</Properties>
	<Execution>
		<UserContent Name="Pre" />

		<Transaction>
			<GetList Name="Get linked component problems" Type="ComponentComponentProblem" OutputProperty="${LinkedComponentProblems}" OrderBy="Id" OrderDirection="Ascending">
				<Filters>
					<PropertyFilter	PropertyName="Component"	Operator="="		PropertyValue="${Component}" />
				</Filters>
			</GetList>
		</Transaction>

		<When Name="Specific linked component problems exist" Condition="${LinkedComponentProblems.Count} &gt; 0">
			<Question Name="Delete the linked component problems?" Type="YesNo" MessageCode="3882" Default="Yes" OutputProperty="${DeleteComponentProblems}">
				<Parameter	Name="Component"					Direction="In"		Value="${Component}" />
				<Parameter	Name="LinkedComponentProblemsCount"	Direction="In"		Value="${LinkedComponentProblems.Count}" />
			</Question>

			<Transaction>
				<Choose>
					<When Condition="${DeleteComponentProblems} == No">
						<Assign Name="Set UseSpecificComponentProblems back to true" Property="${Component.UseSpecificComponentProblems}" Value="True" />
					</When>

					<Otherwise>
						<ForEach Name="Loop linked component problems" In="${LinkedComponentProblems}" As="LinkedComponentProblem">
							<DeleteObject Name="Delete linked component problem" DomainObject="${LinkedComponentProblem}" />
						</ForEach>
					</Otherwise>
				</Choose>
			</Transaction>
		</When>

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