Skip to main content
1-Visitor
Oct 18, 2016 10:48 AM UTC
Solved

AfterEDRloader

I have set up the AfterEDRloader according to CS216668.

Everything is working fine. My pdf is shown as an attachment.

But I want to add the lifecycle state in the filename. This should not be that hard to do?

I guess I just need to modify the AfterEDRloader.java file but I dont know how exactly.

Anyone with experience of the AfterEDRloader method?

17-Peridot
Oct 18, 2016 1:12 PM UTC

You can add it e.g. in the method renameAdditionalfiles

if (fileExt.equals("zip"))

  {

  sFileName = sFileName.substring(0, sFileName.lastIndexOf(".")) + "_" + iterationInfo +  "_" + postfix;

  } else {

  sFileName = sFileName.substring(0, sFileName.lastIndexOf(".")) + "_" + iterationInfo + cadDoc.getLifeCycleState().getDisplay(Locale.US) + "." + fileExt;

  }

4 replies

17-Peridot
Oct 18, 2016 1:12 PM UTC

You can add it e.g. in the method renameAdditionalfiles

if (fileExt.equals("zip"))

  {

  sFileName = sFileName.substring(0, sFileName.lastIndexOf(".")) + "_" + iterationInfo +  "_" + postfix;

  } else {

  sFileName = sFileName.substring(0, sFileName.lastIndexOf(".")) + "_" + iterationInfo + cadDoc.getLifeCycleState().getDisplay(Locale.US) + "." + fileExt;

  }

Translate
1-Visitor
Oct 18, 2016 2:17 PM UTC

Thanks!

Yes, thats kind of how I solved the problem, I added:

String StateInfo = ((EPMDocument)ch).getLifeCycleState().toString();

and

String StateInfo = cadDoc.getLifeCycleState().toString();

and then called + StateInfo + for sFileName.

Now my problem is that the "publisher" will not publish the file under attachment when the state is changed. In my case when a drw is released.

even though I have set: publish.republishonepmdocumentchange=true

Translate
17-Peridot
Oct 19, 2016 6:01 AM UTC

The file is not being published as attachment. The step or dxf will be included in the representation itself. You need to set the preference to ALL or the appropreate value to download the secondary files.

Capto_Capture 2016-10-19_08-00-42_AM.png

Translate