如何配置露天平台以运行脚本任务

编程入门 行业动态 更新时间:2024-10-27 19:27:25
本文介绍了如何配置露天平台以运行脚本任务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在尝试在露天流程服务中运行脚本任务,而在编译脚本时,控制台中会抛出一些错误,例如:

I am trying to run a script task in alfresco process services, while compiling the script there were some error throw out in the console as like:

控制台无法运行'javascript'

the console couldn't run 'javascript'

var x=5; var y=5; var xy=x*y; document.write("The result is"+xy);

我希望结果为 25 脚本编译后在控制台中打印。谁能帮助我解决问题?

I expect the result as 25 that could be print in the console after the compilation of the script. Can anyone help me to resolve the issue?

推荐答案

您在哪里/如何运行该代码?您有具体的错误吗?

Where/how are you running that code? Do you have a concrete error?

很可能文档被识别为根对象,因此写入方法失败。如果我的理论是正确的,只需注释掉该行或将其替换为 logger(另一个根对象)即可解决此问题。

Most probably the "document" gets recognized as a root object, so the "write" method fails. If my theory is true, simply commenting that line out or replacing it with "logger" (another root object) will solve the issue.

docs.alfresco/4.1/references/API-JS-rootscoped.html

编辑:现在,我意识到您指定了一个脚本任务。 我相信我的理论仍然有用,但是可用的根对象并不相同。

Now I realize you specified a Script Task. I believe my theory is still relevant, however, root objects available are not the same.

docs.alfresco/5.1/references/API-JS-WorkflowService.html

更多推荐

如何配置露天平台以运行脚本任务

本文发布于:2023-11-24 08:23:19,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1624463.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:露天   脚本   平台

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!