I have an issue when using 4 different workflows in 4 different entities. It seems to recognise only the first. I have seen issue
#2969569: Route "entity.node.workflow_history" error for Entities with multiple Workflow Fields per bundle β
and seemed to work the patch. However, when I added the field for each entity and try to update an already existing node, now I get another error:
From the log report in Drupal I get this: It looks for workflow "propuestas_de_v..." but it should be looking for "proc_abierto" workflow.
TypeError: Argument 1 passed to Drupal\rules\Plugin\Condition\EntityIsOfType::doEvaluate() must implement interface Drupal\Core\Entity\EntityInterface, string given en Drupal\rules\Plugin\Condition\EntityIsOfType->doEvaluate() (lΓnea 42 de C:\xampp_intranet\htdocs\intraceh\modules\rules\src\Plugin\Condition\EntityIsOfType.php) #0 [internal function]: Drupal\rules\Plugin\Condition\EntityIsOfType->doEvaluate('propuestas_de_v...', 'propuestas_de_v...') #1 C:\xampp_intranet\htdocs\intraceh\modules\rules\src\Core\RulesConditionBase.php(69): call_user_func_array(Array, Array) #2 C:\xampp_intranet\htdocs\intraceh\modules\rules\src\Plugin\RulesExpression\RulesCondition.php(109): Drupal\rules\Core\RulesConditionBase->evaluate() #3 C:\xampp_intranet\htdocs\intraceh\modules\rules\src\Plugin\RulesExpression\RulesAnd.php(36): Drupal\rules\Plugin\RulesExpression\RulesCondition->executeWithState(Object(Drupal\rules\Engine\ExecutionState)) #4 C:\xampp_intranet\htdocs\intraceh\modules\rules\src\Engine\ConditionExpressionContainer.php(73): Drupal\rules\Plugin\RulesExpression\RulesAnd->evaluate(Object(Drupal\rules\Engine\ExecutionState)) #5 C:\xampp_intranet\htdocs\intraceh\modules\rules\src\Plugin\RulesExpression\Rule.php(90): Drupal\rules\Engine\ConditionExpressionContainer->executeWithState(Object(Drupal\rules\Engine\ExecutionState)) #6 C:\xampp_intranet\htdocs\intraceh\modules\rules\src\Plugin\RulesExpression\ActionSet.php(31): Drupal\rules\Plugin\RulesExpression\Rule->executeWithState(Object(Drupal\rules\Engine\ExecutionState)) #7 C:\xampp_intranet\htdocs\intraceh\modules\rules\src\EventSubscriber\GenericEventSubscriber.php(131): Drupal\rules\Plugin\RulesExpression\ActionSet->executeWithState(Object(Drupal\rules\Engine\ExecutionState)) #8 [internal function]: Drupal\rules\EventSubscriber\GenericEventSubscriber->onRulesEvent(Object(Drupal\rules\Event\EntityEvent), 'rules_entity_in...', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher)) #9 C:\xampp_intranet\htdocs\intraceh\core\lib\Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher.php(111): call_user_func(Array, Object(Drupal\rules\Event\EntityEvent), 'rules_entity_in...', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher)) #10 C:\xampp_intranet\htdocs\intraceh\modules\rules\rules.module(124): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('rules_entity_in...', Object(Drupal\rules\Event\EntityEvent)) #11 [internal function]: rules_entity_insert(Object(Drupal\workflow\Entity\WorkflowTransition)) #12 C:\xampp_intranet\htdocs\intraceh\core\lib\Drupal\Core\Extension\ModuleHandler.php(402): call_user_func_array('rules_entity_in...', Array) #13 C:\xampp_intranet\htdocs\intraceh\core\lib\Drupal\Core\Entity\EntityStorageBase.php(169): Drupal\Core\Extension\ModuleHandler->invokeAll('entity_insert', Array) #14 C:\xampp_intranet\htdocs\intraceh\core\lib\Drupal\Core\Entity\ContentEntityStorageBase.php(730): Drupal\Core\Entity\EntityStorageBase->invokeHook('insert', Object(Drupal\workflow\Entity\WorkflowTransition)) #15 C:\xampp_intranet\htdocs\intraceh\core\lib\Drupal\Core\Entity\EntityStorageBase.php(470): Drupal\Core\Entity\ContentEntityStorageBase->invokeHook('insert', Object(Drupal\workflow\Entity\WorkflowTransition)) #16 C:\xampp_intranet\htdocs\intraceh\core\lib\Drupal\Core\Entity\ContentEntityStorageBase.php(615): Drupal\Core\Entity\EntityStorageBase->doPostSave(Object(Drupal\workflow\Entity\WorkflowTransition), false) #17 C:\xampp_intranet\htdocs\intraceh\core\lib\Drupal\Core\Entity\EntityStorageBase.php(395): Drupal\Core\Entity\ContentEntityStorageBase->doPostSave(Object(Drupal\workflow\Entity\WorkflowTransition), false) #18 C:\xampp_intranet\htdocs\intraceh\core\lib\Drupal\Core\Entity\Sql\SqlContentEntityStorage.php(820): Drupal\Core\Entity\EntityStorageBase->save(Object(Drupal\workflow\Entity\WorkflowTransition)) #19 C:\xampp_intranet\htdocs\intraceh\core\lib\Drupal\Core\Entity\Entity.php(391): Drupal\Core\Entity\Sql\SqlContentEntityStorage->save(Object(Drupal\workflow\Entity\WorkflowTransition)) #20 C:\xampp_intranet\htdocs\intraceh\modules\workflow\src\Entity\WorkflowTransition.php(234): Drupal\Core\Entity\Entity->save() #21 C:\xampp_intranet\htdocs\intraceh\modules\workflow\src\Entity\WorkflowTransition.php(520): Drupal\workflow\Entity\WorkflowTransition->save() #22 C:\xampp_intranet\htdocs\intraceh\modules\workflow\src\Entity\WorkflowManager.php(193): Drupal\workflow\Entity\WorkflowTransition->execute() #23 C:\xampp_intranet\htdocs\intraceh\modules\workflow\workflow.module(149): Drupal\workflow\Entity\WorkflowManager::executeTransitionsOfEntity(Object(Drupal\node\Entity\Node)) #24 C:\xampp_intranet\htdocs\intraceh\modules\workflow\workflow.module(130): _workflow_execute_transitions(Object(Drupal\node\Entity\Node)) #25 [internal function]: workflow_entity_presave(Object(Drupal\node\Entity\Node)) #26 C:\xampp_intranet\htdocs\intraceh\core\lib\Drupal\Core\Extension\ModuleHandler.php(402): call_user_func_array('workflow_entity...', Array) #27 C:\xampp_intranet\htdocs\intraceh\core\lib\Drupal\Core\Entity\EntityStorageBase.php(169): Drupal\Core\Extension\ModuleHandler->invokeAll('entity_presave', Array) #28 C:\xampp_intranet\htdocs\intraceh\core\lib\Drupal\Core\Entity\ContentEntityStorageBase.php(730): Drupal\Core\Entity\EntityStorageBase->invokeHook('presave', Object(Drupal\node\Entity\Node)) #29 C:\xampp_intranet\htdocs\intraceh\core\lib\Drupal\Core\Entity\EntityStorageBase.php(435): Drupal\Core\Entity\ContentEntityStorageBase->invokeHook('presave', Object(Drupal\node\Entity\Node)) #30 C:\xampp_intranet\htdocs\intraceh\core\lib\Drupal\Core\Entity\ContentEntityStorageBase.php(587): Drupal\Core\Entity\EntityStorageBase->doPreSave(Object(Drupal\node\Entity\Node)) #31 C:\xampp_intranet\htdocs\intraceh\core\lib\Drupal\Core\Entity\EntityStorageBase.php(389): Drupal\Core\Entity\ContentEntityStorageBase->doPreSave(Object(Drupal\node\Entity\Node)) #32 C:\xampp_intranet\htdocs\intraceh\core\lib\Drupal\Core\Entity\Sql\SqlContentEntityStorage.php(820): Drupal\Core\Entity\EntityStorageBase->save(Object(Drupal\node\Entity\Node)) #33 C:\xampp_intranet\htdocs\intraceh\core\lib\Drupal\Core\Entity\Entity.php(391): Drupal\Core\Entity\Sql\SqlContentEntityStorage->save(Object(Drupal\node\Entity\Node)) #34 C:\xampp_intranet\htdocs\intraceh\core\modules\node\src\NodeForm.php(281): Drupal\Core\Entity\Entity->save() #35 [internal function]: Drupal\node\NodeForm->save(Array, Object(Drupal\Core\Form\FormState)) #36 C:\xampp_intranet\htdocs\intraceh\core\lib\Drupal\Core\Form\FormSubmitter.php(111): call_user_func_array(Array, Array) #37 C:\xampp_intranet\htdocs\intraceh\core\lib\Drupal\Core\Form\FormSubmitter.php(51): Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object(Drupal\Core\Form\FormState)) #38 C:\xampp_intranet\htdocs\intraceh\core\lib\Drupal\Core\Form\FormBuilder.php(589): Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object(Drupal\Core\Form\FormState)) #39 C:\xampp_intranet\htdocs\intraceh\core\lib\Drupal\Core\Form\FormBuilder.php(318): Drupal\Core\Form\FormBuilder->processForm('node_expediente...', Array, Object(Drupal\Core\Form\FormState)) #40 C:\xampp_intranet\htdocs\intraceh\core\lib\Drupal\Core\Controller\FormController.php(74): Drupal\Core\Form\FormBuilder->buildForm('node_expediente...', Object(Drupal\Core\Form\FormState)) #41 [internal function]: Drupal\Core\Controller\FormController->getContentResult(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\RouteMatch)) #42 C:\xampp_intranet\htdocs\intraceh\core\lib\Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array) #43 C:\xampp_intranet\htdocs\intraceh\core\lib\Drupal\Core\Render\Renderer.php(582): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #44 C:\xampp_intranet\htdocs\intraceh\core\lib\Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure)) #45 C:\xampp_intranet\htdocs\intraceh\core\lib\Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) #46 C:\xampp_intranet\htdocs\intraceh\vendor\symfony\http-kernel\HttpKernel.php(151): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #47 C:\xampp_intranet\htdocs\intraceh\vendor\symfony\http-kernel\HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #48 C:\xampp_intranet\htdocs\intraceh\core\lib\Drupal\Core\StackMiddleware\Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #49 C:\xampp_intranet\htdocs\intraceh\core\lib\Drupal\Core\StackMiddleware\KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #50 C:\xampp_intranet\htdocs\intraceh\core\modules\page_cache\src\StackMiddleware\PageCache.php(99): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #51 C:\xampp_intranet\htdocs\intraceh\core\modules\page_cache\src\StackMiddleware\PageCache.php(78): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true) #52 C:\xampp_intranet\htdocs\intraceh\core\lib\Drupal\Core\StackMiddleware\ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #53 C:\xampp_intranet\htdocs\intraceh\core\lib\Drupal\Core\StackMiddleware\NegotiationMiddleware.php(52): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #54 C:\xampp_intranet\htdocs\intraceh\vendor\stack\builder\src\Stack\StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #55 C:\xampp_intranet\htdocs\intraceh\core\lib\Drupal\Core\DrupalKernel.php(666): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #56 C:\xampp_intranet\htdocs\intraceh\index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #57 {main}.
Thanks for the help.