Zeta Workflow 13: Sniffer Integration
- When constructing the Zeta Components Wrapper, include the Sniffer.
- When the wrapper starts or resumes an execution, attach the Sniffer Plugin.
- Add each of the Sniffer’s current*() methods to the wrapper interface and implementation.
- Copy and modify the sub workflow test. Change the new (copied) test to use currentInterpretation() in the slide verification. This should tell us that everything is integrated and working correctly.
- Add docblock comments everywhere. “make phpdoc” will tell us of anything missing.
- Run all unit tests (make all).
- Add, commit, and push the code.
Having done the above except commit the code, I find that the integration test fails in a big way.
A bit of investigation turns up the problem. We are hitting our own exception for seeing a null execution id in the sub workflow. We’ll add that to the interpreter so it’s clear what happened.
In ExecutionStateRegistry, if the id is null, we now set the id (our internal registry index) to ‘null id’. This will break the unit test which checks for null exception.
The subWorkflowTest distinguishes between the main workflow execution’s slide, and the “current” or “active” sub workflow slide. Since we’re now using the interpreter, we only want the current slide. Adjust the new sniffer sub workflow test accordingly. Now the test passes.
Everything runs cleanly!