[Geoserver-devel] [JIRA] (GEOS-7093) Inconsistent WPS Process Result with Exception and LiteralData

Jody Garnett [Administrator] created an issue

GeoServer / BugGEOS-7093

Inconsistent WPS Process Result with Exception and LiteralData

Issue Type:

BugBug

Affects Versions:

2.7.1.1

Assignee:

Unassigned

Components:

WPS

Created:

30/Jun/15 1:12 AM

Priority:

MediumMedium

Reporter:

Jody Garnett [Administrator]

I was looking to update the WPS dev guide example; and ran into an oddness.

Consider the following code in WPSExecutionManager:

                    ExecutionStatus completedStatus = new ExecutionStatus(status);
                    if (status.getPhase() == ProcessState.RUNNING) {
                        completedStatus.setPhase(ProcessState.SUCCEEDED);
                    } else {
                        completedStatus.setPhase(ProcessState.FAILED);
                    }
{code:java}

This looks fine, but at the time the debugger gets here the status == ProcessPhase.QUEUED which results in the process having both a FAILED status and an answer:

{code:xml}
<ExecuteResponse ...>
    <Process processVersion="1.0.0">
        <Identifier>test:version</Identifier>
        <Title>Test Verion</Title>
        <Abstract>Implementation version</Abstract>
    </Process>
    <Status creationTime="2015-06-29T22:59:52.097Z">
        <ProcessFailed>
            <ExceptionReport version="1.1.0">
                <Exception exceptionCode="NoApplicableCode">
                    <ExceptionText>Process failed during execution</ExceptionText>
                </Exception>
            </ExceptionReport>
        </ProcessFailed>
    </Status>
    <ProcessOutputs>
        <Output>
            <Identifier>result</Identifier>
            <Title>Version</Title>
            <Data>
                <LiteralData>0.5.3</LiteralData>
            </Data>
        </Output>
    </ProcessOutputs>
</ExecuteResponse>

For reference here is a sample process:

public class ExampleProcesses extends StaticMethodsProcessFactory<ExampleProcesses>  {
  public GrassProcesses() {
    super(Text.text("Example"), "example", ExampleProcesses);
  }
  @DescribeProcess(title = "Version", description = "Version of implementation used")
  @DescribeResult(description = "Version")
  public static String version() {
    return "0.5.2";
  }
}

Add Comment

Add Comment

This message was sent by Atlassian JIRA (v6.5-OD-07-005#65007-sha1:7561251)

Atlassian logo