Exemplo n.º 1
0
 /// <remarks/>
 public void StartProcessFileAsync(string location, string workflowName, FileContainer file, object userState) {
     if ((this.StartProcessFileOperationCompleted == null)) {
         this.StartProcessFileOperationCompleted = new System.Threading.SendOrPostCallback(this.OnStartProcessFileOperationCompleted);
     }
     this.InvokeAsync("StartProcessFile", new object[] {
                 location,
                 workflowName,
                 file}, this.StartProcessFileOperationCompleted, userState);
 }
Exemplo n.º 2
0
 public string StartProcessFile(string location, string workflowName, FileContainer file) {
     object[] results = this.Invoke("StartProcessFile", new object[] {
                 location,
                 workflowName,
                 file});
     return ((string)(results[0]));
 }
Exemplo n.º 3
0
 /// <remarks/>
 public void StartProcessFileAsync(string location, string workflowName, FileContainer file) {
     this.StartProcessFileAsync(location, workflowName, file, null);
 }
Exemplo n.º 4
0
        //internal bool addVersion(string contextId, byte[] content, int targetObjectId)
        //{
        //    ContentService.ContentServiceClient contentClient = new ContentService.ContentServiceClient();
        //    ContentService.OTAuthentication contentOTAuth = new ContentService.OTAuthentication();
        //    contentOTAuth.AuthenticationToken = getManager().getOTUtils().getAuthToken();
        //    ContentService.FileAtts fileAtts = Utils.createFileAtts(this.record, content.Length);
        //    byte[] recognizedContent = content;
        //    using (Stream stream = new MemoryStream(recognizedContent))
        //    {
        //        try
        //        {
        //            string objectId = contentClient.UploadContent(ref contentOTAuth, contextId, fileAtts, stream);
        //            return true;
        //        }
        //        catch (Exception e)
        //        {
        //            log.Error(e, "Exception in method 'addVersion' while trying to add version for object: {0}", new object[] { targetObjectId });
        //            getManager().getOTUtils().incrementIterationsCounter(record, "Exception in method 'addVersion' while trying to add version: "+e.Message);
        //            return false;
        //        }
        //    }
        //}
        //internal void updateVersionDescription(int objectId)
        //{
        //    DocumentManagement.DocumentManagementClient docManClient = new DocumentManagement.DocumentManagementClient();
        //    DocumentManagement.OTAuthentication docManOTAuth = new DocumentManagement.OTAuthentication();
        //    docManOTAuth.AuthenticationToken = getManager().getOTUtils().getAuthToken();
        //    try
        //    {
        //        DocumentManagement.MetadataLanguage[] langs = docManClient.GetMetadataLanguages(ref docManOTAuth);
        //        string[] langsArray = Utils.getFromMetadataLangArray(langs);
        //        DocumentManagement.Version version = docManClient.GetVersion(ref docManOTAuth, objectId, 0);
        //        String versionName = version.Filename;
        //        if (versionName == Utils.replaceFileExtension(record.fileName, ".pdf"))
        //        {
        //            version.Comment = "Содержимое версии получено из сервиса распознавания ABBYY";
        //        }
        //        docManClient.UpdateVersion(ref docManOTAuth, version);
        //    }
        //    catch (Exception e)
        //    {
        //        log.Error(e, "Exception in method 'updateVersionDescription' while trying to update description for object: {0}", new object[] { objectId });
        //        getManager().getOTUtils().incrementIterationsCounter(record, "Exception in method 'updateVersionDescription' while trying to update description for object: "+e.Message);
        //    }
        //}
        internal List<InputFile[]> getInputFilesFromRecord(byte[] content)
        {
            List<InputFile[]> list = new List<InputFile[]>(1);
            InputFile[] inputFiles = new InputFile[1];

            FileContainer fileContainer = new FileContainer();
            fileContainer.FileContents = content;

            InputFile inputFile = new InputFile();
            inputFile.FileData = fileContainer;

            inputFiles[0] = inputFile;
            list.Add(inputFiles);
            return list;
        }