Categorie: reference
Bijgewerkt: 2026-04-08
actionfield workflow actionfield169
ActionField169
Beschrijving: Create a Job for PmWorkOrder. Custom: Nee
Propertiesbewerken
| Property | Type | Accessor |
|---|---|---|
| PmWorkOrder | PmWorkOrder | Root |
| ActivateJob | Boolean | Optional |
| CopyPmJobContextToJob | Boolean | Optional |
| FormName | String | Optional |
| JobContext | Context | Optional |
| PurchaseRequestLineContext | Context | Optional |
| PurchaseRequestLineStatus | Status | Optional |
| PurchaseRequestStatus | Status | Optional |
| WorkOrderContext | Context | Optional |
XMLbewerken
<Workflow Name="ActionField169" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
<Description>Create a Job for PmWorkOrder.</Description>
<Properties>
<Property Name="PmWorkOrder" Type="PmWorkOrder" Accessor="Root" Direction="In" />
<Property Name="ActivateJob" Type="Boolean" Accessor="Optional" Direction="In" Default="True" Comment="Change status of created Job to Active" />
<Property Name="CopyPmJobContextToJob" Type="Boolean" Accessor="Optional" Direction="In" Default="False" Comment="Not in use" />
<Property Name="FormName" Type="String" Accessor="Optional" Direction="In" Comment="Open this screen with the created Job" />
<Property Name="JobContext" Type="Context" Accessor="Optional" Direction="In" Default="0" Comment="Create the Job with this context" />
<Property Name="PurchaseRequestLineContext" Type="Context" Accessor="Optional" Direction="In" Default="0" Comment="Create the PurchaseRequestLine with this context" />
<Property Name="PurchaseRequestLineStatus" Type="Status" Accessor="Optional" Direction="In" Default="0" Comment="Create the PurchaseRequestLine with this status" />
<Property Name="PurchaseRequestStatus" Type="Status" Accessor="Optional" Direction="In" Default="0" Comment="Set this status to the copied PurchaseRequest." />
<Property Name="WorkOrderContext" Type="Context" Accessor="Optional" Direction="In" Default="0" Comment="Create the WorkOrder with this context" />
<Property Name="CreateJobDate" Type="Date?" Accessor="Internal" />
<Property Name="JobToShow" Type="Job" Accessor="Internal" />
<Property Name="LastCreatedJob" Type="Job" Accessor="Internal" />
<Property Name="NumberOfJobsCreated" Type="Int64" Accessor="Internal" />
</Properties>
<Execution>
<UserContent Name="Pre" />
<Validation Name="Validate Status" Condition="${PmWorkOrder.Status} == PmWorkOrderStatus.Approved" MessageCode="0467">
<Parameter Name="PmWorkOrder" Direction="In" Value="${PmWorkOrder}" />
</Validation>
<Transaction>
<When Name="BackOffice" Condition="${PmWorkOrder.MaintenanceClassification.BackOffice?} != Empty">
<Assign Name="Set jobcontext" Property="${JobContext}" Value="${PmWorkOrder.MaintenanceClassification.BackOffice.JobContext}" />
</When>
<Assign Name="Set CreateJobDate to PmWorkOrder.NextMaintenanceDate" Property="${CreateJobDate}" Value="${PmWorkOrder.NextMaintenanceDate}" />
<When Name="Is ManualNextMaintDate a correct date" Condition="${PmWorkOrder.ManualNextMaintenanceDate} != Empty">
<Assign Name="Set CreateJobDate to manual maintenancedate" Property="${CreateJobDate}" Value="${PmWorkOrder.ManualNextMaintenanceDate}" />
</When>
<WorkflowCall Name="Create jobs for pmworkorder" WorkflowName="PmWorkOrder_CreateJobs">
<Parameter Name="ActivateJob" Direction="In" Value="${ActivateJob}" />
<Parameter Name="Date" Direction="In" Value="${CreateJobDate}" />
<Parameter Name="JobContext" Direction="In" Value="${JobContext}" />
<Parameter Name="PmWorkOrder" Direction="In" Value="${PmWorkOrder}" />
<Parameter Name="PurchaseRequestLineContext" Direction="In" Value="${PurchaseRequestLineContext}" />
<Parameter Name="PurchaseRequestLineStatus" Direction="In" Value="${PurchaseRequestLineStatus}" />
<Parameter Name="PurchaseRequestStatus" Direction="In" Value="${PurchaseRequestStatus}" />
<Parameter Name="WorkOrderContext" Direction="In" Value="${WorkOrderContext}" />
<Parameter Name="CreatedJob" Direction="Out" OutputProperty="${LastCreatedJob}" />
<Parameter Name="CreatedJobsCount" Direction="Out" OutputProperty="${NumberOfJobsCreated}" />
<Parameter Name="JobToShow" Direction="Out" OutputProperty="${JobToShow}" />
</WorkflowCall>
<When Name="Is ManualNextMaintDate a correct date" Condition="${PmWorkOrder.ManualNextMaintenanceDate} != Empty">
<Assign Name="Set LastMaintenanceDate to manual maintenancedate" Property="${PmWorkOrder.LastMaintenanceDate}" Value="${PmWorkOrder.ManualNextMaintenanceDate}" />
</When>
<WorkflowCall Name="PmWorkOrder_UpdatePmwManualNextMaintDate" WorkflowName="PmWorkOrder_UpdatePmwManualNextMaintDate">
<Parameter Name="ManualNextMaintDate" Direction="In" Value="Empty" />
<Parameter Name="PmWorkOrder" Direction="In" Value="${PmWorkOrder}" />
</WorkflowCall>
<WorkflowCall Name="Update PmWorkOrders with lower frequency and belonging to schema" WorkflowName="PmWorkOrder_UpdatePmWorkOrdersWithLowerFrequencyAndBelongingToSchema">
<Parameter Name="PmWorkOrder" Direction="In" Value="${PmWorkOrder}" />
</WorkflowCall>
</Transaction>
<UserContent Name="Post" />
<Choose Name="Check number of jobs created">
<When Name="No jobs created" Condition="${NumberOfJobsCreated} == 0">
<Message Name="msg_no_job" MessageCode="0159">
<Parameter Name="PmWorkOrder" Direction="In" Value="${PmWorkOrder}" />
</Message>
</When>
<When Name="One job created" Condition="${NumberOfJobsCreated} == 1">
<Message Name="msg_one_job" MessageCode="0469">
<Parameter Name="Job" Direction="In" Value="${JobToShow}" />
</Message>
</When>
<Otherwise Name="More than one job created">
<Message Name="msg_multiple_Jobs" MessageCode="0158">
<Parameter Name="FirstJob" Direction="In" Value="${JobToShow}" />
<Parameter Name="LastJob" Direction="In" Value="${LastCreatedJob}" />
<Parameter Name="NumberOfJobsCreated" Direction="In" Value="${NumberOfJobsCreated}" />
</Message>
</Otherwise>
</Choose>
<When Name="Check job is valid » Job is valid" Condition="${JobToShow} != Empty">
<View Name="OpenScreen" ViewName="DataEntryScreen">
<Parameter Name="DomainObject" Direction="In" Value="${JobToShow}" />
<Parameter Name="FocusEditableField" Direction="In" Value="=${JobToShow.Description} == Empty" />
<Parameter Name="ScreenName" Direction="In" Value="${FormName}" />
</View>
</When>
</Execution>
</Workflow>