API Question on a Post-Processing Extension for a ContentType

I am working on a Post-Processing extension that I want to perform a specific action only when we are 100% sure the content item has been committed to the CMS.

The behavior I am seeing is that the Extension seems to be called even when validation fails on the Update. So that it is possible the item has not been committed and 100% saved when the event is fired.

I can filter on the sys_command being = “edit” and that seems to tell me where there is a commit, but it is not clear what parameter to check to see if a validation error occurred as the sys_command is still “edit”… or if there is a param that indicates the commit was successful / unsuccessful?

MAYBE the “httpcaller” param?? Does anyone know the correct parameters to check for these types of extensions?

Here’s example output on a Validation failure, code that generated it follows:

“12:30:15,324 INFO [STDOUT] Parameter Name:sys_workflowid : 4
12:30:15,325 INFO [STDOUT] Parameter Name:importTemplate : cdcSyndication
12:30:15,325 INFO [STDOUT] Parameter Name:sys_view : sys_All
12:30:15,325 INFO [STDOUT] Parameter Name:folderPath : new
12:30:15,325 INFO [STDOUT] Parameter Name:sys_hibernateVersion : 3
12:30:15,326 INFO [STDOUT] Parameter Name:sys_currentview : sys_All
12:30:15,326 INFO [STDOUT] Parameter Name:sys_lang : en-us
12:30:15,326 INFO [STDOUT] Parameter Name:psredirect :
12:30:15,327 INFO [STDOUT] Parameter Name:DBActionType : UPDATE
12:30:15,327 INFO [STDOUT] Parameter Name:syndication_topics :
12:30:15,327 INFO [STDOUT] Parameter Name:checkoutstatuscurrentdocument : 1
12:30:15,343 INFO [STDOUT] Parameter Name:sys_pageid : 0
12:30:15,344 INFO [STDOUT] Parameter Name:sys_childid : 0
12:30:15,344 INFO [STDOUT] Parameter Name:sys_title :
12:30:15,345 INFO [STDOUT] Parameter Name:sys_revision : 1
12:30:15,345 INFO [STDOUT] Parameter Name:checkoutusername : admin1
12:30:15,346 INFO [STDOUT] Parameter Name:placeholder :
12:30:15,346 INFO [STDOUT] Parameter Name:assignmenttypecurrentuser : 4
12:30:15,346 INFO [STDOUT] Parameter Name:httpcaller : …/sys_uiSupport/redirec
t.html
12:30:15,347 INFO [STDOUT] Parameter Name:sys_contentid : 903
12:30:15,347 INFO [STDOUT] Parameter Name:sys_contenttypeid : 338
12:30:15,347 INFO [STDOUT] Parameter Name:sys_checkinoutcondition : checkout
12:30:15,348 INFO [STDOUT] Parameter Name:sys_command : edit
12:30:15,348 INFO [STDOUT] Parameter Name:sys_communityid : 1036
12:30:15,348 INFO [STDOUT] Parameter Name:sys_minaccesslevel : 3
12:30:15,423 INFO [STDOUT] Parameter Name:sys_view : sys_All
12:30:15,423 INFO [STDOUT] Parameter Name:sys_checkinoutcondition : ignore
12:30:15,423 INFO [STDOUT] Parameter Name:sys_command : edit
12:30:15,423 INFO [STDOUT] Parameter Name:sys_cacheid : 1
12:30:15,423 INFO [STDOUT] Parameter Name:sys_workflowappid : 4”

public class HHSSyndicationResultDocumentProcessor implements IPSResultDocumentProcessor {

	
   	static Log log = LogFactory.getLog("gov.hhs.percussion.syndication");
   	
	@Override
	public void init(IPSExtensionDef def, File codeRoot)
			throws PSExtensionException {
		// TODO Auto-generated method stub
		
	}

	@Override
	public boolean canModifyStyleSheet() {
		return false;
	}

	@Override
	public Document processResultDocument(Object[] params,
			IPSRequestContext request, Document resultDoc)
			throws PSParameterMismatchException, PSExtensionProcessingException {
		
		Iterator it = request.getParametersIterator();

		//if(resultDoc != null)
			while(it.hasNext()){
				Entry entry = (Entry<?, ?>)it.next();
				
				if(entry!=null)
					if(entry.getValue()!=null & entry.getKey()!=null )
						System.out.println("Parameter Name:" + entry.getKey().toString() + " : " + entry.getValue().toString());
				
			}
		
		return resultDoc;
	}

}