Question

9
Replies
4208
Views
HARISH87 Member since 2012 17 posts
Euroclear
Posted: 4 years ago
Last activity: 3 years 3 months ago
Closed
Solved

Write a file to an explicit path

Hi ,

I am trying to write a .csv file into an explicit path in my server - /m2/app/pega/Extract

I am customising the activity pxConvertResultsToCSV to do so.

In  the java step i am trying to give the explicit filename but it is not writing.But writing to temp direcrtory works fine.

Could you please advice what am i missing here.

char sep = PRFile.separatorChar;

String CSVexportPath= "/m2/app/pega/Extract";

*** commented the existing logiv to write to temp directory ***

//String exportPath= tools.getProperty("pxProcess.pxServiceExportPath").getStringValue();

DateTimeUtils dtu = ThreadContainer.get().getDateTimeUtils();

FileName+=fileNameParam;

if(appendTimeStamp){

  FileName+="_";

  FileName+=dtu.getCurrentTimeStamp();

}

FileName+=".csv";

String strSQLfullPath = CSVexportPath+ sep + FileName;

PRFile f = new PRFile(strSQLfullPath);

Message was edited by: Lochan to add Category

Low-Code App Development System Administration
Moderation Team has archived post
Share this page LinkedIn