protected override async Task <Action <AsyncCodeActivityContext> > ExecuteAsync(AsyncCodeActivityContext context, CancellationToken cancellationToken) { // Inputs var excelFilePath = ExcelFilePath.Get(context); var sapProcessName = SAPProcessName.Get(context); var xmlFolderPath = XMLFolderPath.Get(context); var xmlFilePath = string.Empty; XmlDocument doc = null; ExcelToXMLConverter excelToXMLConverter = new ExcelToXMLConverter(); if (!string.IsNullOrEmpty(xmlFolderPath)) { xmlFilePath = excelToXMLConverter.ConvertExcelToXMLFile(excelFilePath, sapProcessName, xmlFolderPath); } else { doc = excelToXMLConverter.ConvertExcelToXMLDocument(excelFilePath, sapProcessName); } // Outputs return((ctx) => { XMLDocument.Set(ctx, doc); XMLPath.Set(ctx, xmlFilePath); }); }
protected override async Task <Action <AsyncCodeActivityContext> > ExecuteAsync(AsyncCodeActivityContext context, CancellationToken cancellationToken) { // Inputs var excelFilePath = ExcelFilePath.Get(context); var sapProcessName = SAPProcessName.Get(context); var xmlFolderPath = XMLFolderPath.Get(context); /////////////////////////// // Add execution logic HERE /////////////////////////// // Outputs return((ctx) => { XMLDocument.Set(ctx, null); XMLPath.Set(ctx, null); }); }