简体   繁体   English

聊天机插件部署后,Fiori启动板变得无法响应

[英]Fiori launchpad becomes unresponsive after chatbot plugin deployment

We have developed chatbot functionality for our on-premise ERP using Recast.AI. 我们使用Recast.AI为我们的内部部署ERP开发了聊天机器人功能。

Basically, we have deployed a plugin on the On-Premise Fiori launchpad using the following code; 基本上,我们使用以下代码在On-Premise Fiori启动板上部署了一个插件; However the Fiori launchpad freezes after the chatbot launches and we cannot execute anything on the Fiori Launchpad. 然而,在聊天机器人启动后,Fiori启动板冻结,我们无法在Fiori Launchpad上执行任何操作。 The options in SAP Note 2544600 haven't helped us. SAP Note 2544600中的选项对我们没有帮助。 Any idea, what could be the issue? 任何想法,可能是什么问题?

Regards, 问候,

Karan 卡兰

sap.ui.define([
"sap/ui/core/UIComponent",

], function (UIComponent) {
"use strict";


return UIComponent.extend("com.abc.chatbot.Component", {

    /**
     * The component is initialized by UI5 automatically during the startup of the app and calls the init method once.
     * @public
     * @override
     */
    init: function () {
        // call the base component's init function
        UIComponent.prototype.init.apply(this, arguments);
        var renderer = sap.ushell.Container.getRenderer("fiori2");
        if (!document.getElementById("recast-webchat")) {


            var s = document.createElement("script");
            s.setAttribute("id", "recast-webchat");
            s.setAttribute("src", "https://cdn.recast.ai/webchat/webchat.js");
            //document.body.appendChild(s);
            if (document.body != null) {
                document.body.appendChild(s);
            }
        }
        s.setAttribute("channelId", "abc");
        s.setAttribute("token", "xyz");
    }
});

}); });

The issue is with appendChild; 问题在于appendChild; which makes the launchpad unresponsive. 这使得启动板没有响应。 Not sure what could be the alternative as I have tried various ways such as creating div, fragments as well. 不知道什么可以替代,因为我尝试了各种方法,如创建div,片段。

the webchat has been updated since with a fix for Fiori. 自从Fiori修复后,网络聊天已经更新。 It should now work 它现在应该工作

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM