Bug #5434
closedrun-kar result from headless kepler.sh execution doesn't contain report artifacts
0%
Description
This thread:
http://lists.nceas.ucsb.edu/kepler/pipermail/kepler-users/2011-June/002541.html
prompted me to look into headless usage, esp wrt passing in workflow parameters. It's unclear to me if passing in parameters is supported by ant tasks like ant run-workflow-no-gui-server. So I began focusing on usage like:
./kepler.sh -runwf -nogui -myparam 7 /Users/derik/KeplerData/workflows/MyWorkflows/testwf.kar
If this testwf.kar contains a reportlayout (ROML), the reporting artifacts do not end up in the run-kar (or in provenance associated w/ the run) after execution if you specify parameters on the command line. If you don't pass in parameters, the run-kar contains everything it should.
I tracked this down to the WorkflowManager changeListener not hearing the change events on the model when it's changed for the parameter passed in. This is because the NamedObj this listener gets added to is a different instance than the one used a little bit later for execution. This is because the model can't be found in the ModelDirectory at the execution point, because it's not put in until that moment.
A solution to this bug is to call _openModel with the url to the temporary unzipped workflow.xml file immediately after it's created in KeplerConfigurationApplication(String[] args). Then the same NamedObj is utilized, and the WorkflowManager listener doesn't get lost.
I want to look at this a bit more before checking in the fix, e.g. to see if there's a better spot(s?) at which to put the model into the directory...