Categorie: reference Bijgewerkt: 2026-04-08 actionfield workflow actionfield1541

ActionField1541

Beschrijving: Create servicedeskreporttype for KnowledgeTopic. Custom: Nee

Propertiesbewerken

Property Type Accessor
KnowledgeTopic KnowledgeTopic Root
UseExistingServiceDeskReportType Boolean Optional

XMLbewerken

<Workflow Name="ActionField1541" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
	<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
	<Description>Create servicedeskreporttype for KnowledgeTopic.</Description>
	<Properties>
		<Property	Name="KnowledgeTopic"							Type="KnowledgeTopic"						Accessor="Root"		Direction="In" />

		<Property	Name="UseExistingServiceDeskReportType"			Type="Boolean"								Accessor="Optional"	Direction="In"		Default="false"	Comment="ServiceDeskReportType link mode. When the value is false, a new entity ServiceDeskReportType is created and linked. When the value is true, an existing serviceDeskReportType is chosen and linked. The default value is false" />

		<Property	Name="HowToCreateServiceDeskReportType"			Type="Int16"								Accessor="Internal"						Default="0"		Comment="0=Existing,1=New on Existing,2=New" />
		<Property	Name="ObjectServiceDeskReportTypeNew"			Type="ObjectServiceDeskReportType"			Accessor="Internal" />
		<Property	Name="ObjectServiceDeskReportTypes"				Type="List[ObjectServiceDeskReportType]"	Accessor="Internal" />
		<Property	Name="RedirectToServiceDeskReportTypeScreen"	Type="Boolean"								Accessor="Internal"						Default="false" />
		<Property	Name="ServiceDeskReportType"					Type="ServiceDeskReportType"				Accessor="Internal" />
		<Property	Name="ServiceDeskReportTypeNew"					Type="ServiceDeskReportType"				Accessor="Internal" />
	</Properties>
	<Execution>
		<UserContent Name="Pre" />

		<Validation Name="KnowledgeTopic Status" Condition="${KnowledgeTopic.Status} != KnowledgeTopicStatus.Active " MessageCode="2827">
			<Parameter	Name="KnowledgeTopic"	Direction="In"		Value="${KnowledgeTopic}" />
		</Validation>
		<Validation Name="ServiceDeskReportType empty" Condition="${KnowledgeTopic.ServiceDeskReportType} == Empty" MessageCode="2826">
			<Parameter	Name="KnowledgeTopic"	Direction="In"		Value="${KnowledgeTopic}" />
		</Validation>

		<WorkflowCall Name="Dialog_CreateServiceDeskReportTypeForKnowledgeTopic" WorkflowName="Dialog_CreateServiceDeskReportTypeForKnowledgeTopic">
			<Parameter	Name="HowToCreateServiceDeskReportType"	Direction="InOut"	Value="${HowToCreateServiceDeskReportType}"	OutputProperty="${HowToCreateServiceDeskReportType}" />
		</WorkflowCall>

		<Choose Name="Check HowToCreateServiceDeskReportType">
			<When Name="HowToCreateServiceDeskReportType = 0" Condition="${HowToCreateServiceDeskReportType} == 0 ">
				<SystemDialog Name="DialogSelectServiceDeskReportType" DialogName="SelectDomainObject">
					<Parameter	Name="EntityName"					Direction="In"		Value="ServiceDeskReportType" />
					<Parameter	Name="SelectionListConfiguration"	Direction="In"		Value="Default" />
					<Parameter	Name="SqlWhereClause"				Direction="In"		Value="SdrtRecStatus != 4 and (SdrtUseInSelfService=1 or SdrtUseInServiceDesk=1)"													Comment="Status 4 == Expired" />
					<Parameter	Name="DomainObject"					Direction="Out"																							OutputProperty="${ServiceDeskReportTypeNew}" />
				</SystemDialog>
			</When>


			<When Name="HowToCreateServiceDeskReportType = 1" Condition="${HowToCreateServiceDeskReportType} == 1">
				<SystemDialog Name="DialogSelectServiceDeskReportType" DialogName="SelectDomainObject">
					<Parameter	Name="EntityName"					Direction="In"		Value="ServiceDeskReportType" />
					<Parameter	Name="SelectionListConfiguration"	Direction="In"		Value="Default" />
					<Parameter	Name="SqlWhereClause"				Direction="In"		Value="SdrtRecStatus != 4 and (SdrtUseInSelfService=1 or SdrtUseInServiceDesk=1)"												Comment="Status 4 == Expired" />
					<Parameter	Name="DomainObject"					Direction="Out"																							OutputProperty="${ServiceDeskReportType}" />
				</SystemDialog>

				<Transaction>
					<Insert Name="Create servicedeskreporttype" ObjectType="ServiceDeskReportType" OutputProperty="${ServiceDeskReportTypeNew}">
						<Parameter	Name="BackOffice"	Direction="In"		Value="${ServiceDeskReportType.BackOffice}" />
					</Insert>

					<Copy Name="Copy Standaard Columns" Source="${ServiceDeskReportType}" Target="${ServiceDeskReportTypeNew}" CopyType="Overwrite" CustomOnly="False" />

					<Copy Name="Copy Custom Columns" Source="${ServiceDeskReportType}" Target="${ServiceDeskReportTypeNew}" CopyType="OnlySetIfEmpty" CustomOnly="True" />

					<Assign Name="Clear Exported" Property="${ServiceDeskReportTypeNew.Exported}" Value="False" />
					<Assign Name="Clear ExternalId" Property="${ServiceDeskReportTypeNew.ExternalId}" Value="Empty" />
					<Assign Name="Clear ExternalStatus" Property="${ServiceDeskReportTypeNew.ExternalStatus}" Value="Empty" />
					<Assign Name="Clear StatusActiveDate" Property="${ServiceDeskReportTypeNew.StatusActiveDate}" Value="Empty" />
					<Assign Name="Clear StatusActiveEmployee" Property="${ServiceDeskReportTypeNew.StatusActiveEmployee}" Value="Empty" />
					<Assign Name="Clear StatusConceptDate" Property="${ServiceDeskReportTypeNew.StatusConceptDate}" Value="Empty" />
					<Assign Name="Clear StatusConceptEmployee" Property="${ServiceDeskReportTypeNew.StatusConceptEmployee}" Value="Empty" />
					<Assign Name="Clear StatusExpiredDate" Property="${ServiceDeskReportTypeNew.StatusExpiredDate}" Value="Empty" />
					<Assign Name="Clear StatusExpiredEmployee" Property="${ServiceDeskReportTypeNew.StatusExpiredEmployee}" Value="Empty" />

					<GetList Name="Get ObjectServiceDeskReportTypes linked to this ServiceDeskReportType" Type="ObjectServiceDeskReportType" OutputProperty="${ObjectServiceDeskReportTypes}" OrderBy="Id" OrderDirection="Ascending">
						<Filters>
							<PropertyFilter	PropertyName="ServiceDeskReportType"	Operator="="		PropertyValue="${ServiceDeskReportType}" />
						</Filters>
					</GetList>

					<ForEach Name="For each ObjectServiceDeskReportType found" In="${ObjectServiceDeskReportTypes}" As="ObjectServiceDeskReportType">
						<Insert Name="Create ObjectServiceDeskReportType" ObjectType="ObjectServiceDeskReportType" OutputProperty="${ObjectServiceDeskReportTypeNew}">
							<Parameter	Name="EquipmentType"			Direction="In"		Value="${ObjectServiceDeskReportType.EquipmentType}" />
							<Parameter	Name="ServiceDeskReportType"	Direction="In"		Value="${ServiceDeskReportTypeNew}" />
							<Parameter	Name="Space"					Direction="In"		Value="${ObjectServiceDeskReportType.Space}" />
						</Insert>
					</ForEach>
				</Transaction>

				<Toggle Name="Open servicedeskreporttype screen" Property="${RedirectToServiceDeskReportTypeScreen}" />
			</When>


			<When Name="HowToCreateServiceDeskReportType = 2" Condition="${HowToCreateServiceDeskReportType} == 2">
				<Transaction>
					<Insert Name="Create servicedeskreporttype" ObjectType="ServiceDeskReportType" OutputProperty="${ServiceDeskReportTypeNew}">
						<Parameter	Name="Context"			Direction="In"		Value="ServiceDeskReportTypeContext.Job" />
						<Parameter	Name="UseInSelfService"	Direction="In"		Value="True" />
						<Parameter	Name="UseInServiceDesk"	Direction="In"		Value="True" />
					</Insert>
				</Transaction>

				<Toggle Name="Open servicedeskreporttype screen" Property="${RedirectToServiceDeskReportTypeScreen}" />
			</When>
		</Choose>

		<Transaction>
			<Assign Name="Set ServiceDeskReportType to KnowledgeTopic" Property="${KnowledgeTopic.ServiceDeskReportType}" Value="${ServiceDeskReportTypeNew}" />
		</Transaction>

		<UserContent Name="Post" />

		<When Name="RedirectToServiceDeskReportTypeScreen" Condition="${RedirectToServiceDeskReportTypeScreen} == true">
			<View Name="Open Screen" ViewName="DataEntryScreen">
				<Parameter	Name="DomainObject"			Direction="In"		Value="${ServiceDeskReportTypeNew}" />
				<Parameter	Name="FocusEditableField"	Direction="In"		Value="=${ServiceDeskReportTypeNew.Description} == Empty" />
			</View>
		</When>
	</Execution>
</Workflow>