To build and run BPMNspector from checked out sources simply run the start script:
$ BPMNspector fileToValidate.bpmn
Or alternatively: Run a precompiled jar file:
$ java -jar BPMNspector.jar fileToValidate.bpmn
After completion a HTML report will be opened automatically - all reports are stored in {BPMNspector.home}/reports.
Available options are listed by calling:
$ BPMNspector -h
or here:
usage: BPMNspector[-c <[opt1[,opt2]...>] [-d] [-h] [-o] [-r ] Options: -c,--checks <[opt1[,opt2]...> defines which checks should be performed. Allowed values: EXT - checks conformance to EXT rules ALL - performs all checks (default) REF - checks the correctness of references XSD - performs an XML schema validation -d,--debug run BPMNspector in debug mode -h,--help prints this usage information -o,--open open the report file upon completion -r defines which report type should be generated. Allowed values: ALL - create all report types XML - create XML reports HTML - create HTML reports (default) NONE - No report files should be created Examples: BPMNspector myfile.bpmn BPMNspector c:\absolute\path\to\folder -c REF -d BPMNspector c:\absolute\path\to\file.bpmn -o -r HTML 
BPMNspector is able to perfom various checks on BPMN models stored in the XSD-based serialization format of BPMN. Thus, an important prerequisite to use BPMNspector is that the models to be checked are stored in the correct format.
The following aspects can be checked using BPMNspector
SequenceFlow has to reference a source and a target element). Technically xs:id attributes are references either using xs:IDREF or xs:QName attributes/elements. Using this technique potential problems may arise:
                                        messageRef attribute of a SendTask element does not reference a message (as stated in the spec) but another type of a BPMN element.StartEvent is used to start a process, EndEvents must be used, too.errorEventDefinition) is only allowed as an EndEvent, interrupting BoundaryEvent, or an interrupting StartEvent for EventSubProcesses.SubProcess must be started with a 'none' StartEvent - other types are not allowed.