예제 #1
0
        private async Task UpdateRedactionCountFieldValueAsync(Guid countFieldGuid)
        {
            var countFieldName = await GetCountFieldNameAsync(countFieldGuid);

            var countFieldValue = await GetCountFieldValueAsync(countFieldGuid);

            RaiseMessage($"Retrieving current {countFieldName}");

            //retrieve imported redaction count field on import job
            var currentRedactionCount = await ArtifactQueries.RetrieveImportJobRedactionCountFieldValueAsync(
                AgentHelper.GetServicesManager(),
                _executionIdentity,
                WorkspaceArtifactId,
                _importJobArtifactId,
                countFieldGuid);

            RaiseMessage($"Current {countFieldName} = {currentRedactionCount}");
            var newRedactionCount = currentRedactionCount + countFieldValue;

            RaiseMessage($"New {countFieldName} = {newRedactionCount}");
            RaiseMessage($"Updating current {countFieldName}");

            //update imported redaction count field on import job
            await ArtifactQueries.UpdateImportJobRedactionCountFieldValueAsync(
                AgentHelper.GetServicesManager(),
                _executionIdentity,
                WorkspaceArtifactId,
                _importJobArtifactId,
                countFieldGuid,
                newRedactionCount);

            RaiseMessage($"Updated {countFieldName}");
        }