Categorie: reference
Bijgewerkt: 2026-04-08
actionfield workflow actionfield1062
ActionField1062
Beschrijving: Change status of RentableRealEstateContract to Concept. Custom: Nee
Propertiesbewerken
| Property | Type | Accessor |
|---|---|---|
| RentableRealEstateContract | ServiceContract | Root |
XMLbewerken
<Workflow Name="ActionField1062" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
<Description>Change status of RentableRealEstateContract to Concept.</Description>
<Properties>
<Property Name="RentableRealEstateContract" Type="ServiceContract" Accessor="Root" Direction="In" />
<Property Name="ContractPeriod" Type="ContractPeriod" Accessor="Internal" />
<Property Name="Count" Type="Int64" Accessor="Internal" />
<Property Name="StateAgenda" Type="StateAgenda" Accessor="Internal" />
<Property Name="StateTimeslots" Type="List[StateTimeslot]" Accessor="Internal" />
</Properties>
<Execution>
<UserContent Name="Pre" />
<Transaction>
<GetCount Name="if there are any invoices, delete isn't possible" Type="InternalChargeLine" OutputProperty="${Count}">
<Filters>
<PropertyFilter PropertyName="ServiceContract" Operator="=" PropertyValue="${RentableRealEstateContract}" />
</Filters>
</GetCount>
</Transaction>
<Validation Name="There are invoice lines for this contract. Reopen not possible" Condition="${Count} == 0" MessageCode="2066">
<Parameter Name="ServiceContract" Direction="In" Value="${RentableRealEstateContract}" />
</Validation>
<Transaction>
<GetList Name="Get list of StateTimeslots linked to the periods of this contract" Type="StateTimeslot" OutputProperty="${StateTimeslots}" OrderBy="Id" OrderDirection="Ascending">
<Filters>
<InFilter PropertyName="Id">
<Subquery Type="ContractPeriod">
<Filters>
<PropertyFilter PropertyName="ServiceContract" Operator="=" PropertyValue="${RentableRealEstateContract}" />
</Filters>
<Properties>
<Property Name="StateTimeslot" Alias="StateTimeslot" Type="Property" />
</Properties>
</Subquery>
</InFilter>
</Filters>
</GetList>
<When Name="if there are any timslots, remove them" Condition="${StateTimeslots.Count} > 0">
<Assign Name="Assign StateAgenda" Property="${StateAgenda}" Value="=#getpropertyvalue(#elementat(${StateTimeslots}, 0), 'StateAgenda')" />
<ForEach Name="Foreach found StateTimeslot" In="${StateTimeslots}" As="StateTimeslot">
<GetItem Name="Get ContractPeriod" Type="ContractPeriod" OutputProperty="${ContractPeriod}">
<Filters>
<PropertyFilter PropertyName="StateTimeslot" Operator="=" PropertyValue="${StateTimeslot}" />
</Filters>
</GetItem>
<Assign Name="Reset StateTimeslot on ContractPeriod" Property="${ContractPeriod.StateTimeslot}" Value="Empty" />
<DeleteObject Name="Delete StateTimeslot" DomainObject="${StateTimeslot}" />
</ForEach>
<GetCount Name="How many StateTimeslots are there related to this StateAgenda" Type="StateTimeslot" OutputProperty="${Count}">
<Filters>
<PropertyFilter PropertyName="StateAgenda" Operator="=" PropertyValue="${StateAgenda}" />
</Filters>
</GetCount>
<When Name="if there aren't any other StateTimeslots linked to this StateAgenda, delete it as well" Condition="${Count} == 0">
<Assign Name="Reset StateAgenda on the RRE" Property="${RentableRealEstateContract.Space.StateAgenda}" Value="Empty" />
<DeleteObject Name="Delete StateAgenda as well" DomainObject="${StateAgenda}" />
</When>
</When>
<ChangeStatus Name="Reopen rentablerealestatecontract" DomainObject="${RentableRealEstateContract}" NewStatus="ServiceContractStatus.Concept" />
</Transaction>
<UserContent Name="Post" />
</Execution>
</Workflow>