Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MODEXPS-273] Improve logging for job launching process #610

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
0587dd9
[MODEXPS-273] Improve logging for job launching process
Saba-Zedginidze-EPAM Dec 24, 2024
563994c
[MODEXPS-273] Improve validation logic for acq export configs
Saba-Zedginidze-EPAM Dec 24, 2024
965be52
[MODEXPS-273] Fix failing test
Saba-Zedginidze-EPAM Dec 24, 2024
538c074
[MODEXPS-273] Fix failing test
Saba-Zedginidze-EPAM Dec 24, 2024
30f0fe9
Merge remote-tracking branch 'origin/MODEXPS-273' into MODEXPS-273
Saba-Zedginidze-EPAM Dec 24, 2024
79dcdbe
[MODEXPS-273] Remove unused imports and fix ftp validation
Saba-Zedginidze-EPAM Dec 24, 2024
caace7b
[MODEXPS-273] Improve validation
Saba-Zedginidze-EPAM Dec 24, 2024
8d8611e
[MODEXPS-273] Add job name param for claims export too
Saba-Zedginidze-EPAM Dec 24, 2024
04c1790
[MODEXPS-273] Fetch pieces with Claim Sent status instead of Late
Saba-Zedginidze-EPAM Dec 25, 2024
5bd434f
[MODEXPS-273] Fix failing test
Saba-Zedginidze-EPAM Dec 25, 2024
9093da5
[MODEXPS-273] Skip FTP/Download step conditionally
Saba-Zedginidze-EPAM Dec 25, 2024
195f41a
[MODEXPS-273] Decouple ftp and file download steps
Saba-Zedginidze-EPAM Dec 25, 2024
63c4919
[MODEXPS-273] Fix failing tests
Saba-Zedginidze-EPAM Dec 25, 2024
d4f64d2
[MODEXPS-273] Fix failing test
Saba-Zedginidze-EPAM Dec 25, 2024
c5eb9fe
[MODEXPS-273] Fix failing test
Saba-Zedginidze-EPAM Dec 25, 2024
75a6e66
[MODEXPS-273] Fix step conditional logic
Saba-Zedginidze-EPAM Dec 25, 2024
6fa8951
[MODEXPS-273] Fix sonar issues
Saba-Zedginidze-EPAM Dec 25, 2024
06df10d
[MODEXPS-273] Remove export history step for claims
Saba-Zedginidze-EPAM Dec 26, 2024
24ca809
[MODEXPS-273] Improve exception message when configuration is not found
Saba-Zedginidze-EPAM Dec 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import lombok.extern.log4j.Log4j2;
import org.folio.dew.domain.dto.ExportType;
import org.springframework.batch.core.Job;
import org.springframework.batch.core.JobExecutionListener;
import org.springframework.batch.core.Step;
import org.springframework.batch.core.job.builder.JobBuilder;
import org.springframework.batch.core.launch.support.RunIdIncrementer;
Expand All @@ -21,18 +22,16 @@ public class EdifactExportJobConfig {
public static final String POL_MEM_KEY = "poLineIds";

private Job constructEdifactExportJob(JobBuilder jobBuilder,
EdiExportJobCompletionListener ediExportJobCompletionListener,
Step mapToEdifactOrdersStep,
Step saveToFTPStep,
Step saveToMinIOStep,
Step createExportHistoryRecordsStep) {
return jobBuilder.incrementer(new RunIdIncrementer())
.listener(ediExportJobCompletionListener)
.start(mapToEdifactOrdersStep)
.next(saveToMinIOStep)
.next(saveToFTPStep)
.next(createExportHistoryRecordsStep)
.build();
JobExecutionListener listener,
Step... steps) {
var builder = jobBuilder
.incrementer(new RunIdIncrementer())
.listener(listener)
.start(steps[0]);
for (int i = 1; i < steps.length; i++) {
builder = builder.next(steps[i]);
Copy link
Contributor

@SerhiiNosko SerhiiNosko Dec 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a bit harder to understand the sequence now, need to find where steps are declared in this case, but can leave if you prefer to leave

}
return builder.build();
}

@Bean
Expand All @@ -44,9 +43,9 @@ public Job edifactOrdersExportJob(EdiExportJobCompletionListener ediExportJobCom

@Bean
public Job edifactClaimsExportJob(EdiExportJobCompletionListener ediExportJobCompletionListener, JobRepository jobRepository,
Step mapToEdifactClaimsStep, Step saveToFTPStep, Step saveToMinIOStep, Step createExportHistoryRecordsStep) {
Step mapToEdifactClaimsStep, Step saveToFTPStep, Step saveToMinIOStep) {
return constructEdifactExportJob(new JobBuilder(ExportType.CLAIMS.getValue(), jobRepository),
ediExportJobCompletionListener, mapToEdifactClaimsStep, saveToFTPStep, saveToMinIOStep, createExportHistoryRecordsStep);
ediExportJobCompletionListener, mapToEdifactClaimsStep, saveToFTPStep, saveToMinIOStep);
}

@Bean
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
package org.folio.dew.batch.acquisitions.edifact.jobs;

import static org.folio.dew.batch.acquisitions.edifact.utils.ExportConfigFields.CLAIM_PIECE_IDS;
import static org.folio.dew.batch.acquisitions.edifact.utils.ExportConfigFields.LIB_EDI_TYPE;
import static org.folio.dew.batch.acquisitions.edifact.utils.ExportConfigFields.VENDOR_EDI_TYPE;
import static org.folio.dew.batch.acquisitions.edifact.utils.ExportUtils.validateField;
import static org.folio.dew.domain.dto.VendorEdiOrdersExportConfig.FileFormatEnum.EDI;
import static org.folio.dew.utils.QueryUtils.convertIdsToCqlQuery;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Objects;

import org.apache.commons.collections4.CollectionUtils;
import org.folio.dew.batch.acquisitions.edifact.mapper.ExportResourceMapper;
import org.folio.dew.batch.acquisitions.edifact.services.OrdersService;
import org.folio.dew.batch.acquisitions.edifact.services.OrganizationsService;
import org.folio.dew.domain.dto.Piece;
import org.folio.dew.domain.dto.VendorEdiOrdersExportConfig;
import org.folio.dew.domain.dto.acquisitions.edifact.ExportHolder;
Expand All @@ -22,13 +30,12 @@
@StepScope
public class MapToEdifactClaimsTasklet extends MapToEdifactTasklet {

public static final String CLAIM_PIECE_IDS = "claimPieceIds";
private final ExportResourceMapper edifactMapper;
private final ExportResourceMapper csvMapper;

public MapToEdifactClaimsTasklet(ObjectMapper ediObjectMapper, OrdersService ordersService,
public MapToEdifactClaimsTasklet(ObjectMapper ediObjectMapper, OrganizationsService organizationsService, OrdersService ordersService,
ExportResourceMapper edifactMapper, ExportResourceMapper csvMapper) {
super(ediObjectMapper, ordersService);
super(ediObjectMapper, organizationsService, ordersService);
this.edifactMapper = edifactMapper;
this.csvMapper = csvMapper;
}
Expand All @@ -43,14 +50,20 @@ protected ExportResourceMapper getExportResourceMapper(VendorEdiOrdersExportConf

@Override
protected List<String> getExportConfigMissingFields(VendorEdiOrdersExportConfig ediOrdersExportConfig) {
return CollectionUtils.isEmpty(ediOrdersExportConfig.getClaimPieceIds())
? List.of(CLAIM_PIECE_IDS)
: List.of();
List<String> missingFields = new ArrayList<>();
validateField(CLAIM_PIECE_IDS.getName(), ediOrdersExportConfig.getClaimPieceIds(), CollectionUtils::isNotEmpty, missingFields);

if (ediOrdersExportConfig.getFileFormat() == EDI) {
var ediConfig = ediOrdersExportConfig.getEdiConfig();
validateField(LIB_EDI_TYPE.getName(), ediConfig.getLibEdiType(), Objects::nonNull, missingFields);
validateField(VENDOR_EDI_TYPE.getName(), ediConfig.getVendorEdiType(), Objects::nonNull, missingFields);
}
return missingFields;
}

@Override
protected ExportHolder buildEdifactExportHolder(ChunkContext chunkContext, VendorEdiOrdersExportConfig ediExportConfig, Map<String, Object> jobParameters) {
var pieces = ordersService.getPiecesByIdsAndReceivingStatus(ediExportConfig.getClaimPieceIds(), Piece.ReceivingStatusEnum.LATE);
var pieces = ordersService.getPiecesByIdsAndReceivingStatus(ediExportConfig.getClaimPieceIds(), Piece.ReceivingStatusEnum.CLAIM_SENT);
if (pieces.isEmpty()) {
throw new NotFoundException(Piece.class);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
package org.folio.dew.batch.acquisitions.edifact.jobs;

import static org.folio.dew.batch.acquisitions.edifact.utils.ExportConfigFields.LIB_EDI_CODE;
import static org.folio.dew.batch.acquisitions.edifact.utils.ExportConfigFields.LIB_EDI_TYPE;
import static org.folio.dew.batch.acquisitions.edifact.utils.ExportConfigFields.VENDOR_EDI_CODE;
import static org.folio.dew.batch.acquisitions.edifact.utils.ExportConfigFields.VENDOR_EDI_TYPE;
import static org.folio.dew.batch.acquisitions.edifact.utils.ExportUtils.validateField;
import static org.folio.dew.utils.QueryUtils.combineCqlExpressions;
import static org.folio.dew.utils.QueryUtils.convertFieldListToEnclosedCqlQuery;
import static org.folio.dew.utils.QueryUtils.getCqlExpressionForFieldNullValue;
import static org.folio.dew.utils.QueryUtils.negateQuery;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Map;
Expand All @@ -13,8 +19,10 @@
import java.util.stream.Collectors;

import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.folio.dew.batch.acquisitions.edifact.mapper.ExportResourceMapper;
import org.folio.dew.batch.acquisitions.edifact.services.OrdersService;
import org.folio.dew.batch.acquisitions.edifact.services.OrganizationsService;
import org.folio.dew.client.DataExportSpringClient;
import org.folio.dew.domain.dto.ExportConfigCollection;
import org.folio.dew.domain.dto.ExportType;
Expand All @@ -36,17 +44,23 @@ public class MapToEdifactOrdersTasklet extends MapToEdifactTasklet {
private final DataExportSpringClient dataExportSpringClient;
private final ExportResourceMapper edifactMapper;

public MapToEdifactOrdersTasklet(ObjectMapper ediObjectMapper, OrdersService ordersService,
public MapToEdifactOrdersTasklet(ObjectMapper ediObjectMapper, OrganizationsService organizationsService, OrdersService ordersService,
DataExportSpringClient dataExportSpringClient,
ExportResourceMapper edifactMapper) {
super(ediObjectMapper, ordersService);
super(ediObjectMapper, organizationsService, ordersService);
this.edifactMapper = edifactMapper;
this.dataExportSpringClient = dataExportSpringClient;
}

@Override
protected List<String> getExportConfigMissingFields(VendorEdiOrdersExportConfig ediOrdersExportConfig) {
return List.of();
List<String> missingFields = new ArrayList<>();
var ediConfig = ediOrdersExportConfig.getEdiConfig();
validateField(LIB_EDI_TYPE.getName(), ediConfig.getLibEdiType(), Objects::nonNull, missingFields);
validateField(LIB_EDI_CODE.getName(), ediConfig.getLibEdiCode(), StringUtils::isNotBlank, missingFields);
validateField(VENDOR_EDI_TYPE.getName(), ediConfig.getVendorEdiType(), Objects::nonNull, missingFields);
validateField(VENDOR_EDI_CODE.getName(), ediConfig.getVendorEdiCode(), StringUtils::isNotBlank, missingFields);
return missingFields;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,29 @@
import static java.util.Objects.requireNonNullElse;
import static java.util.stream.Collectors.groupingBy;
import static org.folio.dew.batch.acquisitions.edifact.jobs.EdifactExportJobConfig.POL_MEM_KEY;
import static org.folio.dew.batch.acquisitions.edifact.utils.ExportConfigFields.FILE_FORMAT;
import static org.folio.dew.batch.acquisitions.edifact.utils.ExportConfigFields.FTP_PORT;
import static org.folio.dew.batch.acquisitions.edifact.utils.ExportConfigFields.INTEGRATION_TYPE;
import static org.folio.dew.batch.acquisitions.edifact.utils.ExportConfigFields.SERVER_ADDRESS;
import static org.folio.dew.batch.acquisitions.edifact.utils.ExportConfigFields.TRANSMISSION_METHOD;
import static org.folio.dew.batch.acquisitions.edifact.utils.ExportUtils.generateFileName;
import static org.folio.dew.batch.acquisitions.edifact.utils.ExportUtils.validateField;
import static org.folio.dew.domain.dto.JobParameterNames.ACQ_EXPORT_FILE;
import static org.folio.dew.domain.dto.JobParameterNames.EDIFACT_FILE_NAME;
import static org.folio.dew.domain.dto.JobParameterNames.EDIFACT_ORDERS_EXPORT;
import static org.folio.dew.domain.dto.VendorEdiOrdersExportConfig.TransmissionMethodEnum.FTP;

import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Objects;

import org.apache.commons.lang3.StringUtils;
import org.folio.dew.batch.ExecutionContextUtils;
import org.folio.dew.batch.acquisitions.edifact.exceptions.CompositeOrderMappingException;
import org.folio.dew.batch.acquisitions.edifact.exceptions.EdifactException;
import org.folio.dew.batch.acquisitions.edifact.mapper.ExportResourceMapper;
import org.folio.dew.batch.acquisitions.edifact.services.OrdersService;
import org.folio.dew.batch.acquisitions.edifact.services.OrganizationsService;
import org.folio.dew.domain.dto.CompositePoLine;
import org.folio.dew.domain.dto.CompositePurchaseOrder;
import org.folio.dew.domain.dto.JobParameterNames;
Expand All @@ -40,13 +51,14 @@
public abstract class MapToEdifactTasklet implements Tasklet {

private final ObjectMapper ediObjectMapper;
private final OrganizationsService organizationsService;
protected final OrdersService ordersService;

@Override
public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws Exception {
log.info("execute:: Executing MapToEdifactTasklet with job: {}", chunkContext.getStepContext().getJobName());
var jobParameters = chunkContext.getStepContext().getJobParameters();
var ediExportConfig = ediObjectMapper.readValue((String)jobParameters.get(EDIFACT_ORDERS_EXPORT), VendorEdiOrdersExportConfig.class);
var ediExportConfig = ediObjectMapper.readValue((String) jobParameters.get(EDIFACT_ORDERS_EXPORT), VendorEdiOrdersExportConfig.class);
validateEdiExportConfig(ediExportConfig);

var holder = buildEdifactExportHolder(chunkContext, ediExportConfig, jobParameters);
Expand All @@ -55,31 +67,31 @@ public RepeatStatus execute(StepContribution contribution, ChunkContext chunkCon
String jobName = jobParameters.get(JobParameterNames.JOB_NAME).toString();
var edifactStringResult = getExportResourceMapper(ediExportConfig).convertForExport(holder.orders(), holder.pieces(), ediExportConfig, jobName);

// save edifact file content in memory
ExecutionContextUtils.addToJobExecutionContext(chunkContext.getStepContext().getStepExecution(), "edifactOrderAsString", edifactStringResult, "");
// save edifact file content and name in memory
var stepExecution = chunkContext.getStepContext().getStepExecution();
ExecutionContextUtils.addToJobExecutionContext(stepExecution, ACQ_EXPORT_FILE, edifactStringResult, "");
ExecutionContextUtils.addToJobExecutionContext(stepExecution, EDIFACT_FILE_NAME, getFileName(ediExportConfig), "");
return RepeatStatus.FINISHED;
}

private void validateEdiExportConfig(VendorEdiOrdersExportConfig ediExportConfig) {
var ediConfig = ediExportConfig.getEdiConfig();
Optional<Integer> port = Optional.ofNullable(ediExportConfig.getEdiFtp().getFtpPort());

if (StringUtils.isEmpty(ediConfig.getLibEdiCode()) || ediConfig.getLibEdiType() == null
|| StringUtils.isEmpty(ediConfig.getVendorEdiCode()) || ediConfig.getVendorEdiType() == null) {
throw new EdifactException("Export configuration is incomplete, missing library EDI code/Vendor EDI code");
}

if (port.isEmpty()) {
throw new EdifactException("Export configuration is incomplete, missing FTP/SFTP Port");
var missingFields = getExportConfigMissingFields(ediExportConfig);
validateField(INTEGRATION_TYPE.getName(), ediExportConfig.getIntegrationType(), Objects::nonNull, missingFields);
validateField(TRANSMISSION_METHOD.getName(), ediExportConfig.getTransmissionMethod(), Objects::nonNull, missingFields);
validateField(FILE_FORMAT.getName(), ediExportConfig.getFileFormat(), Objects::nonNull, missingFields);

if (ediExportConfig.getTransmissionMethod() == FTP) {
var ftpConfig = ediExportConfig.getEdiFtp();
validateField(FTP_PORT.getName(), ftpConfig.getFtpPort(), Objects::nonNull, missingFields);
validateField(SERVER_ADDRESS.getName(), ftpConfig.getServerAddress(), StringUtils::isNotEmpty, missingFields);
}

var missingFields = getExportConfigMissingFields(ediExportConfig);
if (!missingFields.isEmpty()) {
throw new EdifactException("Export configuration is incomplete, missing required fields: %s".formatted(missingFields));
}
}

protected List<CompositePurchaseOrder> getCompositeOrders(String poLineQuery) {
protected List<CompositePurchaseOrder> getCompositeOrders(String poLineQuery) {
var poLines = ordersService.getPoLinesByQuery(poLineQuery);
var orderIds = poLines.stream()
.map(PoLine::getPurchaseOrderId)
Expand All @@ -99,7 +111,7 @@ protected void persistPoLineIds(ChunkContext chunkContext, List<CompositePurchas
.flatMap(ord -> ord.getCompositePoLines().stream())
.map(CompositePoLine::getId)
.toList();
ExecutionContextUtils.addToJobExecutionContext(chunkContext.getStepContext().getStepExecution(), POL_MEM_KEY, ediObjectMapper.writeValueAsString(poLineIds),"");
ExecutionContextUtils.addToJobExecutionContext(chunkContext.getStepContext().getStepExecution(), POL_MEM_KEY, ediObjectMapper.writeValueAsString(poLineIds), "");
}

private List<CompositePurchaseOrder> assembleCompositeOrders(List<PurchaseOrder> orders, List<PoLine> poLines) {
Expand All @@ -113,6 +125,13 @@ private List<CompositePurchaseOrder> assembleCompositeOrders(List<PurchaseOrder>
.toList();
}

private String getFileName(VendorEdiOrdersExportConfig ediExportConfig) {
var vendorName = organizationsService.getOrganizationById(ediExportConfig.getVendorId().toString()).get("code").asText();
var configName = ediExportConfig.getConfigName();
var fileFormat = ediExportConfig.getFileFormat();
return generateFileName(vendorName, configName, fileFormat);
}

private <T> T convertTo(Object value, Class<T> c) {
try {
return ediObjectMapper.readValue(ediObjectMapper.writeValueAsString(value), c);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
package org.folio.dew.batch.acquisitions.edifact.jobs;

import static org.folio.dew.domain.dto.JobParameterNames.ACQ_EXPORT_FILE;
import static org.folio.dew.domain.dto.JobParameterNames.EDIFACT_FILE_NAME;
import static org.folio.dew.domain.dto.JobParameterNames.EDIFACT_ORDERS_EXPORT;
import static org.folio.dew.domain.dto.JobParameterNames.UPLOADED_FILE_PATH;
import static org.folio.dew.domain.dto.VendorEdiOrdersExportConfig.IntegrationTypeEnum.ORDERING;
import static org.folio.dew.domain.dto.VendorEdiOrdersExportConfig.TransmissionMethodEnum.FTP;

import java.nio.charset.StandardCharsets;

import org.apache.commons.io.FilenameUtils;
import org.apache.commons.lang3.StringUtils;
import org.folio.dew.batch.ExecutionContextUtils;
import org.folio.dew.batch.acquisitions.edifact.services.FTPStorageService;
import org.folio.dew.domain.dto.VendorEdiOrdersExportConfig;
import org.folio.dew.repository.RemoteFilesStorage;
import org.springframework.batch.core.StepContribution;
import org.springframework.batch.core.configuration.annotation.StepScope;
import org.springframework.batch.core.scope.context.ChunkContext;
import org.springframework.batch.core.step.tasklet.Tasklet;
import org.springframework.batch.repeat.RepeatStatus;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import com.fasterxml.jackson.databind.ObjectMapper;
Expand All @@ -28,30 +30,32 @@
@StepScope
@Log4j2
public class SaveToFileStorageTasklet implements Tasklet {
private final ObjectMapper ediObjectMapper;
private final FTPStorageService ftpStorageService;

private final RemoteFilesStorage remoteFilesStorage;

private static final String SFTP_PROTOCOL = "sftp://";
@Value("#{jobParameters['edifactFileName']}")
private String edifactFileName;

private final ObjectMapper ediObjectMapper;
private final FTPStorageService ftpStorageService;

@Override
@SneakyThrows
public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) {
var stepExecution = chunkContext.getStepContext().getStepExecution();
var jobParameters = chunkContext.getStepContext().getJobParameters();
var ediExportConfig = ediObjectMapper.readValue((String)jobParameters.get(EDIFACT_ORDERS_EXPORT), VendorEdiOrdersExportConfig.class);
var uploadedFilePath = (String) ExecutionContextUtils.getExecutionVariable(stepExecution, UPLOADED_FILE_PATH);
var ediExportConfig = ediObjectMapper.readValue((String) jobParameters.get(EDIFACT_ORDERS_EXPORT), VendorEdiOrdersExportConfig.class);
if (ediExportConfig.getIntegrationType() != ORDERING && ediExportConfig.getTransmissionMethod() != FTP) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bit hard to read with inverse conditions. Also having integration type here will lead us to modify source code of tasklet during adding new integration type. If we could not do such inverse configuration on some higher config level - we can leave as it.

log.info("execute:: Transmission method is not FTP, skipping the step");
return RepeatStatus.FINISHED;
}

String host = ediExportConfig.getEdiFtp().getServerAddress().replace(SFTP_PROTOCOL, "");
// skip ftp upload if address not specified
if (StringUtils.isEmpty(host)) {
return RepeatStatus.FINISHED;
}
byte[] fileContent = remoteFilesStorage.readAllBytes(uploadedFilePath);
ftpStorageService.uploadToFtp(ediExportConfig, fileContent, FilenameUtils.getName(uploadedFilePath));

var stepExecution = chunkContext.getStepContext().getStepExecution();
var fileName = (String) ExecutionContextUtils.getExecutionVariable(stepExecution, EDIFACT_FILE_NAME);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we rename to ACQ_EXPORT_FILE_NAME? In this case we will have the same convention as for ACQ_EXPORT_FILE

var edifactOrderAsString = (String) ExecutionContextUtils.getExecutionVariable(stepExecution, ACQ_EXPORT_FILE);
ftpStorageService.uploadToFtp(ediExportConfig, edifactOrderAsString.getBytes(StandardCharsets.UTF_8), fileName);

return RepeatStatus.FINISHED;
}
Expand Down
Loading