Categorie: reference
Bijgewerkt: 2026-04-08
actionfield workflow actionfield1705
ActionField1705
Beschrijving: Create Equipment(ConfigurationItem) from a choosen Equipment. Custom: Nee
Propertiesbewerken
| Property | Type | Accessor |
|---|---|---|
| FromEquipment | Equipment | Root |
| EquipmentPrefix | UltimoString | Optional |
| ExtraFieldsToCopy | List[String] | Optional |
| GetNumberOfEquipments | Boolean | Optional |
| LengthOfSequenceNumber | Int16 | Optional |
| MaintenanceClassificationContexts | List[Context] | Optional |
| MaxNumberOfEquipments | Int32 | Optional |
| MntcSelectionListConfiguration | String | Optional |
| NewRecordStatus | Status | Optional |
| PmWorkOrderContext | Context | Optional |
| SequenceStartNumber | Int32 | Optional |
XMLbewerken
<Workflow Name="ActionField1705" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
<Description>Create Equipment(ConfigurationItem) from a choosen Equipment.</Description>
<Properties>
<Property Name="FromEquipment" Type="Equipment" Accessor="Root" Direction="In" />
<Property Name="EquipmentPrefix" Type="UltimoString" Accessor="Optional" Direction="In" Default="Empty" Comment="With this string the EqupmentId will start" />
<Property Name="ExtraFieldsToCopy" Type="List[String]" Accessor="Optional" Direction="In" Comment="Indicate additional columns to be copied" />
<Property Name="GetNumberOfEquipments" Type="Boolean" Accessor="Optional" Direction="In" Default="True" Comment="Set to True to enable changing the amount of records to create in the dialog" />
<Property Name="LengthOfSequenceNumber" Type="Int16" Accessor="Optional" Direction="In" Default="Empty" Comment="This will be the lenght of te Eqmnumber" />
<Property Name="MaintenanceClassificationContexts" Type="List[Context]" Accessor="Optional" Direction="In" Default="MaintenanceClassificationContext.MT" Comment="Only change MaintenanceClassification with these contexts" />
<Property Name="MaxNumberOfEquipments" Type="Int32" Accessor="Optional" Direction="In" Default="999" Comment="Set the maximum of equipment that can be created in one run" />
<Property Name="MntcSelectionListConfiguration" Type="String" Accessor="Optional" Direction="In" Default="Default" Comment="Set the ViewFieldConfig for the MaintenanceClassification selection list" />
<Property Name="NewRecordStatus" Type="Status" Accessor="Optional" Direction="In" Default="EquipmentStatus.Active" Comment="Set this status to the Equipment" />
<Property Name="PmWorkOrderContext" Type="Context" Accessor="Optional" Direction="In" Default="PmWorkOrderContext.PeriodicActivityChild" Comment="Create PmWorkOrder with this context" />
<Property Name="SequenceStartNumber" Type="Int32" Accessor="Optional" Direction="In" Default="0" Comment="With this Number the EqupmentId will start (greater than 0)" />
<Property Name="CompleteSequenceNumber" Type="UltimoString" Accessor="Internal" Default="Empty" />
<Property Name="CopyInstallDate" Type="Boolean" Accessor="Internal" Default="False" />
<Property Name="CopyMaintenanceClassification" Type="Boolean" Accessor="Internal" Default="False" />
<Property Name="CopyManufactureYear" Type="Boolean" Accessor="Internal" Default="False" />
<Property Name="EquipmentContext" Type="Context" Accessor="Internal" Default="${FromEquipment.Context}" Comment="Necessary for label CREATEEQUIPMENT" />
<Property Name="EquipmentId" Type="UltimoString" Accessor="Internal" Default="Empty" />
<Property Name="NumberOfEquipments" Type="Int32" Accessor="Internal" Default="1" />
<Property Name="Range" Type="List[Int64]" Accessor="Internal" Default="Empty" />
<Property Name="ToEquipment" Type="Equipment" Accessor="Internal" />
<Property Name="UseAutoKey" Type="Boolean" Accessor="Internal" />
</Properties>
<Execution>
<UserContent Name="Pre" />
<Dialog Name="CreateEquipment_FromEquipment" TitleCode="CREATEEQUIPMENT">
<Container Border="True">
<Number Name="NumberOfEquipments" Width="85" Visible="=${GetNumberOfEquipments} == True" Value="${NumberOfEquipments}" OutputProperty="${NumberOfEquipments}" LabelCode="NUMBEROFEQMS" MinValue="1" MaxValue="${MaxNumberOfEquipments}" DecimalPrecision="0" />
<CheckBox Name="ManufactureYear" Visible="=${FromEquipment.ManufactureYear} != 0" Value="${CopyManufactureYear}" OutputProperty="${CopyManufactureYear}" LabelCode="YEAR_OF_CONSTRUCTION" />
<CheckBox Name="InstallDate" Visible="=${FromEquipment.InstallDate} != Empty" Value="${CopyInstallDate}" OutputProperty="${CopyInstallDate}" LabelCode="INSTALLATION_DATE" />
<CheckBox Name="MaintenanceClassification" Visible="=${FromEquipment.MaintenanceClassification} != Empty" Value="${CopyMaintenanceClassification}" OutputProperty="${CopyMaintenanceClassification}" LabelCode="MAINTENANCECLASSIFICATION2" />
</Container>
</Dialog>
<Transaction>
<Command Name="HasAutoKey" CommandName="HasAutoKey">
<Parameter Name="EntityName" Direction="In" Value="Equipment" />
<Parameter Name="HasAutoKey" Direction="Out" OutputProperty="${UseAutoKey}" />
</Command>
<Assign Name="Set range based on NumberOfEquipments" Property="${Range}" Value="=#range(1, ${NumberOfEquipments})" />
<ForEach Name="Item" In="${Range}" As="Item">
<UserContent Name="PreCreateEqm" />
<Choose Name="Check how EquipmentId must be generated">
<When Name="SequenceStartNumber " Condition="${SequenceStartNumber} > 0">
<Assign Name="Set CompleteSequenceNumber" Property="${CompleteSequenceNumber}" Value="=#fillstart(${SequenceStartNumber}, '0', ${LengthOfSequenceNumber})" />
<Assign Name="Set EquipmentId" Property="${EquipmentId}" Value="=#concat(${EquipmentPrefix}, ${CompleteSequenceNumber})" />
<Assign Name="Add one to SequenceStartNumber" Property="${SequenceStartNumber}" Value="=(${SequenceStartNumber} + 1)" />
<Insert Name="Create Equipment with SequenceStartNumber" ObjectType="Equipment" OutputProperty="${ToEquipment}">
<Parameter Name="Context" Direction="In" Value="EquipmentContext.None" />
<Parameter Name="Status" Direction="In" Value="EquipmentStatus.None" />
<Parameter Name="Id" Direction="In" Value="${EquipmentId}" />
</Insert>
</When>
<When Name="Autokey is enabled" Condition="${UseAutoKey} == True">
<Insert Name="Create Equipment with autokey" ObjectType="Equipment" OutputProperty="${ToEquipment}">
<Parameter Name="Context" Direction="In" Value="EquipmentContext.None" />
<Parameter Name="Status" Direction="In" Value="EquipmentStatus.None" />
</Insert>
</When>
<Otherwise Name="Autokey is disabled">
<Command Name="InsertAndGenerateId" CommandName="InsertAndGenerateId">
<Parameter Name="EntityContext" Direction="In" Value="EquipmentContext.None" />
<Parameter Name="EntityName" Direction="In" Value="Equipment" />
<Parameter Name="CreatedObject" Direction="Out" OutputProperty="${ToEquipment}" />
</Command>
</Otherwise>
</Choose>
<Assign Name="Set CopyFromEquipment" Property="${ToEquipment.CopyFromEquipment}" Value="${FromEquipment}" />
<Assign Name="Copy IndividualPM" Property="${ToEquipment.IndividualPM}" Value="${ToEquipment.CopyFromEquipment.IndividualPM}" />
<Command Name="Copy equipment" CommandName="Equipment_Copy">
<Parameter Name="CopyInstallDate" Direction="In" Value="${CopyInstallDate}" />
<Parameter Name="CopyMaintenanceClassification" Direction="In" Value="${CopyMaintenanceClassification}" />
<Parameter Name="CopyManufactureYear" Direction="In" Value="${CopyManufactureYear}" />
<Parameter Name="ExtraFieldsToCopy" Direction="In" Value="${ExtraFieldsToCopy}" />
<Parameter Name="ToEquipment" Direction="In" Value="${ToEquipment}" />
</Command>
<Flush Comment="This flush is nescessary because the updates on the new Equipment must be in the DB." />
<When Name="Copy MaintenanceClassification" Condition="${CopyMaintenanceClassification} == True">
<WorkflowCall Name="ChangeMaintenanceClassification" WorkflowName="Equipment_ChangeMaintenanceClassification">
<Parameter Name="AutoAnswerMaintenanceClassification" Direction="In" Value="${FromEquipment.MaintenanceClassification}" />
<Parameter Name="AutoAnswerQuestionChangeMaintenanceClassification" Direction="In" Value="Yes" Comment="No question allowed inside current transaction" />
<Parameter Name="Equipment" Direction="In" Value="${ToEquipment}" />
<Parameter Name="MaintenanceClassificationContexts" Direction="In" Value="${MaintenanceClassificationContexts}" />
<Parameter Name="MergeFeatures" Direction="In" Value="True" Comment="Preserve existing equipment features" />
<Parameter Name="MntcSelectionListConfiguration" Direction="In" Value="${MntcSelectionListConfiguration}" />
<Parameter Name="PmWorkOrderContext" Direction="In" Value="${PmWorkOrderContext}" />
<Parameter Name="ShowResultMessage" Direction="In" Value="False" Comment="No message allowed inside current transaction" />
</WorkflowCall>
</When>
<Assign Name="Reset CopyFromEquipment" Property="${ToEquipment.CopyFromEquipment}" Value="Empty" />
<When Name="Check new status » New status passed" Condition="${NewRecordStatus} != EquipmentStatus.None">
<ChangeStatus Name="Change status" DomainObject="${ToEquipment}" NewStatus="${NewRecordStatus}" />
</When>
<UserContent Name="PostCreateEqm" />
</ForEach>
</Transaction>
<UserContent Name="Post" />
<Message Name="MessageWithNumberOfEquipmentsCreated" MessageCode="2610">
<Parameter Name="EquipmentContext" Direction="In" Value="${FromEquipment.Context}" />
<Parameter Name="NumberOfEquipments" Direction="In" Value="${NumberOfEquipments}" />
<Parameter Name="ProductDossier" Direction="In" Value="0" />
</Message>
</Execution>
</Workflow>