Index: /branches/prototype-v0/zoo-project/zoo-api/js/ZOO-api.js
===================================================================
--- /branches/prototype-v0/zoo-project/zoo-api/js/ZOO-api.js	(revision 882)
+++ /branches/prototype-v0/zoo-project/zoo-api/js/ZOO-api.js	(revision 883)
@@ -3686,6 +3686,24 @@
       }
       return res.length>1?res:res[0];
-    } else
-      return null;
+    }
+    else{
+      var hasPercentCompleted=true;
+      var status = node.*::Status.*::ProcessStarted;
+      var msg = node.*::Status.*::ProcessStarted.*::*[0];
+      if(!status || !msg){
+        status = node.*::Status.*::ProcessAccepted;
+	msg = node.*::Status.*::ProcessAccepted.*::*[0];
+	msg=msg.toString();
+        hasPercentCompleted=false;
+      }else
+	  msg=msg.toString();
+      if(status!=null && node.@statusLocation){
+        var res={"status": node.@statusLocation.toXMLString(), "message": msg};
+	if(hasPercentCompleted)
+	  res["percentCompleted"]=status.@percentCompleted.toXMLString();
+        return res;
+      }else
+	return null;
+    }
   },
   /**
@@ -6143,4 +6161,9 @@
   identifier: null,
   /**
+   * Property: async
+   * {Bool} Define if the process should run asyncrhonously (true) or not (false, default).
+   */
+  async: null,
+  /**
    * Constructor: ZOO.Process
    * Create a new Process
@@ -6154,4 +6177,5 @@
     this.url = url;
     this.identifier = identifier;
+    this.async = (arguments.length>2?arguments[2]:false);
   },
   /**
@@ -6169,5 +6193,5 @@
     if (this.identifier == null)
       return null;
-    var body = new XML('<wps:Execute service="WPS" version="1.0.0" xmlns:wps="'+this.namespaces['wps']+'" xmlns:ows="'+this.namespaces['ows']+'" xmlns:xlink="'+this.namespaces['xlink']+'" xmlns:xsi="'+this.namespaces['xsi']+'" xsi:schemaLocation="'+this.schemaLocation+'"><ows:Identifier>'+this.identifier+'</ows:Identifier>'+this.buildDataInputsNode(inputs)+this.buildDataOutputsNode(outputs)+'</wps:Execute>');
+      var body = new XML('<wps:Execute service="WPS" version="1.0.0" xmlns:wps="'+this.namespaces['wps']+'" xmlns:ows="'+this.namespaces['ows']+'" xmlns:xlink="'+this.namespaces['xlink']+'" xmlns:xsi="'+this.namespaces['xsi']+'" xsi:schemaLocation="'+this.schemaLocation+'"><ows:Identifier>'+this.identifier+'</ows:Identifier>'+this.buildDataInputsNode(inputs)+this.buildDataOutputsNode(outputs)+'</wps:Execute>');
     body = body.toXMLString();
     var headers=['Content-Type: text/xml; charset=UTF-8'];
@@ -6322,5 +6346,5 @@
     }
     var responseDocuments=(outputsArray[0].length>0?
-			   new XML('<wps:ResponseDocument xmlns:wps="'+this.namespaces['wps']+'">'+
+			   new XML('<wps:ResponseDocument  '+(this.async?'storeExecuteResponse="true" status="true"':'')+' xmlns:wps="'+this.namespaces['wps']+'">'+
 				   outputsArray[0].join('\n')+
 				   '</wps:ResponseDocument>')
