Categorie: reference
Bijgewerkt: 2026-04-08
actionfield workflow actionfield1646
ActionField1646
Beschrijving: Create Survey for each chosen Employee for a Vendor/SurveyAssessment Custom: Nee
Propertiesbewerken
| Property | Type | Accessor |
|---|---|---|
| SurveyAssessment | SurveyAssessment | Root |
| NewSurveyStatus | Status | Optional |
| SqlWhereClause | String | Optional |
XMLbewerken
<Workflow Name="ActionField1646" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
<Description>Create Survey for each chosen Employee for a Vendor/SurveyAssessment</Description>
<Properties>
<Property Name="SurveyAssessment" Type="SurveyAssessment" Accessor="Root" Direction="In" />
<Property Name="NewSurveyStatus" Type="Status" Accessor="Optional" Direction="In" Default="0" Comment="If filled with SurveyStatus.ForReview the status will be changed to ForReview and wemail will be sent." />
<Property Name="SqlWhereClause" Type="String" Accessor="Optional" Direction="In" Default="EmpContext = 1 AND (EmpDateOutLabour is null or EmpDateOutLabour > CONVERT (date, GETDATE(), 0))" />
<Property Name="DestinationEmployee" Type="Employee" Accessor="Internal" />
<Property Name="SqlWhereClauseStandard" Type="String" Accessor="Internal" Default="Empty" />
<Property Name="SqlWhereClauseStandardSvc" Type="String" Accessor="Internal" Default="not exists (select SvyEmpId from dba.Survey where SvySuaId = '${SurveyAssessment.Id}' AND SvyEmpId = EmpId and SvyContext = 2) AND EmpEmailAddress is not null" />
<Property Name="SqlWhereClauseStandardVdr" Type="String" Accessor="Internal" Default="not exists (select SvyEmpId from dba.Survey where SvySuaId = '${SurveyAssessment.Id}' AND SvyEmpId = EmpId and SvyContext = 1) AND EmpEmailAddress is not null" />
<Property Name="Survey" Type="Survey" Accessor="Internal" />
<Property Name="SurveyAssessmentLines" Type="List[SurveyAssessmentLine]" Accessor="Internal" />
<Property Name="SurveyLine" Type="SurveyLine" Accessor="Internal" />
</Properties>
<Execution>
<UserContent Name="Pre" />
<Validation Name="Abort if SurveyAssessment is not in preparation or active" Condition="${SurveyAssessment.Status} == SurveyAssessmentStatus.InPreparation || ${SurveyAssessment.Status} == SurveyAssessmentStatus.Active" MessageCode="3156">
<Parameter Name="SurveyAssessment" Direction="In" Value="${SurveyAssessment}" />
</Validation>
<Choose>
<When Condition="${SurveyAssessment.Context} == SurveyAssessmentContext.ContractAssessment">
<Assign Property="${SqlWhereClauseStandard}" Value="${SqlWhereClauseStandardSvc}" />
</When>
<Otherwise>
<Assign Property="${SqlWhereClauseStandard}" Value="${SqlWhereClauseStandardVdr}" />
</Otherwise>
</Choose>
<Choose Name="SqlWhereClause">
<When Name="SqlWhereClause not empty" Condition="${SqlWhereClause} != Empty">
<Assign Name="SqlWhereClause" Property="${SqlWhereClause}" Value="${SqlWhereClause} AND ${SqlWhereClauseStandard}" />
</When>
<Otherwise Name="SqlWhereClause empty">
<Assign Name="SqlWhereClause" Property="${SqlWhereClause}" Value="${SqlWhereClauseStandard}" />
</Otherwise>
</Choose>
<SystemDialog Name="DialogSelectEmployee" DialogName="SelectDomainObject">
<Parameter Name="EntityName" Direction="In" Value="Employee" />
<Parameter Name="SelectionListConfiguration" Direction="In" Value="Default" />
<Parameter Name="SqlWhereClause" Direction="In" Value="${SqlWhereClause}" />
<Parameter Name="DomainObject" Direction="Out" OutputProperty="${DestinationEmployee}" />
</SystemDialog>
<Transaction>
<WorkflowCall Name="Create a Survey" WorkflowName="Survey_CreateForAnEmployee">
<Parameter Name="DestinationEmployee" Direction="In" Value="${DestinationEmployee}" />
<Parameter Name="NewSurveyStatus" Direction="In" Value="${NewSurveyStatus}" />
<Parameter Name="SurveyAssessment" Direction="In" Value="${SurveyAssessment}" />
</WorkflowCall>
</Transaction>
<UserContent Name="Post" />
</Execution>
</Workflow>