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

ActionField1628

Beschrijving: Create ObjectDownTime via dialog. Custom: Nee

Propertiesbewerken

Property Type Accessor
DomainObject DomainObject Root
ObjectDowntimes List[ObjectDowntime] Optional

XMLbewerken

<Workflow Name="ActionField1628" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
	<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
	<Description>Create ObjectDownTime via dialog.</Description>
	<Properties>
		<Property	Name="DomainObject"				Type="DomainObject"			Accessor="Root"		Direction="In" />

		<Property	Name="ObjectDowntimes"			Type="List[ObjectDowntime]"	Accessor="Optional"	Direction="Out"		Default="Empty" />

		<Property	Name="ApproveObjectDownTime"	Type="Boolean"				Accessor="Internal"						Default="True" />
		<Property	Name="ChildObjectDowntimes"		Type="List[ObjectDowntime]"	Accessor="Internal"						Default="Empty" />
		<Property	Name="Description"				Type="String"				Accessor="Internal"						Default="Empty" />
		<Property	Name="EndDate"					Type="DateTime?"			Accessor="Internal"						Default="Empty" />
		<Property	Name="ObjectDowntime"			Type="ObjectDowntime"		Accessor="Internal"						Default="Empty" />
		<Property	Name="SetDowntimeOnChildren"	Type="Boolean"				Accessor="Internal"						Default="False" />
		<Property	Name="SetDowntimeOnParents"		Type="Boolean"				Accessor="Internal"						Default="False" />
		<Property	Name="StartDate"				Type="DateTime?"			Accessor="Internal"						Default="Empty" />
	</Properties>
	<Execution>
		<UserContent Name="Pre" />

		<WorkflowCall Name="Dialog_InsertObjectDowntime" WorkflowName="Dialog_InsertObjectDowntime">
			<Parameter	Name="DomainObject"				Direction="In"		Value="${DomainObject}" />
			<Parameter	Name="ApproveObjectDownTime"	Direction="InOut"	Value="${ApproveObjectDownTime}"	OutputProperty="${ApproveObjectDownTime}" />
			<Parameter	Name="Description"				Direction="InOut"	Value="${Description}"				OutputProperty="${Description}" />
			<Parameter	Name="EndDate"					Direction="InOut"	Value="${EndDate}"					OutputProperty="${EndDate}" />
			<Parameter	Name="SetDowntimeOnChildren"	Direction="InOut"	Value="${SetDowntimeOnChildren}"	OutputProperty="${SetDowntimeOnChildren}" />
			<Parameter	Name="SetDowntimeOnParents"		Direction="InOut"	Value="${SetDowntimeOnParents}"		OutputProperty="${SetDowntimeOnParents}" />
			<Parameter	Name="StartDate"				Direction="InOut"	Value="${StartDate}"				OutputProperty="${StartDate}" />
		</WorkflowCall>

		<Transaction>
			<Insert Name="Insert ObjectDowntime" ObjectType="ObjectDowntime" OutputProperty="${ObjectDowntime}">
				<Parameter	Name="Context"					Direction="In"		Value="ObjectDowntimeContext.Planned" />
				<Parameter	Name="Status"					Direction="In"		Value="ObjectDowntimeStatus.Concept" />
				<Parameter	Name="Description"				Direction="In"		Value="${Description}" />
				<Parameter	Name="EndDate"					Direction="In"		Value="${EndDate}" />
				<Parameter	Name="SetDowntimeOnChildren"	Direction="In"		Value="${SetDowntimeOnChildren}" />
				<Parameter	Name="SetDowntimeOnParents"		Direction="In"		Value="${SetDowntimeOnParents}" />
				<Parameter	Name="StartDate"				Direction="In"		Value="${StartDate}" />
			</Insert>

			<When Name="Equipment" Condition="${DomainObject.EntityName} == Equipment">
				<Assign Name="Set Equipment" Property="${ObjectDowntime.Equipment}" Value="${DomainObject}" />
			</When>

			<When Name="ProcessFunction" Condition="${DomainObject.EntityName} == ProcessFunction">
				<Assign Name="Set ProcessFunction" Property="${ObjectDowntime.ProcessFunction}" Value="${DomainObject}" />
			</When>

			<When Name="ApproveObjectDownTime is true" Condition="${ApproveObjectDownTime} == true">
				<ChangeStatus Name="Set status to Approve" DomainObject="${ObjectDowntime}" NewStatus="ObjectDowntimeStatus.Approved" />
			</When>

			<AddToList Name="Add ObjectDowntime to list" List="${ObjectDowntimes}" Item="${ObjectDowntime}" Comment="HIER" />

			<GetList Name="Get child objectDowntimes" Type="ObjectDowntime" OutputProperty="${ChildObjectDowntimes}" OrderBy="Id" OrderDirection="Ascending">
				<Filters>
					<PropertyFilter	PropertyName="PartOfObjectDowntime"	Operator="="		PropertyValue="${ObjectDowntime}" />
				</Filters>
			</GetList>

			<ForEach Name="Loop ObjectDowntimes" In="${ChildObjectDowntimes}" As="ChildObjectDowntime">
				<AddToList Name="Add childSchedulerItem to list" List="${ObjectDowntimes}" Item="${ChildObjectDowntime}" />
			</ForEach>

			<When Name="Check PartOfObjectDowntime" Condition="${ObjectDowntime.PartOfObjectDowntime} != Empty">
				<AddToList Name="Add parentSchedulerItem to list" List="${ObjectDowntimes}" Item="${ObjectDowntime.PartOfObjectDowntime}" />
			</When>
		</Transaction>

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