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

ActionField477

Beschrijving: Create an Incident for this Job. Custom: Nee

Propertiesbewerken

Property Type Accessor
Job Job Root
CloseJob Boolean Optional
FormName UltimoString Optional
IncidentContext Context Optional

XMLbewerken

<Workflow Name="ActionField477" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
	<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
	<Description>Create an Incident for this Job.</Description>
	<Properties>
		<Property	Name="Job"				Type="Job"			Accessor="Root"		Direction="In" />

		<Property	Name="CloseJob"			Type="Boolean"		Accessor="Optional"	Direction="In"		Default="False"	Comment="Change status of Job to Closed when Job status is Created, Approved or Requested" />
		<Property	Name="FormName"			Type="UltimoString"	Accessor="Optional"	Direction="In"		Default="Inc01"	Comment="Open this screen with the created Incident" />
		<Property	Name="IncidentContext"	Type="Context"		Accessor="Optional"	Direction="In"		Default="1"		Comment="Create the Incident with this context" />

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

		<When Name="Check JobIncident » JobHasNoIncident" Condition="${Job.Incident} == Empty">
			<Transaction>
				<WorkflowCall Name="CreateIncident" WorkflowName="Job_CreateIncident">
					<Parameter	Name="IncidentContext"	Direction="In"		Value="${IncidentContext}" />
					<Parameter	Name="Job"				Direction="In"		Value="${Job}" />
					<Parameter	Name="Incident"			Direction="Out"									OutputProperty="${Incident}" />
				</WorkflowCall>

				<When Name="Check CloseJob » CloseJobIsTrue" Condition="${CloseJob} == True">
					<When Name="Check JobStatus » JobStatusIsExist" Condition="${Job.Status} == JobStatus.Created || ${Job.Status} == JobStatus.Approved || ${Job.Status} == JobStatus.Requested">
						<ChangeStatus Name="Close Job" DomainObject="${Job}" NewStatus="JobStatus.Closed" />
					</When>
				</When>
			</Transaction>

			<UserContent Name="Post" />

			<When Name="Check Incident » IncidentIsExist" Condition="${Incident} != Empty">
				<View Name="OpenScreen" ViewName="DataEntryScreen">
					<Parameter	Name="DomainObject"			Direction="In"		Value="${Incident}" />
					<Parameter	Name="FocusEditableField"	Direction="In"		Value="=${Incident.Description} == Empty" />
					<Parameter	Name="ScreenName"			Direction="In"		Value="${FormName}" />
				</View>
			</When>
		</When>
	</Execution>
</Workflow>