Version: Windchill 12.1
Use Case: For exporting packages/deliveries we want the filenaming to be consistent: number_iteration_name_lifecyclestatus This is currently achieved by using the afterEDRloader script, and works on all published files, that are renamed and set as an attachment. We would like to do the same with the files where there is not generated a representation (currently CSV and ZIP). Suggestions to do this would be appreciated.
Description:
For exporting packages/deliveries we want the filenaming to be consistent: number_iteration_name_lifecyclestatus
This is currently achieved by using the afterEDRloader script, and works on all published files, that are renamed and set as an attachment.
We would like to do the same with the files where there is not generated a representation (currently CSV and ZIP).
Suggestions to do this would be appreciated.
One suggestion that I would like to validate the idea of before starting on an implementation:
Could we utilize the Custom Publishing filtering method to call a function that will copy the primary file to an attachment (similar to the afterEDRloader scripts)?
Hi @JM_12529808
A custom publishing is not the right way how to achieve what you need.
The custom publishing sends the publish request to the queue based on your own logic.
This action can be somehow activated from a workflow, listener and so on.
In my opinion the best way could be some short workflow after the document is ready to copy the content. For example set state.
But it depends on your needs. It can be a post check-in listener where you just create a copy of the content and save it as a attachment.
It can be done by own process queue where you could control the behavior.
Also I would apply some logic that only needed objects are processed
In the end any option is possible.
PetrH
Hi PetrH
Thanks for pointing in this direction. After having read up a bit on workflows, I agree that this seems to be the right way. I will take a look into it, and see if I can figure out to set it up correctly.
@JM_12529808 , to be clear, you need the files in the zip file to be renamed using the object that the file was derived from’s number, iteration, name and lifecycle state.
This is very doable.
Do you want this to happen to ALL packages or is there a criteria that filters which packages would have their zip file contents renamed.
Send me private message if you want assistance.
David
Hi David
Thanks for taking the time to respond.
I dont want to rename the files in the ZIP file, I'll try to make it more clear:
I want to make a copy of CSV and ZIP files set them as attachement, with the name defined by: number_iteration_name_lifecyclestatus
As PertH have pointed out, workflows might be the correct solution.
I think I’d use a listener rather than a workflow but at the end of the day you just need to trigger code to run to create the attachments with the desired filenames.
You could also create a custom action to trigger the code that creates the attachments.
Lots of options. The way to proceed really depends on how your company works.
David
Hi @JM_12529808,
I wanted to see if you got the help you needed.
If so, please mark the appropriate reply as the Accepted Solution or please feel free to detail in a reply what has helped you and mark it as the Accepted Solution. It will help other members who may have the same question.
Of course, if you have more to share on your issue, please pursue the conversation.
Thanks,