Export Archive actions should share code where possible
There should be a class with common gui-free export functionality that resides in core (or the like), that files like ExportArchiveAction and ExportRunsToKAR (in provenance suite) can both utilize. Right now we have duplicate code so reporting and workflow-run-manager can have a gui-free version of export with ExportRunsToKAR.
#1 Updated by Aaron Aaron over 10 years ago
Because the WorkflowRun KAR is generated without using the ExportArchiveAction functionality from the gui, it is impossible to rename a workflow without first saving it as a Workflow KAR.
For example: Start a new workflow, run it, right click on the run, save to archive. The workflow saved in the archive is "Unnamed#" and there is no way for the user to rename the workflow before it is saved.
The fix for this is to extend the ExportArchiveAction class from WorkflowRunManager. However, the ExportArchiveAction may need some changes in order to accommodate the special needs of saving the WorkflowRun KAR, such as ignoring semantic type querying and retrieving the new name entered by the user before actually saving the KAR (so the provenance store and WorkflowRuns can be updated with that name before saving).
This is all good functionality to have in the common interface and may prove useful to others who want to use it in similar fashion. It is worth doing and will prevent further code duplication and divergence.