Microsoft Azure Blob Storage has a specific utility for transferring files: the AzCopy executable.
This article shows how AzCopy is integrated in Stambia DI.
Note: the azcopy executable is provided by Microsoft and is not distributed with Stambia DI.
Sending a file to Microsoft Azure Blob Storage
Here are the steps to transfer files to Azure using AzCopy.
- Find the Tool in the Palette and add it to your Process
- Drag and drop the Blob Storage metadata on the Tool
- Set the Tool properties:
- Azure Storage Operation: putFile
- Azure Invocation Method: auto (the Runtime will use AzCopy if it finds the Microsoft executable, else it will use the Azure API).
- Local File Path : path to the file that you need to send to Azure, for example d:/temp/customer-data.json
- Remote File Name: leave it empty to use the same file name as the local file, or specify a new file name
After execution, you can check the Variable AZURE_OPERATION_STATUS which should be set to "FILE_CREATED" :
Setting a timeout on the Stambia DI side
AzCopy and Azure have their own internal timeout behaviors. See their Microsoft Documentation for more information.
When Stambia Runtime invokes the AzCopy command, it is possible to specify a Timeout on this invocation.
In the Blob Storage Metadata:
In the parameters of the "TOOL Azure Storage Operation" (this one will overwrite the Metadata) :
Note: the timeout is expected in milliseconds, just like other timeout parameters in Stambia DI.
If the file manipulation (get, put, delete, etc.) lasts longer than this timeout, the invocation will be interrupted and the "TOOL Azure Storage" will produce an error message "AzCopy command execution exceeded timeout".