Load and Delete File
- 20 Jan 2023
- 1 Minute to read
- Print
- DarkLight
Load and Delete File
- Updated on 20 Jan 2023
- 1 Minute to read
- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
Step Details | |
Introduced in Version | 4.0.0 |
Last Modified in Version | 7.12.0 |
Location | File Management |
The Load and Delete File step loads a file during runtime and removes the file locally. The full path to the file must be provided as input. Once the step completes, the file will be deleted from the file storage and exist only in memory. If only the file name is provided as an input, the step will limit searching for the file in the Decisions directory.
Properties
Inputs
Property | Description | Data Type |
---|---|---|
Directory | The full path to the directory. | String |
Outputs
Property | Description | Data Type |
---|---|---|
Output | The contents of the files loaded as a FileData type. Any file from the directory or subdirectory will be included in the output. | List of FileData |
Example Inputs and Outputs
Input | Output |
---|---|
example.txt | Outputs a fileData object representing the file |
C: | World |
Null Value | EXCEPTION MESSAGE |
Empty String | EXCEPTION MESSAGE |
Path is empty
If the path specified for the Directory input is null or empty, the step will throw the following error. Ensure that the Directory input contains a valid string and is not null.
Exception Message
Exception Stack Trace: DecisionsFramework.Design.Flow.ErrorRunningFlowStep: Error running step Load And Delete File 1[LoadAndDeleteFile] in flow [Testing]: Exception invoking method LoadAndDeleteFile on class FileSteps ---> DecisionsFramework.LoggedException: Exception invoking method LoadAndDeleteFile on class FileSteps ---> System.ArgumentNullException: Path cannot be null. (Parameter 'path')
at System.IO.Strategies.FileStreamHelpers.ValidateArguments(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize)
at System.IO.File.ReadAllBytes(String path)
at DecisionsFramework.Design.Flow.CoreSteps.StandardSteps.FileSteps.LoadFile(String fileName)
at DecisionsFramework.Design.Flow.CoreSteps.StandardSteps.FileSteps.LoadAndDeleteFile(String fileName)
--- End of inner exception stack trace ---
at DecisionsFramework.Design.Flow.StepImplementations.InvokeMethodStep.Run(StepStartData data)
at DecisionsFramework.Design.Flow.FlowStep.RunStepInternal(String flowTrackingID, String stepTrackingID, KeyValuePairDataStructure[] stepRunDataValues, AbstractFlowTrackingData trackingData)
at DecisionsFramework.Design.Flow.FlowStep.Start(String flowTrackingID, String stepTrackingID, FlowStateData data, AbstractFlowTrackingData trackingData, RunningStepData currentStepData)
--- End of inner exception stack trace ---
Related Information
Example Labs:
Forum Posts:
Was this article helpful?