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

ActionField311

Beschrijving: Change status of JobWeekLabour/JobWeek to Created (also change status of linked EmployeeLabour(Lines) to Created). Custom: Nee

Propertiesbewerken

Property Type Accessor
JobWeekLabour JobWeekLabour Root
FormNameForStatusCreated UltimoString Optional
FormNameForStatusNotCreated UltimoString Optional

XMLbewerken

<Workflow Name="ActionField311" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
	<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
	<Description>Change status of JobWeekLabour/JobWeek to Created (also change status of linked EmployeeLabour(Lines) to Created).</Description>
	<Properties>
		<Property	Name="JobWeekLabour"						Type="JobWeekLabour"	Accessor="Root"		Direction="In" />

		<Property	Name="FormNameForStatusCreated"				Type="UltimoString"		Accessor="Optional"	Direction="In"		Comment="Open this screen when JobWeek status is Created" />
		<Property	Name="FormNameForStatusNotCreated"			Type="UltimoString"		Accessor="Optional"	Direction="In"		Comment="Open this screen when JobWeek status is not Created" />

		<Property	Name="CurrentEmployee"						Type="Employee"			Accessor="Internal" />
		<Property	Name="FormName"								Type="UltimoString"		Accessor="Internal" />
		<Property	Name="ReopenEmployeeLabourWeekIfApproved"	Type="Boolean"			Accessor="Internal" />
	</Properties>
	<Settings>
		<SettingsGroup Name="JobWeekLabour">
			<Setting	Name="ReopenOtherUsers"	Type="Boolean"	Value="True" />
		</SettingsGroup>
	</Settings>
	<Execution>
		<UserContent Name="Pre" />

		<Transaction>
			<GetItem Name="Get Applicant" Type="Employee" OutputProperty="${CurrentEmployee}">
				<Filters>
					<PropertyFilter	PropertyName="Id"	Operator="="		PropertyValue="#{User.EmployeeId}" />
				</Filters>
			</GetItem>
		</Transaction>

		<Question Name="ummJOBWEEKLABALRAPPR_REOPEN" Type="YesNoCancel" MessageCode="0458" OutputProperty="${ReopenEmployeeLabourWeekIfApproved}">
			<Parameter	Name="Employee"	Direction="In"		Value="${CurrentEmployee}" />
		</Question>

		<Assign Name="ReopenEmployeeLabourWeekIfApproved" Property="#{Settings.JobWeekLabour.ReopenEmployeeLabourWeekIfApproved}" Value="${ReopenEmployeeLabourWeekIfApproved}" />

		<Transaction>
			<ChangeStatus Name="Reopen status JobWeekLabour" DomainObject="${JobWeekLabour}" NewStatus="JobWeekLabourStatus.Created" />

			<WorkflowCall Name="Reopen JobWeekLabour" WorkflowName="JobWeekLabour_Reopen">
				<Parameter	Name="JobWeekLabour"	Direction="In"		Value="${JobWeekLabour}" />
			</WorkflowCall>

			<When Name="JobWeekLabourStatusCheck » JobWeekLabourStatusIsCreated" Condition="${JobWeekLabour.Status} == JobWeekLabourStatus.Created">
				<ChangeStatus Name="ChangeStatusOFJobWeekToCreated" DomainObject="${JobWeekLabour.Id.JobWeek}" NewStatus="JobWeekStatus.Created" />
			</When>

			<Choose Name="JobWeekStatusCheck">
				<When Name="JobWeekStatusIsCreated" Condition="${JobWeekLabour.Id.JobWeek.Status} == JobWeekStatus.Created">
					<Assign Name="Set Forname1" Property="${FormName}" Value="${FormNameForStatusCreated}" />
				</When>

				<Otherwise Name="JobWeekStatusIsNotCreated">
					<Assign Name="Set Forname2" Property="${FormName}" Value="${FormNameForStatusNotCreated}" />
				</Otherwise>
			</Choose>
		</Transaction>

		<UserContent Name="Post" />

		<View Name="OpenScreen" ViewName="DataEntryScreen">
			<Parameter	Name="DomainObject"	Direction="In"		Value="${JobWeekLabour.Id.JobWeek}" />
			<Parameter	Name="ScreenName"	Direction="In"		Value="${FormName}" />
		</View>
	</Execution>
</Workflow>