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

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

AfterEDRloader

mhallenborg
2-Explorer

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?

ACCEPTED SOLUTION

Accepted Solutions

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

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;

  }

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

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

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

Announcements


Top Tags