Categorie: reference
Bijgewerkt: 2026-04-08
actionfield workflow actionfield049
ActionField049
Beschrijving: Reopen PmJob (from status Approved). Custom: Nee
Propertiesbewerken
| Property | Type | Accessor |
|---|---|---|
| PmJob | PmJob | Root |
XMLbewerken
<Workflow Name="ActionField049" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
<Description>Reopen PmJob (from status Approved).</Description>
<Properties>
<Property Name="PmJob" Type="PmJob" Accessor="Root" Direction="In" />
<Property Name="PmJob_Equipment_HasServiceContract" Type="Boolean" Accessor="Internal" />
<Property Name="PmJob_ProcessFunction_HasServiceContract" Type="Boolean" Accessor="Internal" />
<Property Name="ReopenPmWorkOrder" Type="Boolean" Accessor="Internal" />
<Property Name="Result" Type="RequestResult" Accessor="Internal" />
</Properties>
<Execution>
<UserContent Name="Pre" />
<Validation Name="PmJob not approved" Condition="${PmJob.Status} == PmJobStatus.Approved" MessageCode="0070">
<Parameter Name="PmJob" Direction="In" Value="${PmJob}" />
</Validation>
<Command Name="Check if pmjob has ServiceContracts" CommandName="PmJob_HasServiceContracts">
<Parameter Name="PmJob" Direction="In" Value="${PmJob}" />
<Parameter Name="PmJob_Equipment_HasServiceContract" Direction="Out" OutputProperty="${PmJob_Equipment_HasServiceContract}" />
<Parameter Name="PmJob_ProcessFunction_HasServiceContract" Direction="Out" OutputProperty="${PmJob_ProcessFunction_HasServiceContract}" />
</Command>
<Choose Name="PmJob Has ServiceContract">
<When Name="No ServiceContract" Condition="${PmJob_ProcessFunction_HasServiceContract} == False && ${PmJob_Equipment_HasServiceContract} == False">
<Assign Name="setting DeleteServiceContractInternal = false" Property="#{Settings.PmJob.DeleteServiceContractInternal}" Value="False" />
</When>
<When Name="setting PmWorkOrder.DeleteServiceContract is Disabled" Condition="#settingenabled(${PmJob.Id.PmWorkOrder}, PmWorkOrder.DeleteServiceContract) == False">
<Assign Name="setting DeleteServiceContractInternal = false" Property="#{Settings.PmJob.DeleteServiceContractInternal}" Value="False" />
</When>
<When Name="Check ask delete servicecontract » Ask delete servicecontract" Condition="${PmJob_ProcessFunction_HasServiceContract} == True">
<Choose Name="DeleteServiceContract?">
<When Name="Ask" Condition="#getsetting(${PmJob.Id.PmWorkOrder}, PmWorkOrder.DeleteServiceContract) == AskUser">
<Question Name="Delete ServiceContract from processfunction" Type="YesNo" MessageCode="0212" Default="Yes" OutputProperty="${Result}">
<Parameter Name="PmJob" Direction="In" Value="${PmJob}" />
</Question>
<Assign Name="set setting DeleteServiceContractInternal" Property="#{Settings.PmJob.DeleteServiceContractInternal}" Value="=${Result} == Yes ? True : False" />
</When>
<Otherwise Name="Don't ask">
<Assign Name="set setting DeleteServiceContractInternal" Property="#{Settings.PmJob.DeleteServiceContractInternal}" Value="=#getsetting(${PmJob.Id.PmWorkOrder}, PmWorkOrder.DeleteServiceContract) == AutoAnswerYes ? True : False" />
</Otherwise>
</Choose>
</When>
<When Name="Check ask delete servicecontract » Ask delete servicecontract" Condition="${PmJob_Equipment_HasServiceContract} == True">
<Choose Name="DeleteServiceContract?">
<When Name="Ask" Condition="#getsetting(${PmJob.Id.PmWorkOrder}, PmWorkOrder.DeleteServiceContract) == AskUser">
<Question Name="Delete ServiceContract from equipment" Type="YesNo" MessageCode="0213" Default="Yes" OutputProperty="${Result}">
<Parameter Name="PmJob" Direction="In" Value="${PmJob}" />
</Question>
<Assign Name="set setting DeleteServiceContractInternal" Property="#{Settings.PmJob.DeleteServiceContractInternal}" Value="=${Result} == Yes ? True : False" />
</When>
<Otherwise Name="Don't ask">
<Assign Name="set setting DeleteServiceContractInternal" Property="#{Settings.PmJob.DeleteServiceContractInternal}" Value="=#getsetting(${PmJob.Id.PmWorkOrder}, PmWorkOrder.DeleteServiceContract) == AutoAnswerYes ? True : False" />
</Otherwise>
</Choose>
</When>
</Choose>
<Transaction>
<ChangeStatus Name="Reopen PmJob" DomainObject="${PmJob}" NewStatus="PmJobStatus.Created" />
</Transaction>
<UserContent Name="Post" />
</Execution>
</Workflow>