Categorie: reference
Bijgewerkt: 2026-04-08
actionfield workflow actionfield589
ActionField589
Beschrijving: View CAD Document. Custom: Nee
Propertiesbewerken
| Property | Type | Accessor |
|---|---|---|
| DomainObject | DomainObject | Root |
| FindMethod | DocumentFindMethod | Optional |
| OpenInNewWindow | Boolean | Optional |
| SkipSelf | Boolean | Optional |
| UseExternalCadViewer | Boolean | Optional |
XMLbewerken
<Workflow Name="ActionField589" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
<Description>View CAD Document.</Description>
<Properties>
<Property Name="DomainObject" Type="DomainObject" Accessor="Root" Direction="In" />
<Property Name="FindMethod" Type="DocumentFindMethod" Accessor="Optional" Direction="In" Default="ByLocation" Comment="Search Document by 'ByLocation', 'ByHierarchy' or 'ByProcessFunction'" />
<Property Name="OpenInNewWindow" Type="Boolean" Accessor="Optional" Direction="In" Default="True" Comment="Open the document in a new window True or False" />
<Property Name="SkipSelf" Type="Boolean" Accessor="Optional" Direction="In" Default="False" Comment="Don't search Document for this DomainObject" />
<Property Name="UseExternalCadViewer" Type="Boolean" Accessor="Optional" Direction="In" Default="False" Comment="Use an external CadViewer True or False" />
<Property Name="BaseFileName" Type="String" Accessor="Internal" />
<Property Name="Document" Type="Document" Accessor="Internal" />
<Property Name="DrawingId" Type="Guid" Accessor="Internal" />
<Property Name="DWGExtension" Type="String" Accessor="Internal" Default=".dwg" />
<Property Name="FileIsDWG" Type="Boolean" Accessor="Internal" Default="False" />
<Property Name="OpenMode" Type="CadObjectOpenMode" Accessor="Internal" />
<Property Name="PdfFileName" Type="String" Accessor="Internal" />
</Properties>
<Execution>
<UserContent Name="Pre" />
<Transaction>
<Command Name="FindCadDocument" CommandName="Document_GetDocumentFromDomainObject">
<Parameter Name="DocumentFileType" Direction="In" Value="CadDocument" />
<Parameter Name="DomainObject" Direction="In" Value="${DomainObject}" />
<Parameter Name="FindMethod" Direction="In" Value="${FindMethod}" />
<Parameter Name="SkipSelf" Direction="In" Value="${SkipSelf}" />
<Parameter Name="Document" Direction="Out" OutputProperty="${Document}" />
</Command>
</Transaction>
<Validation Name="Found a document" Condition="${Document} != Empty" MessageCode="0901">
<Parameter Name="DomainObject" Direction="In" Value="${DomainObject}" />
</Validation>
<WorkflowCall Name="Check if document exist" WorkflowName="Document_CheckIfPhysicallyPresent">
<Parameter Name="Document" Direction="In" Value="${Document}" />
</WorkflowCall>
<Assign Name="Assign FileIsDWG" Property="${FileIsDWG}" Value="=#getextension(#lower(${Document.FileName})) == ${DWGExtension} ? True : False" />
<When Name="When no external DWG viewer is used" Condition="${UseExternalCadViewer} == False && ${FileIsDWG} == True">
<Command Name="Open" CommandName="CadDocument_Open">
<Parameter Name="Document" Direction="In" Value="${Document}" />
<Parameter Name="ViewerId" Direction="Out" OutputProperty="${DrawingId}" />
</Command>
<Choose Name="Check must ask for openmode">
<When Name="Must ask for openmode" Condition="#{Settings.CadViewer.OpenMode} == Ask">
<WorkflowCall Name="Dialog_CadObjectOpenMode" WorkflowName="Dialog_CadObjectOpenMode">
<Parameter Name="CadObject" Direction="In" Value="${Document}" />
<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.CadViewer.OpenMode}" />
</Otherwise>
</Choose>
<Choose Name="Check if the CAD document should be viewed as PDF or not">
<When Name="When viewed as PDF" Condition="${OpenMode} == Pdf">
<WorkflowCall Name="Cad_CreatePDF" WorkflowName="Cad_CreatePDF">
<Parameter Name="CadDocument" Direction="In" Value="${Document}" />
<Parameter Name="DrawingId" Direction="In" Value="${DrawingId}" />
<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="Otherwise, viewed with CAD viewer">
<WorkflowCall Name="Prepare for viewer" WorkflowName="Cad_PrepareViewer">
<Parameter Name="CadDocument" Direction="In" Value="${Document}" />
<Parameter Name="DrawingId" Direction="In" Value="${DrawingId}" />
</WorkflowCall>
</Otherwise>
</Choose>
</When>
<UserContent Name="Post" />
<Choose Name="Check if this is a CAD document processed by the CAD service or not">
<When Name="When processed CAD document" Condition="${UseExternalCadViewer} == False && ${FileIsDWG} == True">
<Choose Name="Check if CAD document is viewed as PDF or not">
<When Name="When viewed as PDF" Condition="${OpenMode} == Pdf">
<View Name="Open PDF document" ViewName="ExternalDocumentViewer">
<Parameter Name="DownloadName" Direction="In" Value="${BaseFileName}.pdf" />
<Parameter Name="FileName" Direction="In" Value="${PdfFileName}" />
</View>
</When>
<Otherwise Name="Otherwise, viewed with CAD viewer">
<View Name="View CAD document in CAD viewer" ViewName="CadViewer">
<Parameter Name="OpenInNewWindow" Direction="In" Value="${OpenInNewWindow}" />
<Parameter Name="ServiceId" Direction="In" Value="${DrawingId}" />
</View>
</Otherwise>
</Choose>
</When>
<Otherwise Name="Otherwise, regular document or non-processed CAD document">
<View Name="Open document" ViewName="DocumentViewer">
<Parameter Name="DocId" Direction="In" Value="${Document.Id}" />
<Parameter Name="OpenInNewWindow" Direction="In" Value="${OpenInNewWindow}" />
</View>
</Otherwise>
</Choose>
</Execution>
</Workflow>