Package uk.org.ogsadai.client.toolkit

Examples of uk.org.ogsadai.client.toolkit.RequestResource


            DataRequestExecutionResource drer, Workflow workflow)
    throws Exception
    {
        try
        {
            RequestResource request =
                drer.execute(workflow, RequestExecutionType.SYNCHRONOUS);
            System.out.println(request.getRequestExecutionStatus());
            return request;
        }
        catch (RequestExecutionException e)
        {
            System.out.println(e.getRequestResource().getRequestStatus());
View Full Code Here


        pipeline.add(rdfActivity);
        pipeline.add(tupleToWebRowSet);
        pipeline.add(deliverToRequestStatus);

        // Excecute the workflow
        RequestResource req = null;
        try
        {
            req = drer.execute(pipeline, RequestExecutionType.SYNCHRONOUS);
        }
        catch (RequestExecutionException e)
View Full Code Here

        PipelineWorkflow pipeline = new PipelineWorkflow();
        pipeline.add(rdfActivity);
        pipeline.add(tupleToWebRowSet);
        pipeline.add(writeToDataSource);

        RequestResource requestResource = drer.execute(pipeline,
                RequestExecutionType.ASYNCHRONOUS);
        requestResource.pollUntilRequestStarted(1000);

        // Get the data
        TupleToWebRowSetCharArrays tupleToWebRowSet2 = new TupleToWebRowSetCharArrays();
        tupleToWebRowSet2.getResultOutput().setDataSourceResource(dataSource);

        System.out.println("Data Source Status... "
                + dataSource.getStatus().toString());

        System.out.println(requestResource.getRequestExecutionStatus()
                .toString());
        RequestStatus requestStatus = requestResource.getRequestStatus();

        while ("uk.org.ogsadai.resource.request.status.PROCESSING"
                .equals(requestResource.getRequestExecutionStatus().toString()))
        {
            System.out.println("waiting the workflow to finish...");
            Iterator<DataValue> it = requestStatus.getDataValueIterator(
                    rdfActivity.getInstanceName(), "rdfdata");
            if (it.hasNext())
            {
                it.next().toString();
                System.out.println("probando el indirecto...");
            }
        }

        System.out.println(requestResource.getRequestExecutionStatus()
                .toString());

        Thread.sleep(10000);

        if (tupleToWebRowSet2.hasNextResult())
View Full Code Here

        pipeline.add(rdfActivity);
        pipeline.add(tupleToWebRowSet);
        pipeline.add(deliverToRequestStatus);

        // Excecute the workflow
        RequestResource req = null;
        try
        {
            req = drer.execute(pipeline, RequestExecutionType.SYNCHRONOUS);
        }
        catch (RequestExecutionException e)
View Full Code Here

            DataRequestExecutionResource drer, Workflow workflow)
    throws Exception
    {
        try
        {
            RequestResource request =
                drer.execute(workflow, RequestExecutionType.SYNCHRONOUS);
            return request;
        }
        catch (RequestExecutionException e)
        {
View Full Code Here

            DataRequestExecutionResource drer, Workflow workflow)
    throws Exception
    {
        try
        {
            RequestResource request =
                drer.execute(workflow, RequestExecutionType.SYNCHRONOUS);
            return request;
        }
        catch (RequestExecutionException e)
        {
View Full Code Here

            DataRequestExecutionResource drer, Workflow workflow)
    throws Exception
    {
        try
        {
            RequestResource request =
                drer.execute(workflow, RequestExecutionType.SYNCHRONOUS);
            return request;
        }
        catch (RequestExecutionException e)
        {
View Full Code Here

    }

    public RequestStatus call() throws Exception
    {
        mListener.start(mLocation, mWorkflow);
        RequestResource request = null;
        try
        {
            DataRequestExecutionResource drer = mLocation.getDRER();
            request = drer.execute(mWorkflow, RequestExecutionType.ASYNCHRONOUS);
            mListener.submitted(mLocation, mWorkflow, request.getResourceID());
            request.pollUntilRequestCompleted(POLL_INTERVAL);
            RequestStatus status = request.getRequestStatus();
            mListener.completed(mLocation, status);
            return status;
        }
        catch (Exception e)
        {
            mListener.executionError(mLocation, e);
            throw e;
        }
        catch (Error e)
        {
            mListener.executionError(mLocation, e);
            throw e;
        }
        finally
        {
            if (request != null)
            {
                try
                {
                    LOG.debug("Destroying request resource.");
                    request.destroy();
                }
                catch (Throwable e)
                {
                    LOG.warn("Caught exception when trying to destroy request resource.", e);
                }
View Full Code Here

        pipeline.add(tupleToWebRowSet);
        pipeline.add(deliverToRequestStatus);

        try
        {
            RequestResource req = drer.execute(pipeline,
                    RequestExecutionType.SYNCHRONOUS);
        }
        catch (ServerCommsException e)
        {
            // TODO Auto-generated catch block
View Full Code Here

        pipeline.add(tupleToWebRowSet);
        pipeline.add(deliverToRequestStatus);

        try
        {
            RequestResource req = drer.execute(pipeline,
                    RequestExecutionType.SYNCHRONOUS);
        }
        catch (ServerCommsException e)
        {
            LOG.debug("There was an error executing the workflow");
View Full Code Here

TOP

Related Classes of uk.org.ogsadai.client.toolkit.RequestResource

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.