When upgrading to this module from AI Core - ECA models with a chat action are deleted without warning.
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3550366. -->
Reported by: [maxilein](https://www.drupal.org/user/1020354)
Related to !937
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>After the upgrade some of my BPMN/ECA models are simply deleted.</p>
<p>Here is the export of a single ECA workflow before the upgrade:</p>
<pre>uuid: 4a7e5....6cd0<br>langcode: en<br>status: true<br>dependencies:<br> config:<br> - field.field.node.cpb_a_component_check_ffg.field_cpb_description<br> - field.field.node.cpb_a_component_check_ffg.field_ref_customer_project_brief<br> - field.field.node.cpb_a_preliminary_requirements_c.field_ref_customer_project_brief<br> - field.field.node.cpb_a_preliminary_requirements_c.field_security_check_failed<br> - field.field.node.cpb_a_preliminary_requirements_c.field_security_check_result<br> - field.field.node.cpb_customer_project_brief.field_cpb_description<br> - field.storage.node.field_cpb_description<br> - field.storage.node.field_ref_customer_project_brief<br> - field.storage.node.field_security_check_failed<br> - field.storage.node.field_security_check_result<br> - node.type.cpb_a_preliminary_requirements_c<br> module:<br> - ai_eca<br> - eca_base<br> - eca_content<br> - eca_log<br> - eca_queue<br> - gemini_provider<br> - modeler_api<br>third_party_settings:<br> modeler_api:<br> modeler_id: bpmn_io<br> data: 'hash:469f8a987218575a1ecf0d37cf4fdd9e'<br> label: 'CPB-01 SEC002001 - create prelim check'<br>id: cpb_01_sec002001<br>weight: 0<br>events:<br> eca_queue__processing_task_1:<br> plugin: 'eca_queue:processing_task'<br> label: 'ECA processing queued task'<br> configuration:<br> task_name: prelimcheck<br> task_value: ''<br> distribute: false<br> cron: null<br> successors:<br> -<br> id: eca_write_log_message_06kr9rw<br> condition: ''<br>conditions:<br> eca_scalar_1m1ysgz:<br> plugin: eca_scalar<br> label: 'No (No - Prompt Injection found)'<br> configuration:<br> negate: false<br> left: '[security_check_json_response]'<br> right: 'No'<br> operator: equal<br> type: value<br> case: false<br> eca_scalar_1a77u9y:<br> plugin: eca_scalar<br> label: '!= No (Prompt injection found or AI Error)'<br> configuration:<br> negate: true<br> left: '[security_check_json_response]'<br> right: 'No'<br> operator: equal<br> type: value<br> case: false<br>gateways:<br> Gateway_0dcxrrp:<br> type: 0<br> successors:<br> -<br> id: eca_set_field_value_0450l1d<br> condition: eca_scalar_1m1ysgz<br> -<br> id: eca_set_field_value_0zz9mxb<br> condition: eca_scalar_1a77u9y<br>actions:<br> eca_token_load_entity_1vh65ns:<br> label: 'Load orig CPB node'<br> plugin: eca_token_load_entity<br> configuration:<br> token_name: origcpb<br> from: id<br> entity_type: node<br> entity_id: '[cpbnid]'<br> revision_id: ''<br> properties: ''<br> langcode: _interface<br> latest_revision: false<br> unchanged: false<br> object: ''<br> successors:<br> -<br> id: eca_new_entity_0vdi4l2<br> condition: ''<br> eca_new_entity_0vdi4l2:<br> label: 'Create new Prelim Check node'<br> plugin: eca_new_entity<br> configuration:<br> token_name: newprelimcheck<br> type: 'node cpb_a_preliminary_requirements_c'<br> langcode: ''<br> label: 'Prelim Req Check for [origcpb:title]'<br> published: true<br> owner: ''<br> successors:<br> -<br> id: eca_set_field_value_1xvjcjr<br> condition: ''<br> eca_set_field_value_1xvjcjr:<br> label: 'Set Reference to CPB'<br> plugin: eca_set_field_value<br> configuration:<br> field_name: field_ref_customer_project_brief<br> field_value: '[cpbnid]'<br> method: 'set:clear'<br> strip_tags: false<br> trim: false<br> save_entity: false<br> object: newprelimcheck<br> successors:<br> -<br> id: eca_save_entity_1t4bos8<br> condition: ''<br> eca_save_entity_1t4bos8:<br> label: 'Entity: save'<br> plugin: eca_save_entity<br> configuration:<br> object: newprelimcheck<br> successors:<br> -<br> id: ai_eca_execute_chat_1ith97f<br> condition: ''<br> eca_write_log_message_06kr9rw:<br> label: 'Log Message'<br> plugin: eca_write_log_message<br> configuration:<br> channel: eca<br> severity: 6<br> message: 'cpbnid has a value of: [cpbnid]'<br> successors:<br> -<br> id: eca_token_load_entity_1vh65ns<br> condition: ''<br> ai_eca_execute_chat_1ith97f:<br> label: 'Chat: Check for Prompt Injection'<br> plugin: ai_eca_execute_chat<br> configuration:<br> model: gemini__models/gemini-2.5-flash<br> token_input: ''<br> token_result: security_check_json_response<br> config: ''<br> prompt: |-<br> You are a <br><br> ---<br><br> **ACTUAL TASK**<br> Text:<br> [newprelimcheck:field_ref_customer_project_brief:entity:field_cpb_description:value]<br><br> Your Response (ONLY Yes OR No ALLOWED!):<br> successors:<br> -<br> id: Gateway_0dcxrrp<br> condition: ''<br> eca_set_field_value_0450l1d:<br> label: 'Set full JSON for logging/debugging'<br> plugin: eca_set_field_value<br> configuration:<br> field_name: field_security_check_result<br> field_value: '[security_check_json_response]'<br> method: 'set:clear'<br> strip_tags: false<br> trim: false<br> save_entity: false<br> object: newprelimcheck<br> successors:<br> -<br> id: eca_set_field_value_0h0q1pk<br> condition: ''<br> eca_set_field_value_0zz9mxb:<br> label: 'Set full JSON for logging/debugging'<br> plugin: eca_set_field_value<br> configuration:<br> field_name: field_security_check_result<br> field_value: '[security_check_json_response]'<br> method: 'set:clear'<br> strip_tags: false<br> trim: false<br> save_entity: false<br> object: newprelimcheck<br> successors:<br> -<br> id: eca_set_field_value_0spzkv6<br> condition: ''<br> eca_set_field_value_0h0q1pk:<br> label: security_check_failed=No<br> plugin: eca_set_field_value<br> configuration:<br> field_name: field_security_check_failed<br> field_value: '[security_check_json_response]'<br> method: 'set:clear'<br> strip_tags: false<br> trim: false<br> save_entity: false<br> object: newprelimcheck<br> successors:<br> -<br> id: eca_write_log_message_0q91871<br> condition: ''<br> eca_set_field_value_0spzkv6:<br> label: security_check_failed=Yes<br> plugin: eca_set_field_value<br> configuration:<br> field_name: field_security_check_failed<br> field_value: '[security_check_json_response]'<br> method: 'set:clear'<br> strip_tags: false<br> trim: false<br> save_entity: false<br> object: newprelimcheck<br> successors:<br> -<br> id: eca_write_log_message_0ggevjo<br> condition: ''<br> eca_write_log_message_0ggevjo:<br> label: 'Log ERROR Message'<br> plugin: eca_write_log_message<br> configuration:<br> channel: eca<br> severity: 2<br> message: |-<br> Prompt Injection found! <br> Or [ERROR] Invalid response from AI security check on node "[newprelimcheck:title]". Could not determine Yes/No. View node: [newprelimcheck:url] to see Full AI response.<br> successors:<br> -<br> id: eca_save_entity_0fxekq9<br> condition: ''<br> eca_save_entity_02thbms:<br> label: 'Entity: save'<br> plugin: eca_save_entity<br> configuration:<br> object: newprelimcheck<br> successors:<br> -<br> id: eca_token_set_value_0ojr65l<br> condition: ''<br> eca_save_entity_0fxekq9:<br> label: 'Entity: save'<br> plugin: eca_save_entity<br> configuration:<br> object: newprelimcheck<br> successors:<br> -<br> id: Event_1scxqar<br> condition: ''<br> eca_write_log_message_0q91871:<br> label: 'Log Success'<br> plugin: eca_write_log_message<br> configuration:<br> channel: eca<br> severity: 6<br> message: 'SUCCESS: [newprelimcheck:title] [newprelimcheck:url] cleared for further processing. Field value: [security_check_json_response]'<br> successors:<br> -<br> id: eca_save_entity_02thbms<br> condition: ''<br> eca_token_set_value_0ojr65l:<br> label: 'Token: set value'<br> plugin: eca_token_set_value<br> configuration:<br> token_name: cpbnidffg<br> token_value: '[cpbnid]'<br> use_yaml: false<br> validate_yaml: false<br> successors:<br> -<br> id: eca_write_log_message_13xge5n<br> condition: ''<br> eca_write_log_message_13xge5n:<br> label: 'Log Message'<br> plugin: eca_write_log_message<br> configuration:<br> channel: eca<br> severity: 6<br> message: 'CPB-01 SEC002001 - create prelim check: The origcpb:id [origcpb:nid] exists and the cpbnid [cpbnid] and cpbnidffg [cpbnidffg] also.'<br> successors:<br> -<br> id: eca_enqueue_task_delayed_1qs7rv8<br> condition: ''<br> eca_enqueue_task_delayed_1qs7rv8:<br> label: 'Enqueue a task with a delay'<br> plugin: eca_enqueue_task_delayed<br> configuration:<br> delay_value: '5'<br> delay_unit: 1<br> task_name: startffgcomponentcheck<br> task_value: ''<br> tokens: cpbnidffg<br> successors: { }</pre><p>I tried to replace </p>
<p>ai_eca with ai_integration_eca<br>
but that did not succeed. I realized there is another error:</p>
<pre>Unexpected error during import with operation create for eca.eca.cpb_01_sec002001: The "ai_eca_execute_chat" plugin does not exist. Valid plugin IDs for Drupal\Core\Action\ActionManager are: ai_integration_eca_execute_embedding, ai_integration_eca_execute_stt, ai_integration_eca_execute_tts, ai_integration_eca_execute_moderation, eca_ai_automator, ai_integration_eca_execute_chat, easy_email_send, eca_preconfigured_action:automator_chain_delete_action, eca_preconfigured_action:contact_message_delete_action, eca_preconfigured_action:media_delete_action, eca_preconfigured_action:media_publish_action, eca_preconfigured_action:media_save_action, eca_preconfigured_action:media_unpublish_action, eca_preconfigured_action:node_delete_action, eca_preconfigured_action:node_make_sticky_action, eca_preconfigured_action:node_make_unsticky_action, eca_preconfigured_action:node_promote_action, eca_preconfigured_action:node_publish_action, eca_preconfigured_action:node_save_action, eca_preconfigured_action:node_unpromote_action, eca_preconfigured_action:node_unpublish_action, eca_preconfigured_action:redirect_delete_action, eca_preconfigured_action:taxonomy_term_publish_action, eca_preconfigured_action:taxonomy_term_unpublish_action, eca_preconfigured_action:user_add_role_action.administrator, eca_preconfigured_action:user_add_role_action.content_editor, eca_preconfigured_action:user_block_user_action, eca_preconfigured_action:user_cancel_user_action, eca_preconfigured_action:user_remove_role_action.administrator, eca_preconfigured_action:user_remove_role_action.content_editor, eca_preconfigured_action:user_unblock_user_action, eca_list_compare, eca_sharedtempstore_write, eca_list_remove, eca_privatetempstore_write, eca_token_set_value, eca_lock_acquire, eca_list_delete_data, eca_count, eca_state_write, eca_keyvalueexpirablestore_delete, eca_keyvalueexpirablestore_read, eca_warning_message, eca_set_tool_output, eca_privatetempstore_delete, eca_set_eca_log_level, eca_keyvaluestore_write, eca_token_set_random_value, eca_trigger_custom_event, eca_sharedtempstore_delete, eca_token_set_context, eca_error_message, eca_keyvaluestore_read, eca_translate, eca_state_read, eca_list_add, eca_sharedtempstore_read, eca_privatetempstore_read, eca_set_field_widget_value, eca_list_save_data, eca_token_replace, eca_void_and_condition, eca_keyvaluestore_delete, eca_keyvalueexpirablestore_write, eca_config_read, eca_config_action, eca_config_write, eca_list_add_entity, eca_set_field_value, eca_content_set_form_display, eca_trigger_content_entity_custom_event, eca_get_bundle_list, eca_get_default_field_value, eca_save_entity, eca_diff_entity, eca_token_load_entity_ref, eca_delete_entity, eca_token_load_entity, eca_new_entity, eca_set_new_revision, eca_clone_entity, eca_list_remove_entity, eca_get_field_value, eca_content_validation_error, eca_get_entity_type_list, eca_set_view_mode, eca_write_log_message, eca_token_load_route_param, eca_throw_exception, eca_token_load_query_arg, eca_apply_recipe, eca_project_browser_source_plugin_info_alter, eca_enqueue_task_delayed, eca_enqueue_task, eca_render_alter_link_set_title, eca_render_alter_link_set_language, eca_render_dropbutton, eca_render_markup, eca_render_alter_link_add_class, eca_render_alter_breakpoint, eca_render_alter_link_add_query_argument, eca_render_cacheability, eca_render_alter_link_set_url, eca_render_entity_view_field, eca_render_entity_view, eca_render_image:image, eca_render_alter_link_set_absolute, eca_render_add_class, eca_render_lazy, eca_render_entity_form, eca_render_custom_form, eca_render_responsive_image:responsive_image, eca_render_alter_link_set_text, eca_render_set_weight, eca_render_twig, eca_render_build, eca_render_alter_link_add_attribute, eca_get_active_theme, eca_render_link, eca_set_active_theme, eca_render_details, eca_render_text:filter, eca_render_views:views, eca_render_file_contents, eca_tamper:country_to_code, eca_tamper:entity_finder, eca_tamper:url_decode, eca_tamper:cast_to_int, eca_tamper:find_replace, eca_tamper:word_count, eca_tamper:html_entity_encode, eca_tamper:number_format, eca_tamper:math, eca_tamper:find_replace_multiline, eca_tamper:keyword_filter, eca_tamper:default_value, eca_tamper:skip_on_empty, eca_tamper:str_pos, eca_tamper:absolute_url, eca_tamper:encode, eca_tamper:required, eca_tamper:trim, eca_tamper:strip_tags, eca_tamper:strtotime, eca_tamper:rewrite, eca_tamper:aggregate, eca_tamper:implode, eca_tamper:state_to_abbrev, eca_tamper:sprintf, eca_tamper:html_entity_decode, eca_tamper:explode, eca_tamper:unique, eca_tamper:copy, eca_tamper:convert_case, eca_tamper:truncate_text, eca_tamper:url_encode, eca_tamper:str_pad, eca_tamper:convert_boolean, eca_tamper:find_replace_regex, eca_tamper:transliteration, eca_tamper:array_filter, eca_tamper:timetodate, eca_tamper:hash, eca_tamper:str_len, eca_switch_service_account, eca_new_user, eca_token_load_user_current, eca_get_preferred_langcode, eca_switch_account, eca_switch_back, eca_views_query_substitution, eca_views_export, eca_views_set_filter_value, eca_views_query, node_promote_action, node_make_unsticky_action, node_make_sticky_action, node_unpromote_action, redirect_delete_action, user_cancel_user_action, user_add_role_action, user_remove_role_action, user_unblock_user_action, user_block_user_action, eca_form_add_container_element, eca_form_field_disable, eca_form_state_get_property_value, eca_form_add_textfield, eca_form_set_method, eca_form_set_action, eca_form_field_set_weight, eca_form_add_ajax, eca_form_field_get_options, eca_form_field_get_default_value, eca_form_get_errors, eca_form_field_access, eca_form_state_set_property_value, eca_form_build_entity, eca_form_field_set_label, eca_form_add_hiddenfield, eca_form_field_default_value, eca_form_add_group_element, eca_form_add_optionsfield, eca_form_add_submit_button, eca_form_field_add_state, eca_form_field_set_error, eca_form_state_set_rebuild, eca_form_field_set_value, eca_form_field_get_value, eca_form_field_require, eca_form_field_set_options, eca_form_state_set_redirect, pathauto_update_alias, entity:save_action:block_content, entity:save_action:easy_email, entity:save_action:file, entity:save_action:media, entity:save_action:menu_link_content, entity:save_action:node, entity:save_action:taxonomy_term, entity:save_action:user, action_message_action, entity:unpublish_action:block_content, entity:unpublish_action:media, entity:unpublish_action:menu_link_content, entity:unpublish_action:node, entity:unpublish_action:path_alias, entity:unpublish_action:redirect, entity:unpublish_action:taxonomy_term, entity:unpublish_action:paragraph, entity:publish_action:block_content, entity:publish_action:media, entity:publish_action:menu_link_content, entity:publish_action:node, entity:publish_action:path_alias, entity:publish_action:redirect, entity:publish_action:taxonomy_term, entity:publish_action:paragraph, action_goto_action, entity:delete_action:automator_chain, entity:delete_action:contact_message, entity:delete_action:media, entity:delete_action:node, action_send_email_action, message_delete_action</pre><p>So I also changed</p>
<p> Line 131: id: ai_eca_execute_chat_1ith97f -> id: ai_integration_eca_execute_chat_1ith97f<br>
Line 144: ai_eca_execute_chat_1ith97f: -> ai_integration_eca_execute_chat_1ith97f:<br>
Line 146: plugin: ai_eca_execute_chat -> plugin: ai_integration_eca_execute_chat</p>
<p>Then at least I get the ECA model to display. But the chat action has unknown component. Pl, see screenshot.</p>
<h4 id="summary-steps-reproduce">Steps to reproduce</h4>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<h3 id="summary-remaining-tasks">Remaining tasks</h3>
<h3 id="summary-ui-changes">User interface changes</h3>
<h3 id="summary-api-changes">API changes</h3>
<h3 id="summary-data-model-changes">Data model changes</h3>
issue