Workaround for #1739 - fixing up subworkflow inut connections.

Do the same relaxed thing we do for inputs of type 'input' as we do for outputs of this type. Someday we should have better tracking, but such a change is probably not wise for a release branch.
This commit is contained in:
John Chilton
2016-02-22 21:46:03 +00:00
parent b5e91d2377
commit dbab6f5b97
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