public static ContentService.FileAtts createFileAtts(Record record, int length) { ContentService.FileAtts fileAtts = new ContentService.FileAtts(); fileAtts.CreatedDate = DateTime.Now; fileAtts.FileName = Utils.replaceFileExtension(record.fileName, ".pdf"); fileAtts.FileSize = length; fileAtts.ModifiedDate = DateTime.Now; return fileAtts; }
public void setRecord(Record record) { this.record = record; }
public JobDocument[] processTicket(XmlTicket t, Record r, string workFlowName) { try { XmlResult xmlResult = clientObject.ProcessTicket(this.location, workFlowName, t); if (xmlResult.IsFailed) { log.Error("Recognition failed for object: '{0}', version: '{1}', work type id: '{1}'.", new object[] { r.objectId, r.versionNum, r.workTypeId }); return null; } else { log.Info("Recognition succeed for object: '{0}', version: '{1}', work type id: '{1}'.", new object[] { r.objectId, r.versionNum, r.workTypeId }); return xmlResult.JobDocuments; } } catch (Exception e) { log.Error(e, "Exception in method 'processTicket' while trying to recognize object: '{0}', version: '{1}', using work type with id: '{1}'.", new object[] { r.objectId, r.versionNum, r.workTypeId }); return null; } }