|The usage of runProcessor described here only work in Revolution 2.0.8 and later. Users prior to that will have to use the deprecated executeProcessor method.|
$response = $modx->runProcessor('action/path/to/processor',$arrayOfProperties,$otherOptions);
This will then execute the specified processor and return a modProcessorResponse object, that contains the response from the processor. That can then be checked to see if the process was a success or failure. The first parameter, or action, is the path to the processor (without the file extension) from the core/model/modx/processors/ directory (This directory can also be overridden in the 3rd parameter array with the param 'processors_path').
For example, this code creates a new Chunk:
This block of code runs the 'element/chunk/create' processor, checks to see if it was successful (with isError()), and if so, returns a message saying the ID and the name of the new Chunk. Note that getObject returns an array of the object that is returned by the processor. getMessage will return any message sent back from the processor.