Skip to content

Commit

Permalink
Parameters for status and store_execute added
Browse files Browse the repository at this point in the history
  • Loading branch information
lazaa32 committed Jan 21, 2018
1 parent 3d9c821 commit bb94b71
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions owslib/wps.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ def describeprocess(self, identifier, xml=None):
# build metadata objects
return self._parseProcessMetadata(rootElement)

def execute(self, identifier, inputs, output=None, request=None, response=None):
def execute(self, identifier, inputs, output=None, request=None, response=None, status='true', store_execute='true'):
"""
Submits a WPS process execution request.
Returns a WPSExecution object, which can be used to monitor the status of the job, and ultimately retrieve the result.
Expand All @@ -272,7 +272,7 @@ def execute(self, identifier, inputs, output=None, request=None, response=None):

# build XML request from parameters
if request is None:
requestElement = execution.buildRequest(identifier, inputs, output)
requestElement = execution.buildRequest(identifier, inputs, output, status, store_execute)
request = etree.tostring(requestElement)
execution.request = request
log.debug(request)
Expand Down Expand Up @@ -514,7 +514,7 @@ def __init__(self, version=WPS_DEFAULT_VERSION, url=None, username=None, passwor
self.dataInputs = []
self.processOutputs = []

def buildRequest(self, identifier, inputs=[], output=None):
def buildRequest(self, identifier, inputs=[], output=None, status='true', store_execute='true'):
"""
Method to build a WPS process request.
identifier: the requested process identifier
Expand Down Expand Up @@ -607,10 +607,10 @@ def buildRequest(self, identifier, inputs=[], output=None):
if output is not None:
responseFormElement = etree.SubElement(
root, nspath_eval('wps:ResponseForm', namespaces))
responseDocumentElement = etree.SubElement(
responseFormElement, nspath_eval(
'wps:ResponseDocument', namespaces),
attrib={'storeExecuteResponse': 'true', 'status': 'true'})
responseDocumentElement = etree.SubElement(responseFormElement,
nspath_eval('wps:ResponseDocument', namespaces),
attrib={'storeExecuteResponse': store_execute,
'status': status})
if isinstance(output, str):
self._add_output(
responseDocumentElement, output, asReference=True)
Expand Down

1 comment on commit bb94b71

@jachym
Copy link

@jachym jachym commented on bb94b71 Jan 22, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me

Please sign in to comment.