if (processInstanceId == -1) {
workingMemory.getSignalManager().signalEvent(eventType, event);
</BUG>
} else {
<BUG>ProcessInstance processInstance = ( ProcessInstance ) workingMemory.getProcessInstance(processInstanceId);
</BUG>
if (processInstance != null) {
processInstance.signalEvent(eventType, processInstance);
}
}

if (processInstanceId == -1) {
session.getSignalManager().signalEvent(eventType, event);
} else {
ProcessInstance processInstance = session.getProcessInstance(processInstanceId);
if (processInstance != null) {
processInstance.signalEvent(eventType, processInstance);
}
}
