Categorie: reference
Bijgewerkt: 2026-04-08
actionfield workflow actionfield1080
ActionField1080
Beschrijving: Create SoftwareInstallation for Equipment (context Software, ConfigurationItem or Instrument). Custom: Nee
Propertiesbewerken
| Property | Type | Accessor |
|---|---|---|
| Equipment | Equipment | Root |
| EquipmentContext | Context | Optional |
| EquipmentContexts | List[Context] | Optional |
| SqlWhereClauseEmp | UltimoString | Optional |
XMLbewerken
<Workflow Name="ActionField1080" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
<Description>Create SoftwareInstallation for Equipment (context Software, ConfigurationItem or Instrument).</Description>
<Properties>
<Property Name="Equipment" Type="Equipment" Accessor="Root" Direction="In" />
<Property Name="EquipmentContext" Type="Context" Accessor="Optional" Direction="In" Default="EquipmentContext.ConfigurationItem" Comment="EquipmentContext used for label and for SQL whereclause" />
<Property Name="EquipmentContexts" Type="List[Context]" Accessor="Optional" Direction="In" Comment="Only select Equipments with these contexts" />
<Property Name="SqlWhereClauseEmp" Type="UltimoString" Accessor="Optional" Direction="In" Comment="Only select Employees with this sqlwhereclause" />
<Property Name="ConfigurationItem" Type="Equipment" Accessor="Internal" />
<Property Name="ContextOfEquipmentToSelect" Type="Context" Accessor="Internal" Comment="Used to dynamically show EQM label in dialog" />
<Property Name="CreatedSoftwareInstallation" Type="SoftwareInstallation" Accessor="Internal" />
<Property Name="CurrentDate" Type="Date" Accessor="Internal" Default="#{Environment.CurrentDate}" Comment="Today, 0:00hrs" />
<Property Name="CurrentUser" Type="Employee" Accessor="Internal" Default="#{User.EmployeeId}" />
<Property Name="Installation" Type="Equipment" Accessor="Internal" />
<Property Name="InstallationsCount" Type="Int64" Accessor="Internal" />
<Property Name="Instrument" Type="Equipment" Accessor="Internal" />
<Property Name="SelectedEquipment" Type="Equipment" Accessor="Internal" Comment="Software or ConfigurationItem, depending on context of root" />
<Property Name="SelectedInstallationDate" Type="Date?" Accessor="Internal" />
<Property Name="SelectedInstallationEmployee" Type="Employee" Accessor="Internal" />
<Property Name="SelectedVersion" Type="UltimoString" Accessor="Internal" />
<Property Name="Software" Type="Equipment" Accessor="Internal" />
<Property Name="SqlWhereClauseEqm" Type="UltimoString" Accessor="Internal" />
<Property Name="TotalSeatsCount" Type="Int64" Accessor="Internal" />
</Properties>
<Execution>
<UserContent Name="Pre" />
<When Name="When context is Software" Condition="${Equipment.Context} == EquipmentContext.Software">
<When Name="IfEquipmentContextsIsEmpty" Condition="${EquipmentContexts} == Empty">
<Assign Name="Set context " Property="${EquipmentContext}" Value="EquipmentContext.ConfigurationItem" />
<AddToList Name="set EquipmentContexts" List="${EquipmentContexts}" Item="${EquipmentContext}" />
</When>
<Assign Name="Set SQL WHERE clause to only show ConfigurationItems" Property="${SqlWhereClauseEqm}" Value="eqmcontext IN (#foreach(${Context} in ${EquipmentContexts}) #each ${Context} #between , #end) " />
<Assign Name="Set context to ConfigurationItem" Property="${ContextOfEquipmentToSelect}" Value="EquipmentContext.ConfigurationItem" />
</When>
<When Name="When context is ConfigurationItem" Condition="${Equipment.Context} != EquipmentContext.Software">
<When Name="IfEquipmentContextsIsEmpty" Condition="${EquipmentContexts} == Empty">
<Assign Name="Set context " Property="${EquipmentContext}" Value="EquipmentContext.Software" />
<AddToList Name="set EquipmentContexts" List="${EquipmentContexts}" Item="${EquipmentContext}" />
</When>
<Assign Name="Set SQL WHERE clause to only show Software" Property="${SqlWhereClauseEqm}" Value="eqmcontext IN (#foreach(${Context} in ${EquipmentContexts}) #each ${Context} #between , #end) " />
<Assign Name="Set context to Software" Property="${ContextOfEquipmentToSelect}" Value="${ContextOfEquipmentToSelect}" />
</When>
<Dialog Name="AddSoftwareInstallation" TitleCode="ADDSOFTWAREINSTALLATION">
<Container Border="True">
<SelectionList Name="SelectedEquipment" OutputProperty="${SelectedEquipment}" ColumnName="EqmId" ViewfieldConfiguration="Software" Required="True" LabelCode="EQUIPMENT" SqlWhereClause="${SqlWhereClauseEqm}" />
<Date Name="SelectedInstallationDate" Width="100" Value="${CurrentDate}" OutputProperty="${SelectedInstallationDate}" Required="True" LabelCode="DATEINSTALL" />
<SelectionList Name="SelectedInstallationEmployee" Value="${CurrentUser}" OutputProperty="${SelectedInstallationEmployee}" ColumnName="EmpId" Required="True" LabelCode="EMPINSTALL" SqlWhereClause="${SqlWhereClauseEmp}" />
<Text Name="SelectedVersion" OutputProperty="${SelectedVersion}" ColumnName="SoiVersion" LabelCode="VERSION" />
</Container>
</Dialog>
<When Name="When context is Software" Condition="${Equipment.Context} == EquipmentContext.Software">
<When Name="ConfigurationItem" Condition="${EquipmentContext} == EquipmentContext.ConfigurationItem">
<Assign Name="Set Software" Property="${Software}" Value="${Equipment}" />
<Assign Name="Set ConfigurationItem" Property="${ConfigurationItem}" Value="${SelectedEquipment}" />
</When>
<When Name="Instrument" Condition="${EquipmentContext} == EquipmentContext.Instrument">
<Assign Name="Set Software" Property="${Software}" Value="${Equipment}" />
<Assign Name="Set Instrument" Property="${Instrument}" Value="${SelectedEquipment}" />
</When>
<When Name="Installation" Condition="${EquipmentContext} == EquipmentContext.Installation">
<Assign Name="Set Software" Property="${Software}" Value="${Equipment}" />
<Assign Name="Set Installation" Property="${Installation}" Value="${SelectedEquipment}" />
</When>
</When>
<When Name="When context is ConfigurationItem" Condition="${Equipment.Context} == EquipmentContext.ConfigurationItem">
<Assign Name="Set Software" Property="${Software}" Value="${SelectedEquipment}" />
<Assign Name="Set ConfigurationItem" Property="${ConfigurationItem}" Value="${Equipment}" />
</When>
<When Name="When context is Instrument" Condition="${Equipment.Context} == EquipmentContext.Instrument">
<Assign Name="Set Software" Property="${Software}" Value="${SelectedEquipment}" />
<Assign Name="Set Instrument" Property="${Instrument}" Value="${Equipment}" />
</When>
<When Name="When context is Installation" Condition="${Equipment.Context} == EquipmentContext.Installation">
<Assign Name="Set Software" Property="${Software}" Value="${SelectedEquipment}" />
<Assign Name="Set Installation" Property="${Installation}" Value="${Equipment}" />
</When>
<When Name="When a license is required, check availability and usage" Condition="${Software.LicenseRequired} == True">
<Transaction>
<GetSum Name="Get totals seats for active software licenses at installation date" Type="SoftwareLicense" OutputProperty="${TotalSeatsCount}" PropertyName="NumberOfSeats">
<Filters>
<PropertyFilter PropertyName="Software" Operator="=" PropertyValue="${Software}" />
<PropertyFilter PropertyName="StartDate" Operator="<=" PropertyValue="${SelectedInstallationDate}" />
<CombinedFilter FilterOperator="Or">
<PropertyFilter PropertyName="ExpirationDate" Operator="=" PropertyValue="Empty" />
<PropertyFilter PropertyName="ExpirationDate" Operator=">=" PropertyValue="${SelectedInstallationDate}" />
</CombinedFilter>
<PropertyFilter PropertyName="Status" Operator=">=" PropertyValue="SoftwareLicenseStatus.None" />
</Filters>
</GetSum>
<GetCount Name="Get number of installations for software at installation date" Type="SoftwareInstallation" OutputProperty="${InstallationsCount}">
<Filters>
<PropertyFilter PropertyName="Software" Operator="=" PropertyValue="${Software}" />
<PropertyFilter PropertyName="InstallationDate" Operator="<=" PropertyValue="${SelectedInstallationDate}" />
<CombinedFilter FilterOperator="Or">
<PropertyFilter PropertyName="RemovalDate" Operator="=" PropertyValue="Empty" />
<PropertyFilter PropertyName="RemovalDate" Operator=">" PropertyValue="${SelectedInstallationDate}" />
</CombinedFilter>
<PropertyFilter PropertyName="Status" Operator=">=" PropertyValue="SoftwareLicenseStatus.None" />
</Filters>
</GetCount>
</Transaction>
<When Name="When no more seats available" Condition="(${TotalSeatsCount} - ${InstallationsCount}) <= 0">
<ContinuationQuestion Name="NotEnoughAvailableSeatsContinue?" MessageCode="2121" Default="No">
<Parameter Name="InstallationDate" Direction="In" Value="${SelectedInstallationDate}" />
<Parameter Name="InstallationsCount" Direction="In" Value="${InstallationsCount}" />
<Parameter Name="Software" Direction="In" Value="${Software}" />
<Parameter Name="TotalSeatsCount" Direction="In" Value="${TotalSeatsCount}" />
</ContinuationQuestion>
</When>
</When>
<Transaction>
<Insert Name="Create SoftwareInstallation" ObjectType="SoftwareInstallation" OutputProperty="${CreatedSoftwareInstallation}">
<Parameter Name="Context" Direction="In" Value="SoftwareInstallationContext.SoftwareInstallation" />
<Parameter Name="ConfigurationItem" Direction="In" Value="${ConfigurationItem}" />
<Parameter Name="Installation" Direction="In" Value="${Installation}" />
<Parameter Name="InstallationDate" Direction="In" Value="${SelectedInstallationDate}" />
<Parameter Name="InstallationEmployee" Direction="In" Value="${SelectedInstallationEmployee}" />
<Parameter Name="Instrument" Direction="In" Value="${Instrument}" />
<Parameter Name="Software" Direction="In" Value="${Software}" />
<Parameter Name="Version" Direction="In" Value="${SelectedVersion}" />
</Insert>
</Transaction>
<UserContent Name="Post" />
</Execution>
</Workflow>