public String executeProcess(String url, String processID,
                               ProcessDescriptionType processDescription,
                               HashMap<String, Object> inputs) throws Exception {
        org.n52.wps.client.ExecuteRequestBuilder executeBuilder = new org.n52.wps.client.ExecuteRequestBuilder(
                processDescription);

        for (InputDescriptionType input : processDescription.getDataInputs()
                .getInputArray()) {

            String inputName = input.getIdentifier().getStringValue();       //get input value
            Object inputValue = inputs.get(inputName);       //get input name

            if (input.getLiteralData() != null) {    //check nullability of literal data
                //Executebuilder builds WPS standard execution request.
                if (inputValue instanceof String) {
                    executeBuilder.addLiteralData(inputName,         //specifies to add literal data.
                            (String) inputValue);
                }
            } else if (input.getComplexData() != null) {
                // Complexdata // Complexdata by value such as GML reference set the schema
                if (inputValue instanceof FeatureCollection) {
                    IData data = new GTVectorDataBinding(
                            (FeatureCollection) inputValue);
                    executeBuilder
                            .addComplexData(
                                    inputName,
                                    data,
                                    "http://schemas.opengis.net/gml/2.1.2/feature.xsd",
                                    "UTF-8", "text/xml");
                }
                // Complexdata Reference
                if (inputValue instanceof String) {
                    executeBuilder
                            .addComplexDataReference(
                                    inputName,
                                    (String) inputValue,
                                    "http://schemas.opengis.net/gml/2.1.1/feature.xsd",
                                    null, "text/xml");
                }

                if (inputValue == null && input.getMinOccurs().intValue() > 0) {
                    throw new IOException("Property not set, but mandatory: "
                            + inputName);
                }
            }
        }

        executeBuilder.setMimeTypeForOutput("application/WFS", "intersection_result");   /* set the Mime type as application/WFS. But most documents you will
         find it is set as text/xml. Since you are dealing with */


        ExecuteDocument execute = executeBuilder.getExecute();

        execute.getExecute().setService("WPS");    //set the service as WPS
        WPSClientSession wpsClient = WPSClientSession.getInstance();      //get the client from session
        Object responseObject = wpsClient.execute(url, execute);      //execute and get the response

        if (responseObject instanceof ExecuteResponseDocument) {
            String content = responseObject.toString();

            System.out.println(Filter.getResourceId(content));    /* Execute response is a fairly complex long xml response. But only the wfs id is needed
            to pass from one process to the other hence only the Id is needed */
            return content;
        }
        else{

            return null;
        }

    }