I know 2 ways to do this:
- WorkspaceRunner. Creator to start WorkSpaceRunner. First WorkSpaceRunner to process data. Second WorkSpaceRunner to mail attachment.
- FeatureWriter. Use Summary feature from FeatureWriter to initiate the next Transformer. I often use a Holder to prevent starting the Transformer after the FeatureWriter before all features are written.
I prefer the FeatureWriter because this way you can keep it in one Workspace.
The downside of using a FeatureWriter in server is that the field numFeaturesOutput in the job summary is not handled correctly. Using a classic writer this number tells the number of written features correctly.