public WorkflowContext execute ( WorkflowContext context ) throws WorkflowException { if ( context instanceof MapModelWorkflowContext ) { MapModelWorkflowContext mmContext = ( MapModelWorkflowContext ) context ; FeatureTransaction ft = mmContext . getFeatureTransaction ( ) ; if ( ft . getNewFeatures ( ) != null ) { for ( Feature feature : ft . getNewFeatures ( ) ) { if ( ! feature . getGeometry ( ) . isValid ( ) ) { throw new WorkflowException ( I18nProvider . getGlobal ( ) . validationActivityError ( ) ) ; } } } } return context ; }
Check for geometry validity .