the orchestration expects a sequence of events that includes module evaluation and setting of the markers before running the UpdateModuleInstance procedure.
https://github.com/data-solution-automation-engine/DIRECT/blob/main/Direct_Framework/Stored%20Procedures/omd.UpdateModuleInstance.sql
For scenarios where the processing is outside of the engine, this might not be as convenient.
If the update is called with a success parameter value, then it implies that the module process was successful. Setting the internal processing code to success here ensures that this is captured, regardless if other state updates have run before for the instance.
From a wider perspective, the evaluation and process updates could be run from the external engine throughout the processing, however that probably becomes more convenient with additional updates to the evaluation process, allowing easier access to the results from outside the engine direct is running in.