Merge pull request #1774 from jmchilton/wf_fixes

[16.01] Workaround for #1739 - fixing up subworkflow input connections.
This commit is contained in:
Daniel Blankenberg
2016-02-23 10:11:04 -05:00
7 changed files with 33 additions and 22 deletions
@@ -303,6 +303,10 @@ define(['mvc/workflow/workflow-globals'], function( Globals ) {
_producesAcceptableDatatype: function( other ) {
// other is a non-collection output...
for ( var t in this.datatypes ) {
var thisDatatype = this.datatypes[t];
if( thisDatatype == "input" ) {
return true;
}
var cat_outputs = new Array();
cat_outputs = cat_outputs.concat(other.datatypes);
if (other.node.post_job_actions){
@@ -316,7 +320,7 @@ define(['mvc/workflow/workflow-globals'], function( Globals ) {
// FIXME: No idea what to do about case when datatype is 'input'
for ( var other_datatype_i in cat_outputs ) {
var other_datatype = cat_outputs[other_datatype_i];
if ( other_datatype == "input" || other_datatype == "input_collection" || Globals.app.isSubType( cat_outputs[other_datatype_i], this.datatypes[t] ) ) {
if ( other_datatype == "input" || other_datatype == "input_collection" || Globals.app.isSubType( cat_outputs[other_datatype_i], thisDatatype ) ) {
return true;
}
}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -170,6 +170,13 @@ define([
ok( this.test_accept( other ) );
} );
test( "input type can accept any datatype", function() {
this.input.extensions = [ "input" ];
this.input_terminal.update( this.input );
var other = { node: {}, datatypes: [ "binary" ] };
ok( this.test_accept( other ) );
} );
test( "cannot accept when already connected", function() {
var self = this;
// If other is subtype but already connected, cannot accept