/**
* @see org.ofbiz.workflow.WfRequester#receiveEvent(org.ofbiz.workflow.WfEventAudit)
*/
public synchronized void receiveEvent(WfEventAudit event) throws WfException, InvalidPerformer {
// Should the source of the audit come from the process? if so use this.
WfProcess process = null;
try {
process = (WfProcess) event.source();
} catch (SourceNotAvailable sna) {
throw new InvalidPerformer("Could not get the performer", sna);
} catch (ClassCastException cce) {
throw new InvalidPerformer("Not a valid process object", cce);
}
if (process == null)
throw new InvalidPerformer("No performer specified");
if (!performers.containsKey(process))
throw new InvalidPerformer("Performer not assigned to this requester");
GenericRequester req = null;
if (performers.containsKey(process))
req = (GenericRequester) performers.get(process);
if (req != null)
req.receiveResult(process.result());
}