Esri / mdcs-py

MDCS is an acronym for Mosaic Dataset Configuration Script and is the entry point to a collection of Python classes/libraries that could be consumed by a Python client application to complete a given workflow for creating a mosaic dataset, populating it with data, and setting all required/desired parameters.
Apache License 2.0
64 stars 29 forks source link

Add support to modify the MDCS command chain from a User Function #144

Closed Chamlika closed 6 months ago

Chamlika commented 7 months ago

Presently the requirement is only to update the command chain (that follows) the user function command. Update can either remove or add any new commands that were not part of the original command chain.

Use of the 'upd_chain' to modify the function chain is shown below,

def user_function(self, data): base = data['base']
resp = { 'status' : False, 'upd_chain' : ['user_function_00', 'user_function_01'] # update with the post function command list, pass [] to stop the chain. } resp = base._updateResponse(resp, status = True, output = 'any text to show the function output') data['response'] = resp data['useResponse'] = True return True