Categorie: reference
Bijgewerkt: 2026-04-08
actionfield workflow actionfield1605
ActionField1605
Beschrijving: Recalculates the job's ScheduledStartDate or TargetDate when user modified UseWorkScheduleForPlanning (calendar with work days). Checks whether requested deliveries will (still) be in time. Custom: Nee
Propertiesbewerken
| Property | Type | Accessor |
|---|---|---|
| Job | Job | Root |
XMLbewerken
<Workflow Name="ActionField1605" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
<Description>Recalculates the job's ScheduledStartDate or TargetDate when user modified UseWorkScheduleForPlanning (calendar with work days). Checks whether requested deliveries will (still) be in time.</Description>
<Properties>
<Property Name="Job" Type="Job" Accessor="Root" Direction="In" />
<Property Name="CalculateDateReferencePoint" Type="CalculateDateReferencePoint" Accessor="Internal" Default="Undefined" Comment="Override through UserContent if user interaction is not allowed" />
<Property Name="CalculatedStartDate" Type="DateTime?" Accessor="Internal" />
<Property Name="CalculatedTargetDate" Type="DateTime?" Accessor="Internal" />
<Property Name="MessageCode" Type="String" Accessor="Internal" Default="Empty" />
<Property Name="OriginalJobScheduledStartDate" Type="DateTime?" Accessor="Internal" Comment="To detect if the ScheduledStartDate has been changed." />
<Property Name="OriginalJobSLATargetDate" Type="DateTime?" Accessor="Internal" Comment="To detect if the SLA TargetDate has been changed." />
<Property Name="OriginalJobTargetDate" Type="DateTime?" Accessor="Internal" Comment="To detect if the TargetDate has been changed." />
<Property Name="PlanningDialogWasShown" Type="Boolean" Accessor="Internal" Default="False" Comment="Used to control display of user messages." />
<Property Name="PurchaseRequestLineDeliveryDate" Type="DateTime" Accessor="Internal" />
<Property Name="PurchaseRequestsThatCannotBeDeliveredInTimeCount" Type="Int64" Accessor="Internal" Default="0" />
<Property Name="UpdateMethod" Type="JobPlanningFieldsUpdateMethod" Accessor="Internal" />
</Properties>
<Execution>
<When Name="Get CalculateDateReferencePoint" Condition="#settingenabled(${Job}, Job.CalculateDateReferencePoint) == True" Comment="Override through UserContent if user interaction is not allowed">
<Assign Name="Set CalculateDateReferencePoint" Property="${CalculateDateReferencePoint}" Value="=#getsetting(${Job}, Job.CalculateDateReferencePoint)" />
</When>
<UserContent Name="Pre" />
<Comment><![CDATA[ Explicitly assigning values from the job guaranties these wf properties will keep their value in case they are changed on the job by the BL followed by displaying a user message.]]></Comment>
<Assign Name="OriginalJobScheduledStartDate" Property="${OriginalJobScheduledStartDate}" Value="${Job.ScheduledStartDate}" />
<Assign Name="OriginalJobTargetDate" Property="${OriginalJobTargetDate}" Value="${Job.TargetDate}" />
<Assign Name="OriginalJobSLATargetDate" Property="${OriginalJobSLATargetDate}" Value="${Job.ServiceContractTargetFinishedDate}" />
<Comment><![CDATA[ calculate start and target date based on duration and CalculateDateReferencePoint ]]></Comment>
<Choose Name="start date or target date based">
<When Name="if all the relevant fields are empty, do noting" Condition="${Job.DurationCalculated} == 0 && (${Job.ScheduledStartDate} == Empty || ${Job.TargetDate} == Empty)">
<Comment><![CDATA[ DO NOTHING ]]></Comment>
</When>
<When Name="ScheduledStartDateBased" Condition="${CalculateDateReferencePoint} == ScheduledStartDateBased">
<Transaction>
<WorkflowCall Name="Job_AddDurationToPlanningDate" WorkflowName="Job_AddDurationToPlanningDate">
<Parameter Name="Duration" Direction="In" Value="${Job.DurationCalculated}" />
<Parameter Name="Job" Direction="In" Value="${Job}" />
<Parameter Name="ReferenceDate" Direction="In" Value="${Job.ScheduledStartDate}" />
<Parameter Name="CalculatedDate" Direction="Out" OutputProperty="${Job.TargetDate}" />
</WorkflowCall>
</Transaction>
</When>
<When Name="TargetDateBased" Condition="${CalculateDateReferencePoint} == TargetDateBased">
<Transaction>
<WorkflowCall Name="Job_AddDurationToPlanningDate" WorkflowName="Job_AddDurationToPlanningDate">
<Parameter Name="Duration" Direction="In" Value="=-${Job.DurationCalculated}" />
<Parameter Name="Job" Direction="In" Value="${Job}" />
<Parameter Name="ReferenceDate" Direction="In" Value="${Job.TargetDate}" />
<Parameter Name="CalculatedDate" Direction="Out" OutputProperty="${Job.ScheduledStartDate}" />
</WorkflowCall>
</Transaction>
</When>
<When Name="AskUser from 1605" Condition="${CalculateDateReferencePoint} == Undefined">
<WorkflowCall Name="Call dialog asking user whether ScheduledStartDate or TargetDate should be changed" WorkflowName="Dialog_Job_ChoosePlanningMethod">
<Parameter Name="Job" Direction="In" Value="${Job}" />
<Parameter Name="ModifiedField" Direction="In" Value="UseWorkScheduleForPlanning" />
<Parameter Name="CalculatedStartDate" Direction="Out" OutputProperty="${CalculatedStartDate}" />
<Parameter Name="CalculatedTargetDate" Direction="Out" OutputProperty="${CalculatedTargetDate}" />
<Parameter Name="DialogWasShown" Direction="Out" OutputProperty="${PlanningDialogWasShown}" Comment="Prevent display of user message(s) about date(s)." />
<Parameter Name="SelectedOption" Direction="Out" OutputProperty="${UpdateMethod}" />
</WorkflowCall>
<Transaction>
<Choose Name="Which update method is chosen?">
<When Name="Change ScheduledStartDate" Condition="${UpdateMethod} == ChangeScheduledStartDate">
<Assign Name="Set ScheduledStartDate" Property="${Job.ScheduledStartDate}" Value="${CalculatedStartDate}" />
</When>
<When Name="Change TargetDate" Condition="${UpdateMethod} == ChangeTargetDate">
<Assign Name="Set TargetDate" Property="${Job.TargetDate}" Value="${CalculatedTargetDate}" />
</When>
<Otherwise Name="No changes, because calculated dates are the same!">
<Comment><![CDATA[ Empty placeholder ]]></Comment>
</Otherwise>
</Choose>
</Transaction>
</When>
</Choose>
<When Name="Check whether deliveries will be in time" Condition="${Job.ScheduledStartDate} != Empty">
<WorkflowCall Name="Job_ValidatePurchaseRequestDeliveryDates" WorkflowName="Job_ValidatePurchaseRequestDeliveryDates">
<Parameter Name="Job" Direction="In" Value="${Job}" />
<Parameter Name="MessageCode" Direction="Out" OutputProperty="${MessageCode}" />
<Parameter Name="PurchaseRequestsThatCannotBeDeliveredInTimeCount" Direction="Out" OutputProperty="${PurchaseRequestsThatCannotBeDeliveredInTimeCount}" />
</WorkflowCall>
<When Name="PurchaseRequestLines that cannot be delivered in time" Condition="${MessageCode} != Empty">
<Message Name="Inform about purchase request lines that cannot be delivered in time" MessageCode="${MessageCode}">
<Parameter Name="Job" Direction="In" Value="${Job}" />
<Parameter Name="RowCount" Direction="In" Value="${PurchaseRequestsThatCannotBeDeliveredInTimeCount}" />
</Message>
</When>
</When>
<When Name="When the planning proposition dialog was not shown" Condition="${PlanningDialogWasShown} == False" Comment="Because warning about date in the past was already included in the planning dialog!">
<WorkflowCall Name="Job_WarnIfStartOrTargetDateIsInThePast" WorkflowName="Job_WarnIfStartOrTargetDateIsInThePast">
<Parameter Name="Job" Direction="In" Value="${Job}" />
<Parameter Name="OriginalJobScheduledStartDate" Direction="In" Value="${OriginalJobScheduledStartDate}" />
<Parameter Name="OriginalJobTargetDate" Direction="In" Value="${OriginalJobTargetDate}" />
</WorkflowCall>
<WorkflowCall Name="Job_WarnIfTargetDateIsPastSLATargetDate" WorkflowName="Job_WarnIfTargetDateIsPastSLATargetDate">
<Parameter Name="Job" Direction="In" Value="${Job}" />
<Parameter Name="OriginalJobSLATargetDate" Direction="In" Value="${OriginalJobSLATargetDate}" />
<Parameter Name="OriginalJobTargetDate" Direction="In" Value="${OriginalJobTargetDate}" />
</WorkflowCall>
</When>
<WorkflowCall Name="Job_InformUserInCaseOfMultipleJobScheduleParts" WorkflowName="Job_InformUserInCaseOfMultipleJobScheduleParts">
<Parameter Name="Job" Direction="In" Value="${Job}" />
<Parameter Name="OriginalJobScheduledStartDate" Direction="In" Value="${OriginalJobScheduledStartDate}" />
<Parameter Name="OriginalJobTargetDate" Direction="In" Value="${OriginalJobTargetDate}" />
</WorkflowCall>
<WorkflowCall Name="Job_SynchronizeSingleJobSchedulePart" WorkflowName="Job_SynchronizeSingleJobSchedulePart">
<Parameter Name="Job" Direction="In" Value="${Job}" />
<Parameter Name="OriginalJobScheduledStartDate" Direction="In" Value="${OriginalJobScheduledStartDate}" />
<Parameter Name="OriginalJobTargetDate" Direction="In" Value="${OriginalJobTargetDate}" />
</WorkflowCall>
<UserContent Name="Post" />
</Execution>
</Workflow>