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

ActionField996

Beschrijving: Create new SafetyIncident for JobInspectionLine (CourseRoute). Custom: Nee

Propertiesbewerken

Property Type Accessor
JobInspectionLine JobInspectionLine Root

XMLbewerken

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

		<Property	Name="CreatedObjectDamage"		Type="ObjectDamage"			Accessor="Internal" />
		<Property	Name="CreatedSafetyIncident"	Type="SafetyIncident"		Accessor="Internal" />
	</Properties>
	<Execution>
		<UserContent Name="Pre" />

		<Validation Name="There is already a safety incident present for this course route" Condition="${JobInspectionLine.SafetyIncident} == Empty" MessageCode="1906">
			<Parameter	Name="JobInspectionLine"	Direction="In"		Value="${JobInspectionLine}" />
		</Validation>

		<Transaction>
			<Insert Name="CreateANewSafetyIncident" ObjectType="SafetyIncident" OutputProperty="${CreatedSafetyIncident}">
				<Parameter	Name="Status"					Direction="In"		Value="SafetyIncidentStatus.Created" />
				<Parameter	Name="ReportText"				Direction="In"		Value="#contextdescription_capital(${JobInspectionLine.Id.Job}) ${JobInspectionLine.Id.Job.Id} - ${JobInspectionLine.Id.Job.Description}:#{SpecialCharacters.NewLine}${JobInspectionLine.InspectionLine.Description}&lt;BR&gt;" />
				<Parameter	Name="StatusCreatedDate"		Direction="In"		Value="#{Environment.CurrentDateTime}" />
				<Parameter	Name="StatusCreatedEmployee"	Direction="In"		Value="#{User.EmployeeId}" />
			</Insert>

			<Assign Name="Attach newly created SafetyIncident to JobInspectionLine" Property="${JobInspectionLine.SafetyIncident}" Value="${CreatedSafetyIncident}" />

			<When Name="There is an Equipment or ProcessFunction on InspectionLine" Condition="${JobInspectionLine.InspectionLine.Equipment?} != Empty || ${JobInspectionLine.InspectionLine.ProcessFunction?} != Empty">
				<Insert Name="CreateANewObjectDamageAndCopyFromInspectionLine" ObjectType="ObjectDamage" OutputProperty="${CreatedObjectDamage}">
					<Parameter	Name="Equipment"		Direction="In"		Value="${JobInspectionLine.InspectionLine.Equipment}" />
					<Parameter	Name="ProcessFunction"	Direction="In"		Value="${JobInspectionLine.InspectionLine.ProcessFunction}" />
					<Parameter	Name="SafetyIncident"	Direction="In"		Value="${CreatedSafetyIncident}" />
				</Insert>
			</When>
		</Transaction>

		<UserContent Name="Post" />

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