Categorie: reference
Bijgewerkt: 2026-04-08
actionfield workflow actionfield526
ActionField526
Beschrijving: Upload file and create ObjectDocument for DomainObject. Custom: Nee
Propertiesbewerken
| Property | Type | Accessor |
|---|---|---|
| DomainObject | DomainObject | Root |
| AskForDocumentDescription | Boolean | Optional |
| AskForDocumentType | Boolean | Optional |
| AskForSite | Boolean | Optional |
| DocumentContext | Context | Optional |
| DocumentStatus | Status | Optional |
| FileFilter | String | Optional |
| FileSystemPath | FileSystemPath | Optional |
| MaximumNumberOfFiles | Int32 | Optional |
| UserAsManager | Boolean | Optional |
XMLbewerken
<Workflow Name="ActionField526" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
<Description>Upload file and create ObjectDocument for DomainObject.</Description>
<Properties>
<Property Name="DomainObject" Type="DomainObject" Accessor="Root" Direction="In" Comment="All DomainObjects with a relation with ObjectDocument are allowed" />
<Property Name="AskForDocumentDescription" Type="Boolean" Accessor="Optional" Direction="In" Default="#{Settings.DocumentUpload.AskForDocumentDescription}" Comment="Ask for a Document Description" />
<Property Name="AskForDocumentType" Type="Boolean" Accessor="Optional" Direction="In" Default="#{Settings.DocumentUpload.AskForDocumentType}" Comment="Ask for a DocumentType" />
<Property Name="AskForSite" Type="Boolean" Accessor="Optional" Direction="In" Default="#{Settings.DocumentUpload.AskForSite}" Comment="Ask for a Site" />
<Property Name="DocumentContext" Type="Context" Accessor="Optional" Direction="In" Default="DocumentContext.Standard" Comment="Create Document with this context" />
<Property Name="DocumentStatus" Type="Status" Accessor="Optional" Direction="In" Default="DocumentStatus.Active" Comment="Create Document with this status" />
<Property Name="FileFilter" Type="String" Accessor="Optional" Direction="In" Comment="Select only files with this filter" />
<Property Name="FileSystemPath" Type="FileSystemPath" Accessor="Optional" Direction="In" Comment="Location of the files" />
<Property Name="MaximumNumberOfFiles" Type="Int32" Accessor="Optional" Direction="In" Default="10" Comment="What is the maximum number of files to be uploaded" />
<Property Name="UserAsManager" Type="Boolean" Accessor="Optional" Direction="In" Default="False" Comment="Set Document.ManageEmployee to User." />
<Property Name="ContainsAnyOfTheSupportedFileTypes" Type="Boolean" Accessor="Internal" />
<Property Name="CurrentApplicationElementIsJobScreen" Type="Boolean" Accessor="Internal" />
<Property Name="CurrentScreenName" Type="String" Accessor="Internal" />
<Property Name="UploadedDocuments" Type="List[Document]" Accessor="Internal" />
</Properties>
<Execution>
<UserContent Name="Pre" />
<When Name="Domain object is FieldSafetyNotice" Condition="${DomainObject.EntityName} == FieldSafetyNotice">
<Validation Name="Document cannot be linked" Condition="${DomainObject.Status} == FieldSafetyNoticeStatus.Created || ${DomainObject.Status} == FieldSafetyNoticeStatus.Active || ${DomainObject.Status} == FieldSafetyNoticeStatus.ToEvaluate" MessageCode="3768">
<Parameter Name="FieldSafetyNotice" Direction="In" Value="${DomainObject}" />
</Validation>
</When>
<When Name="Domain object is PmJob" Condition="${DomainObject.EntityName} == PmJob">
<Validation Name="Document cannot be linked" Condition="${DomainObject.Status} == PmJobStatus.Created" MessageCode="3853">
<Parameter Name="PmJob" Direction="In" Value="${DomainObject}" />
</Validation>
</When>
<WorkflowCall Name="UploadDocuments" WorkflowName="UploadDocuments" Comment="Call workflow to move the files from the Upload path to the Media path and creates Document objects">
<Parameter Name="AskForDocumentDescription" Direction="In" Value="${AskForDocumentDescription}" />
<Parameter Name="AskForDocumentType" Direction="In" Value="${AskForDocumentType}" />
<Parameter Name="AskForSite" Direction="In" Value="${AskForSite}" />
<Parameter Name="DocumentContext" Direction="In" Value="${DocumentContext}" />
<Parameter Name="DomainObject" Direction="In" Value="${DomainObject}" />
<Parameter Name="FileFilter" Direction="In" Value="${FileFilter}" />
<Parameter Name="MaximumNumberOfFiles" Direction="In" Value="${MaximumNumberOfFiles}" />
<Parameter Name="FileSystemPath" Direction="InOut" Value="${FileSystemPath}" OutputProperty="${FileSystemPath}" />
<Parameter Name="UploadedDocuments" Direction="Out" OutputProperty="${UploadedDocuments}" />
</WorkflowCall>
<Transaction>
<ForEach Name="Foreach Document in UploadedDocuments" In="${UploadedDocuments}" As="Document">
<Command Name="CreateObjectDocument" CommandName="CreateObjectDocument" Comment="creates a ObjectDocument object for each Document">
<Parameter Name="Document" Direction="In" Value="${Document}" />
<Parameter Name="DomainObject" Direction="In" Value="${DomainObject}" />
</Command>
<ChangeStatus Name="Change Status" DomainObject="${Document}" NewStatus="${DocumentStatus}" />
<When Name="User as manager" Condition="${UserAsManager} == True">
<Assign Name="Assign User" Property="${Document.ManageEmployee}" Value="#{User.EmployeeId}" />
</When>
</ForEach>
</Transaction>
<When Name="AIIntegration and Summary Enabled" Condition="#moduleenabled('AIIntegration') && #{Settings.AI.GenerateDocumentSummary} == True">
<Command Name="Check screen type is a job or not" CommandName="ApplicationParameterContext_CheckCurrentScreenIsAJobScreen">
<Parameter Name="CurrentApplicationElementIsJobScreen" Direction="Out" OutputProperty="${CurrentApplicationElementIsJobScreen}" />
<Parameter Name="CurrentScreenName" Direction="Out" OutputProperty="${CurrentScreenName}" />
</Command>
<Command Name="Check uploaded documents contains file types" CommandName="Documents_AISupportedFileTypes">
<Parameter Name="Documents" Direction="In" Value="${UploadedDocuments}" />
<Parameter Name="ContainsAnyOfTheSupportedFileTypes" Direction="Out" OutputProperty="${ContainsAnyOfTheSupportedFileTypes}" />
</Command>
<When Name="Screen type check" Condition="${CurrentApplicationElementIsJobScreen} && ${ContainsAnyOfTheSupportedFileTypes} == True">
<WorkflowCall Name="Documents_GenerateDescription" WorkflowName="Documents_GenerateDescription" Comment="Call workflow to generate document description using AI">
<Parameter Name="CurrentScreenName" Direction="In" Value="${CurrentScreenName}" />
<Parameter Name="Documents" Direction="In" Value="${UploadedDocuments}" />
</WorkflowCall>
</When>
</When>
<UserContent Name="Post" />
</Execution>
</Workflow>