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

ActionField625

Beschrijving: Highlight Space on Cad drawing. Custom: Nee

Propertiesbewerken

Property Type Accessor
Space Space Root
CadReport CadReport Optional

XMLbewerken

<Workflow Name="ActionField625" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
	<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
	<Description>Highlight Space on Cad drawing.</Description>
	<Properties>
		<Property	Name="Space"		Type="Space"				Accessor="Root"		Direction="In" />

		<Property	Name="CadReport"	Type="CadReport"			Accessor="Optional"	Direction="In"		Default="US009"	Comment="Open this CadReport" />

		<Property	Name="BaseFileName"	Type="String"				Accessor="Internal" />
		<Property	Name="CadDocument"	Type="Document"				Accessor="Internal" />
		<Property	Name="DrawingId"	Type="Guid"					Accessor="Internal" />
		<Property	Name="OpenMode"		Type="CadObjectOpenMode"	Accessor="Internal" />
		<Property	Name="PdfFileName"	Type="String"				Accessor="Internal" />
	</Properties>
	<Execution>
		<UserContent Name="Pre" />

		<Validation Name="CadHandle should have a value" Condition="${Space.CadHandle} != 0" MessageCode="2615" />
		<Validation Name="Buildingfloor should have a CAD document" Condition="${Space.BuildingFloor.CadDocument?} != Empty" MessageCode="2616" />

		<Assign Name="Set CadDocument" Property="${CadDocument}" Value="${Space.BuildingFloor.CadDocument}" />

		<Command Name="Open caddocument" CommandName="CadDocument_Open">
			<Parameter	Name="Document"	Direction="In"		Value="${CadDocument}" />
			<Parameter	Name="ViewerId"	Direction="Out"								OutputProperty="${DrawingId}" />
		</Command>

		<Transaction>
			<Command Name="Fill Polyline" CommandName="CadDocument_FillPolyline">
				<Parameter	Name="PolylineHandle"	Direction="In"		Value="${Space.CadHandle}" />
				<Parameter	Name="ViewerId"			Direction="In"		Value="${DrawingId}" />
			</Command>
		</Transaction>

		<Choose Name="Check must ask for openmode">
			<When Name="Must ask for openmode" Condition="#{Settings.CadReport.OpenMode} == Ask">
				<WorkflowCall Name="Dialog_CadObjectOpenMode" WorkflowName="Dialog_CadObjectOpenMode">
					<Parameter	Name="CadObject"	Direction="In"		Value="${CadDocument}" />
					<Parameter	Name="OpenMode"		Direction="InOut"	Value="${OpenMode}"		OutputProperty="${OpenMode}" />
				</WorkflowCall>
			</When>

			<Otherwise Name="No need to ask">
				<Assign Name="set openmode" Property="${OpenMode}" Value="#{Settings.CadReport.OpenMode}" />
			</Otherwise>
		</Choose>

		<Choose Name="Check for pdf">
			<When Name="Openmode = PDF" Condition="${OpenMode} == Pdf">
				<WorkflowCall Name="Cad_CreatePDF" WorkflowName="Cad_CreatePDF">
					<Parameter	Name="CadDocument"	Direction="In"		Value="${CadDocument}" />
					<Parameter	Name="DrawingId"	Direction="In"		Value="${DrawingId}" />
					<Parameter	Name="IsCadReport"	Direction="In"		Value="True" />
					<Parameter	Name="BaseFileName"	Direction="Out"								OutputProperty="${BaseFileName}" />
					<Parameter	Name="PdfFileName"	Direction="Out"								OutputProperty="${PdfFileName}" />
				</WorkflowCall>

				<Command Name="Close" CommandName="CadDocument_Close">
					<Parameter	Name="ViewerId"	Direction="In"		Value="${DrawingId}" />
				</Command>
			</When>

			<Otherwise Name="No pdf">
				<WorkflowCall Name="Prepare for viewer" WorkflowName="Cad_PrepareViewer">
					<Parameter	Name="CadDocument"	Direction="In"		Value="${CadDocument}" />
					<Parameter	Name="DrawingId"	Direction="In"		Value="${DrawingId}" />
				</WorkflowCall>
			</Otherwise>
		</Choose>

		<UserContent Name="Post" />

		<Choose Name="Check openmode for view">
			<When Name="Openmode = PDF" Condition="${OpenMode} == Pdf">
				<View Name="View document" ViewName="ExternalDocumentViewer">
					<Parameter	Name="DownloadName"	Direction="In"		Value="${BaseFileName}.pdf" />
					<Parameter	Name="FileName"		Direction="In"		Value="${PdfFileName}" />
				</View>
			</When>


			<When Name="Openmode = viewer" Condition="${OpenMode} == CadViewer">
				<View Name="Open Document" ViewName="CadViewer">
					<Parameter	Name="OpenInNewWindow"		Direction="In"		Value="True" />
					<Parameter	Name="ServiceId"			Direction="In"		Value="${DrawingId}" />
					<Parameter	Name="ZoomToObjectHandle"	Direction="In"		Value="${Space.CadHandle}" />
				</View>
			</When>
		</Choose>
	</Execution>
</Workflow>