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

ActionField666

Beschrijving: Create PmJob (CourseRoute template) for PmWorkOrder Custom: Nee

Propertiesbewerken

Property Type Accessor
PmWorkOrder PmWorkOrder Root
PmJobContext Context Optional

XMLbewerken

<Workflow Name="ActionField666" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
	<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
	<Description>Create PmJob (CourseRoute template) for PmWorkOrder</Description>
	<Properties>
		<Property	Name="PmWorkOrder"	Type="PmWorkOrder"	Accessor="Root"		Direction="In" />

		<Property	Name="PmJobContext"	Type="Context"		Accessor="Optional"	Direction="In"		Default="PmJobContext.CourseRoute"	Comment="Create PmJob with this context" />

		<Property	Name="PmJob"		Type="PmJob"		Accessor="Internal" />
	</Properties>
	<Execution>
		<UserContent Name="Pre" />

		<Transaction>
			<Choose Name="CheckIfPmWorkOrderHasPmJob">
				<When Name="PmWorkOrderHasNoPmJob" Condition="${PmWorkOrder.PmJobs} == Empty">
					<Insert Name="Create pmjob" ObjectType="PmJob" OutputProperty="${PmJob}">
						<Parameter	Name="Id.PmWorkOrder"	Direction="In"		Value="${PmWorkOrder}" />
						<Parameter	Name="Context"			Direction="In"		Value="${PmJobContext}" />
						<Parameter	Name="Status"			Direction="In"		Value="PmJobStatus.Created" />
						<Parameter	Name="Description"		Direction="In"		Value="${PmWorkOrder.Description}" />
					</Insert>
				</When>

				<Otherwise Name="Get PmJob">
					<ForEach Name="Foreach PmJob" In="${PmWorkOrder.PmJobs}" As="FindPmJob">
						<Assign Name="Use pmjob" Property="${PmJob}" Value="${FindPmJob}" />
					</ForEach>
				</Otherwise>
			</Choose>
		</Transaction>

		<UserContent Name="Post" />

		<View Name="Open PmJob" ViewName="DataEntryScreen">
			<Parameter	Name="DomainObject"			Direction="In"		Value="${PmJob}" />
			<Parameter	Name="FocusEditableField"	Direction="In"		Value="=${PmJob.Description} == Empty" />
			<Parameter	Name="ScreenName"			Direction="In"		Value="Empty" />
		</View>
	</Execution>
</Workflow>