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

ActionField1184

Beschrijving: Add JobResource by Job from Gantt Custom: Nee

Propertiesbewerken

Property Type Accessor
Job Job Root
CreatedJobResource JobResource Optional
CreatedJobResourceLineId UltimoString Optional
CreatedJobSchedulePart JobSchedulePart Optional
JobHoursCalculated Decimal Optional
JobHoursToPlan Decimal Optional
ProjectHoursCalculated Decimal Optional
WorkOrderHoursCalculated Decimal Optional

XMLbewerken

<Workflow Name="ActionField1184" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
	<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
	<Description>Add JobResource by Job from Gantt</Description>
	<Properties>
		<Property	Name="Job"								Type="Job"						Accessor="Root"		Direction="In" />

		<Property	Name="CreatedJobResource"				Type="JobResource"				Accessor="Optional"	Direction="Out"									Comment="The created JobResource" />
		<Property	Name="CreatedJobResourceLineId"			Type="UltimoString"				Accessor="Optional"	Direction="Out"									Comment="LineId of the created JobResource" />
		<Property	Name="CreatedJobSchedulePart"			Type="JobSchedulePart"			Accessor="Optional"	Direction="Out"									Comment="Id of the created JobSchedulePart, used by planner control, user content can set it" />
		<Property	Name="JobHoursCalculated"				Type="Decimal"					Accessor="Optional"	Direction="Out"									Comment="Feedback Job.HoursCalculated" />
		<Property	Name="JobHoursToPlan"					Type="Decimal"					Accessor="Optional"	Direction="Out"									Comment="Feedback Job.HoursToPlan" />
		<Property	Name="ProjectHoursCalculated"			Type="Decimal"					Accessor="Optional"	Direction="Out"									Comment="Feedback Project.HoursCalculated" />
		<Property	Name="WorkOrderHoursCalculated"			Type="Decimal"					Accessor="Optional"	Direction="Out"									Comment="Feedback WorkOrder.HoursCalculated" />

		<Property	Name="Craftsman"						Type="Craftsman"				Accessor="Internal" />
		<Property	Name="CraftsmanHourCategory"			Type="CraftsmanHourCategory"	Accessor="Internal" />
		<Property	Name="CraftsmanHourCategory_Tariff1"	Type="CompanyMoney"				Accessor="Internal"						Default="CompanyMoney.Zero" />
		<Property	Name="HoursCalculated"					Type="Decimal"					Accessor="Internal" />
	</Properties>
	<Execution>
		<UserContent Name="Pre" />

		<WorkflowCall Name="Add jobresource to job" WorkflowName="Dialog_AddOrEditJobResource">
			<Parameter	Name="Job"				Direction="In"		Value="${Job}" />
			<Parameter	Name="JobContext"		Direction="In"		Value="${Job.Context}" />
			<Parameter	Name="Craftsman"		Direction="Out"								OutputProperty="${Craftsman}" />
			<Parameter	Name="HoursCalculated"	Direction="Out"								OutputProperty="${HoursCalculated}" />
		</WorkflowCall>

		<Transaction>
			<Command Name="Get_CraftsmanHourCategory" CommandName="Get_CraftsmanHourCategory">
				<Parameter	Name="Craftsman"				Direction="In"		Value="${Craftsman}" />
				<Parameter	Name="CraftsmanHourCategory"	Direction="Out"								OutputProperty="${CraftsmanHourCategory}" />
			</Command>

			<Assign Name="Set CraftsmanHourCategory_Tariff1" Property="${CraftsmanHourCategory_Tariff1}" Value="=${CraftsmanHourCategory} == Empty ? CompanyMoney.Zero : #createcompanymoney(${CraftsmanHourCategory.Tariff1})" />

			<Insert Name="JobResource" ObjectType="JobResource" OutputProperty="${CreatedJobResource}">
				<Parameter	Name="Id.Job"			Direction="In"		Value="${Job}" />
				<Parameter	Name="Status"			Direction="In"		Value="JobResourceStatus.NotAssigned" />
				<Parameter	Name="CostCalculated"	Direction="In"		Value="=(${HoursCalculated} * ${CraftsmanHourCategory_Tariff1})" />
				<Parameter	Name="Craftsman"		Direction="In"		Value="${Craftsman}" />
				<Parameter	Name="Customer"			Direction="In"		Value="${Job.Customer}" />
				<Parameter	Name="HoursCalculated"	Direction="In"		Value="${HoursCalculated}" />
				<Parameter	Name="TariffCalculated"	Direction="In"		Value="${CraftsmanHourCategory_Tariff1}" />
			</Insert>

			<Command Name="JobResource_SetInternalChargeValues" CommandName="JobResource_SetInternalChargeValues">
				<Parameter	Name="JobResource"	Direction="In"		Value="${CreatedJobResource}" />
			</Command>
		</Transaction>

		<Assign Name="Set CreatedJobResourceLineId" Property="${CreatedJobResourceLineId}" Value="${CreatedJobResource.Id.LineId}" />

		<WorkflowCall Name="JobResource_ValidateHoursCalculated" WorkflowName="JobResource_ValidateHoursCalculated">
			<Parameter	Name="JobResource"	Direction="In"		Value="${CreatedJobResource}" />
		</WorkflowCall>

		<WorkflowCall Name="Job_GetFeedBackValuesForStopGantt" WorkflowName="Job_GetFeedBackValuesForStopGantt">
			<Parameter	Name="Job"						Direction="In"		Value="${Job}" />
			<Parameter	Name="JobHoursCalculated"		Direction="Out"						OutputProperty="${JobHoursCalculated}" />
			<Parameter	Name="JobHoursToPlan"			Direction="Out"						OutputProperty="${JobHoursToPlan}" />
			<Parameter	Name="ProjectHoursCalculated"	Direction="Out"						OutputProperty="${ProjectHoursCalculated}" />
			<Parameter	Name="WorkOrderHoursCalculated"	Direction="Out"						OutputProperty="${WorkOrderHoursCalculated}" />
		</WorkflowCall>

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