Categorie: reference
Bijgewerkt: 2026-04-08
actionfield workflow actionfield550
ActionField550
Beschrijving: Plan resources (Employees) for the given job. Custom: Nee
Propertiesbewerken
| Property | Type | Accessor |
|---|---|---|
| Job | Job | Root |
| Employee | Employee | Optional |
| EmployeeSqlFilter | String | Optional |
| MinimalTimeInMinutes | Int16 | Optional |
| MinimalTimeIntervalInMinutes | Int16 | Optional |
| MinimalTimeMaxForPullDownInMinutes | Int16 | Optional |
XMLbewerken
<Workflow Name="ActionField550" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
<Description>Plan resources (Employees) for the given job.</Description>
<Properties>
<Property Name="Job" Type="Job" Accessor="Root" Direction="In" />
<Property Name="Employee" Type="Employee" Accessor="Optional" Direction="In" Default="=#settingenabled(${Job}, Job.SchedulerDefaultEmployee) ? #getsetting(${Job}, Job.SchedulerDefaultEmployee) : Empty" Comment="Use this Employee as default in the dialog" />
<Property Name="EmployeeSqlFilter" Type="String" Accessor="Optional" Direction="In" Default="=#settingenabled(${Job}, Job.SchedulerEmployeeSqlFilter) ? #getsetting(${Job}, Job.SchedulerEmployeeSqlFilter) : 'EmpContext = 1'" Comment="Show only Employees with this filter (1 = EmployeeContext.Standard)" />
<Property Name="MinimalTimeInMinutes" Type="Int16" Accessor="Optional" Direction="In" Default="=#settingenabled(${Job}, Job.SchedulerMinimalTimeInMinutes) ? #getsetting(${Job}, Job.SchedulerMinimalTimeInMinutes) : 60" Comment="Used to override the default value for minimal time in the dialog (e.g. 15)." />
<Property Name="MinimalTimeIntervalInMinutes" Type="Int16" Accessor="Optional" Direction="In" Default="=#settingenabled(${Job}, Job.SchedulerMinimalTimeIntervalInMinutes) ? #getsetting(${Job}, Job.SchedulerMinimalTimeIntervalInMinutes) : 30" Comment="Used to override the interval value for minimal time in the dialog (e.g. 5)." />
<Property Name="MinimalTimeMaxForPullDownInMinutes" Type="Int16" Accessor="Optional" Direction="In" Default="=#settingenabled(${Job}, Job.SchedulerMinimalTimeMaxForPullDownInMinutes) ? #getsetting(${Job}, Job.SchedulerMinimalTimeMaxForPullDownInMinutes) : 240" Comment="Used to override the maximum value for the minimal time PullDown in the dialog (e.g. 120 for 2 hours)." />
<Property Name="JobResources" Type="List[JobResource]" Accessor="Internal" />
<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="SelectedJobResources" Type="List[JobResource]" Accessor="Internal" />
<Property Name="UnapprovedJobResourceCount" Type="Int64" Accessor="Internal" />
</Properties>
<Execution>
<UserContent Name="Pre" />
<Comment><![CDATA[ Explicitly assigning values from the job guarantees 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}" />
<Validation Name="CheckIfThisIsAMultijob" Condition="${Job.IsMultijob} == False" MessageCode="1368" Comment="Multijobs may not be planned.">
<Parameter Name="Job" Direction="In" Value="${Job}" />
</Validation>
<Validation Name="Job cannot become a project job" Condition="${Job.StopRelated} == False" MessageCode="2395">
<Parameter Name="Job" Direction="In" Value="${Job}" />
</Validation>
<Transaction>
<GetList Name="Get job resources to plan" Type="JobResource" OutputProperty="${JobResources}" OrderBy="Id" OrderDirection="Ascending">
<Joins>
<Join Name="JobJobPlan" Alias="jobjpl" Type="LeftOuterJoin" />
</Joins>
<Filters>
<PropertyFilter PropertyName="Id.Job" Operator="=" PropertyValue="${Job}" />
<PropertyFilter PropertyName="HoursToPlan" Operator=">" PropertyValue="0" />
<CombinedFilter FilterOperator="Or">
<PropertyEmptyFilter PropertyName="jobjpl.Status" />
<PropertyFilter PropertyName="jobjpl.Status" Operator="=" PropertyValue="JobJobPlanStatus.Approved" />
</CombinedFilter>
</Filters>
</GetList>
<GetCount Name="Count job resources with hours to plan, linked to unapproved products" Type="JobResource" OutputProperty="${UnapprovedJobResourceCount}">
<Joins>
<Join Name="JobJobPlan" Alias="jobjpl" Type="LeftOuterJoin" />
</Joins>
<Filters>
<PropertyFilter PropertyName="Id.Job" Operator="=" PropertyValue="${Job}" />
<PropertyFilter PropertyName="HoursToPlan" Operator=">" PropertyValue="0" />
<NotFilter>
<InFilter PropertyName="jobjpl.Status" Values="JobJobPlanStatus.Approved, JobJobPlanStatus.Canceled" />
</NotFilter>
</Filters>
</GetCount>
</Transaction>
<When Name="When multiple job resources to plan are found" Condition="${JobResources.Count} > 1">
<Dialog Name="JobResourcesSelect" TitleCode="JOBRESOURCESSELECTTITLE">
<Container Border="True">
<CheckBoxGroup Name="JobResourcesSelect" Width="450" Visible="=${JobResources} != Empty" OutputProperty="${SelectedJobResources}" Required="True" ItemDescription=" ${Item.Craftsman.Description} - #formathours(${Item.HoursToPlan}) #label(HOURS)#if(${Item.JobJobPlan} != Empty) (${Item.JobJobPlan.Description})#end" Items="${JobResources}" />
</Container>
</Dialog>
</When>
<Choose Name="Check if one or more job resources should be planned">
<When Name="When no job resources were found" Condition="${JobResources.Count} == 0">
<When Name="Name" Condition="${UnapprovedJobResourceCount} > 0">
<ContinuationQuestion Name="AskToContinueDespiteNotBeingAbleToPlanForProducts" MessageCode="2674" />
</When>
<WorkflowCall Name="Job_ScheduleProposition" WorkflowName="Job_ScheduleProposition">
<Parameter Name="Employee" Direction="In" Value="${Employee}" />
<Parameter Name="EmployeeSqlFilter" Direction="In" Value="${EmployeeSqlFilter}" />
<Parameter Name="Job" Direction="In" Value="${Job}" />
<Parameter Name="JobResource" Direction="In" Value="Empty" />
<Parameter Name="MinimalTimeInMinutes" Direction="In" Value="${MinimalTimeInMinutes}" />
<Parameter Name="MinimalTimeIntervalInMinutes" Direction="In" Value="${MinimalTimeIntervalInMinutes}" />
<Parameter Name="MinimalTimeMaxForPullDownInMinutes" Direction="In" Value="${MinimalTimeMaxForPullDownInMinutes}" />
</WorkflowCall>
</When>
<When Name="When one job resource found that should be planned" Condition="${JobResources.Count} == 1">
<WorkflowCall Name="Job_ScheduleProposition" WorkflowName="Job_ScheduleProposition">
<Parameter Name="Employee" Direction="In" Value="${Employee}" />
<Parameter Name="EmployeeSqlFilter" Direction="In" Value="${EmployeeSqlFilter}" />
<Parameter Name="Job" Direction="In" Value="${Job}" />
<Parameter Name="JobResource" Direction="In" Value="${JobResources[0]}" />
<Parameter Name="MinimalTimeInMinutes" Direction="In" Value="${MinimalTimeInMinutes}" />
<Parameter Name="MinimalTimeIntervalInMinutes" Direction="In" Value="${MinimalTimeIntervalInMinutes}" />
<Parameter Name="MinimalTimeMaxForPullDownInMinutes" Direction="In" Value="${MinimalTimeMaxForPullDownInMinutes}" />
</WorkflowCall>
</When>
<Otherwise Name="Otherwise, job resources were found but none were selected" Comment="${SelectedJobResources.Count} >= 1">
<ForEach Name="JobResource" In="${SelectedJobResources}" As="JobResource">
<WorkflowCall Name="Job_ScheduleProposition" WorkflowName="Job_ScheduleProposition">
<Parameter Name="Employee" Direction="In" Value="${Employee}" />
<Parameter Name="EmployeeSqlFilter" Direction="In" Value="${EmployeeSqlFilter}" />
<Parameter Name="Job" Direction="In" Value="${Job}" />
<Parameter Name="JobResource" Direction="In" Value="${JobResource}" />
<Parameter Name="MinimalTimeInMinutes" Direction="In" Value="${MinimalTimeInMinutes}" />
<Parameter Name="MinimalTimeIntervalInMinutes" Direction="In" Value="${MinimalTimeIntervalInMinutes}" />
<Parameter Name="MinimalTimeMaxForPullDownInMinutes" Direction="In" Value="${MinimalTimeMaxForPullDownInMinutes}" />
</WorkflowCall>
</ForEach>
</Otherwise>
</Choose>
<WorkflowCall Name="Validate job dates" WorkflowName="Job_ValidateMultijobDates">
<Parameter Name="Job" Direction="In" Value="${Job}" />
</WorkflowCall>
<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>
<UserContent Name="Post" />
</Execution>
</Workflow>