Process a file (COM)
Method |
Process |
Description |
This method processes a file through a workflow based on the specified user agent. |
Function p rototype
HRESULT
Process
(
[in] VARIANT ContentsToBeProcessed,
[in] VARIANT ContentsType,
[in] VARIANT UserAgent,
[in] VARIANT InArgsArray,
[out] VARIANT *OutDetail,
[out, retval] VARIANT *OutArgsArray
)
Arguments
Argument |
Description |
Data Type |
ContentsToBeProcessed |
Full path to the file to be processed |
string |
ContentsType |
0: holds a file path (Currently this is ignored since only 0 is supported) |
UINT32 |
UserAgent |
A string to identify the user. Used for mapping to a specific workflow. |
string |
InArgsArray |
0: Sync Flag - Reserved for future use. 1: Custom Ticket - Currently, only the integer range value is supported. 2: Password for Archives 3: Additional Logging Parameter - This is passed to the user description argument in ScanEx if scanning is enabled on the workflow. Reserved for future use. 4. File Display Path - The full path of the file from the source machine to display to the user after processing. 5. Disable Logging - Disallows Metadefender Core to log any file type analysis and scan results. 6. Caching Option
7. Customized data sanitization location |
Safearray of variants with the following order 0: boolean 1: string 2: string 3: string 4: string 5. boolean 6. uint32 7. string |
OutDetail |
JSON result details string Example JSON { "Ticket": "974989300" } In case of error [e.g. "Server is too busy. Try again later." | "Invalid License" | "Daily scan limit reached" | "Failed to continue. unknown error" | "Invalid file path"] : { "Error": "Invalid License" } In case of too many simultaneous scans: { "Error": " Exceeded maximum thread count" } |
string |
OutArgsArray |
0: Custom Ticket - to be used to associate callback results |
Safearray of variants with the following order 0: string |
Note: When the Metadefender Core server is too busy, the HRESULT value returned will be E_OUTOFMEMORY
Creating workflow profiles
Many configurations are supported via workflow profiles. To access the Workflow tab on the Metadefender Core Management Console, go here: http://localhost:8008/management/workflow.