|
@@ -51,11 +51,7 @@ class ProducerService
|
|
|
// la $entity esta dentro de las entidades con workflow
|
|
|
if (in_array($entityClass, WorkFlowEntityClasses::getConstants())) {
|
|
|
$actionRepository = $this->getEntityManager()->getRepository('WorkflowBundle:Action');
|
|
|
-
|
|
|
- /* @todo Refactorizar */
|
|
|
- $actions = $actionRepository->findBy(array(
|
|
|
- 'objectClass' => $entityClass,
|
|
|
- ));
|
|
|
+ $actions = $actionRepository->findAllByEventAndObjectClass($eventName, $entityClass);
|
|
|
foreach ($actions as $action) {
|
|
|
$this->publishMessage($action, $entity);
|
|
|
}
|