CareGenieExportBCS Workflow
It lists the files of a directory created within a given time window and loads them into our container in the cloud. The configuration is done through a Workflow Scheduler. Please see Configuring Workflow Scheduler for more information.
Workflow description
The workflow is activated when the scheduled condition is satisfied.
Validation of the template parameters defined in the SAF manager is performed. In case of errors in the configuration, the execution is interrupted and the inconsistency is logged. Possible errors are:
Path parameter is null or empty. Provide a directory path
The parameter of the workflow called Path has an invalid value. A valid directory path should be provided.Invalid time window. PastDays value must be greater than or equal to one
The parameter of the workflow called PastDays has an invalid value. An integer major or equal zero should be provided.AzureConfigPath is invalid or points to a non-existing file
The parameter of the workflow called AzureConfigPath has an invalid value. The path to a json file with at least the properties "AzureBlobToken" and "AzureRessourceName" must be provided.Company is null or empty
A valid company name must be provided. On the other hand, each token (AzureBlobToken) is associated with a company name. Errors in the company name will result in no successful upload attempt.Container is null or empty
The parameter of the workflow calls PastDays has an invalid value. The valid name of a container must be provided.
Calculates the lower limit of the reference time window. The lower limit is equal to the date and time when the workflow is executed minus the number of days specified in the PastDays parameter.
List the files in the folder defined in the Path parameter and select those whose creation date is greater than or equal to the lower limit calculated in the previous step.
Read the parameters of the AzureConfigPath file.
For each of the files listed in step four, a URL is constructed.
The files are uploaded one by one using the URL resolved in the previous step. The service invocation is performed in such a way that, in case of problems, it performs two additional invocation attempts, each attempt separated by half a second and a maximum response timeout of six seconds. Errors will not cause an exception to be thrown but will continue with the attempt to load the other files. The reason for any possible inconvenience is recorded in the logs.If the status code after the invocation is different from 201, the header and message of the service response are recorded in the logs.
In case the status code is equal to 201 the execution ends successfully.