Hello @N.Barnes
Definitely you need a configuration and customization knowledge.
It is not so hard to explain buy you need someone who can apply a code to the workflow and also who knows a risk of the code.
For example if you use a code downloaded from PTC it is save to use, but if you do not understand the code, it is hard to recognize if there is everything alright š
An example how to download a file to a network/server disk is shown in a AfterEDRloader
CS216668 - An example Afterloader hook method
a section Optionally download a copy of the EPM Document's attachments
this is just snip of code for the downloading from the AfterEDRloader class provided by PTC.
If you get primary file then you can do it same way - get Primary - get primary ApplicationData save it to the drive on the server...
String directory = "";
if (downloadToLocal)
{
// get epmDoc info
// String container = WTContainerHelper.getContainer(epmDoc).getName();
// String authapp = epmDoc.getAuthoringApplication().toString();
// String epmdocType = epmDoc.getDocType().toString();
String localDir = getDownloadToLocalDir();
if (localDir.equals(""))
{
downloadToLocal = false;
} else
{
SimpleDateFormat fm = new SimpleDateFormat("yyyy-MM");
// File dir = new File(localDir + File.separator + "Design_deliverables" + File.separator + container + File.separator + authapp + File.separator + epmdocType + "_" + fm.format(Calendar.getInstance().getTime()));
File dir = new File(localDir + File.separator + fm.format(Calendar.getInstance().getTime()));
if (dir == null || !dir.exists())
{
dir.mkdirs();
}
directory = dir.getAbsolutePath();
}
}
public static String downloadContent(EPMDocument epmDoc, ApplicationData appData, String dir, String fromFileName, String toFileName)
{
String ret = "";
try
{
// Download ApplicationData
File contentFile = FileHelper.getFileContent(epmDoc, appData, dir, null);
if (!fromFileName.equalsIgnoreCase(toFileName))
{
FileUtil.moveFile(dir, fromFileName, toFileName);
}
ret = contentFile.toString();
System.out.println("downloadContent..." + ret);
} catch (Exception e)
{
e.printStackTrace();
}
return ret;
}
the code could be used in own class and then call it from workflow or
the code can be modified for the direct workflow expression robot and use it directly in the WF. WF expression has limit to 4k characters so you can not write long code in the wf expression .
PetrH