cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

AfterEDRloader

SOLVED
mhallenborg
Newbie

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?

Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions

Re: AfterEDRloader

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;

  }

View solution in original post

4 REPLIES 4

Re: AfterEDRloader

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;

  }

View solution in original post

Re: AfterEDRloader

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

Re: AfterEDRloader

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

Re: AfterEDRloader

Problem solved when I changed "publish.promote.restrict"  from "ARBORTEXT" to "ARBORTEXT PROE"

Announcements