usnistgov / ucef-meta

WebGME Federate and Experiment Designer
MIT License
3 stars 3 forks source link

Must drag federate references into experiment folder even if there are no experiments defined #6

Closed MartyBurns closed 6 years ago

MartyBurns commented 6 years ago

Version information

Observed behavior

If you don't drag federate references into experiment package, you dont have a working project

Expected behavior

Federates Exporter produces export Deployment Exporter fails silently

Steps to reproduce issue

  1. Create a project based on federation seed
  2. Add a federate and an interaction into IntegrationModel
  3. Omit adding anything into experiments folder
  4. Do Federates Exporter
  5. Do Deployment Exporter
MartyBurns commented 6 years ago

Resolved issue by preventing test of experiment paths length from exiting file generator -- see DeploymentExporter.js lines 570-593. Here is revised:

    // list of experiments.json
    self.fileGenerators.push(function (artifact, callback) {
        var experimentlist = []
        if (self.experimentPaths.length != 0) {
             self.experimentPaths.forEach(function (objPath) {
                 self.experimentModelConfig[objPath].forEach(function (expSet) {
                     if(experimentlist.indexOf(self.core.getAttribute(self.core.getParent(expSet), "name"))==-1){
                        experimentlist.push(self.core.getAttribute(self.core.getParent(expSet), "name"))
                     }

                 })

             })
        }

            artifact.addFile('conf/' + 'experimentlist.json', JSON.stringify(experimentlist, null, 2), function (err) {
            if (err) {
                callback(err);
                return;
            } else {
                callback();
            }
        });     
    })
tpr1 commented 6 years ago

fixed in #8

MartyBurns commented 6 years ago

Fix in #8 causes deployment to fail to run with mvn exec:java. Need to revisit this solution.

MartyBurns commented 6 years ago

Feature_6 now includes modifications to the post #8 updates from Vanderbilt to enable experimentConfig.json to be generated without experiment references being included.

tpr1 commented 6 years ago

fixed in https://github.com/usnistgov/ucef-meta/pull/13