@@ -654,6 +654,8 @@ public String runWorkflow(String wflowname, List<VariableBinding> vbindings, Map
654654 formdata .add (new BasicNameValuePair ("seed_json" , jsonSeed ));
655655 formdata .add (new BasicNameValuePair ("seed_constraints_json" , jsonSeedConstraints ));
656656 String pageid = "users/" + getUsername () + "/" + domain + "/executions/runWorkflow" ;
657+ System .out .println (pageid );
658+ System .out .println (formdata );
657659 return post (pageid , formdata );
658660 //} catch (Exception e) {
659661 // e.printStackTrace();
@@ -835,7 +837,6 @@ public String addRemoteDataToWings(String url, String name, String dType) throws
835837 try {
836838 HttpGet securedResource = new HttpGet (url );
837839 CloseableHttpResponse httpResponse = client .execute (securedResource );
838-
839840 try {
840841 HttpEntity responseEntity = httpResponse .getEntity ();
841842 ByteArrayOutputStream baos = new ByteArrayOutputStream ();
@@ -856,6 +857,9 @@ public String addRemoteDataToWings(String url, String name, String dType) throws
856857 } catch (IOException e ) {
857858 }
858859 }
860+ if (bytes == null ) {
861+ return null ;
862+ }
859863
860864 System .out .println ("Content downloaded [" + bytes .length + "] " );
861865 String dataid = addDataToWingsAsFile (name , bytes , dType );
@@ -1104,8 +1108,12 @@ private String toPlanAcceptableFormat(String wfname, List<VariableBinding> vbl,
11041108 // Set Parameter Types
11051109 String paramTypes = "" ;
11061110 for (String key : ivm .keySet ()) {
1107- if (ivm .get (key ).isParam ())
1108- paramTypes += "\" " + wfname + key + "\" :\" " + ivm .get (key ).getType () + "\" ," ;
1111+ Variable var = ivm .get (key );
1112+ if (var .isParam ()) {
1113+ List <String > types = var .getType ();
1114+ String type = types != null && types .size () > 0 ? types .get (0 ) : KBConstants .XSD_NS + "string" ;
1115+ paramTypes += "\" " + wfname + key + "\" :\" " + type + "\" ," ;
1116+ }
11091117 }
11101118 if (paramTypes .length () > 0 )
11111119 paramTypes = paramTypes .substring (0 , paramTypes .length () - 1 );
0 commit comments