Activiti在线设计流程编辑器空白永久解决(动态获取项目名称)
收藏
参考博文:https://blog.csdn.net/sundehui01/article/details/53995270
1.修改 app-cfg.js:
[pre]
ACTIVITI.CONFIG = {
'contextRoot' : appContextRoot+'/service'
};
[/pre]
2.把\webapp\act\rest\modeler.html后缀改成jsp,在文件头部插入以下内容:
[pre]
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/webpage/include/taglib.jsp"%>
[/pre]
在103行左右(引入app-cfg.js的前面)插入以下内容:
[pre]
<script type="text/javascript">
var appContextRoot='${pageContext.request.contextPath}';
</script>
[/pre]
把文件末尾定义ctx和ctxStatic的地方改为:
[pre]
<script type="text/javascript">
var ctx = '${pageContext.request.contextPath}${fns:getAdminPath()}',ctxStatic='${pageContext.request.contextPath}/static';
</script>
[/pre]
3.修改 act/rest/editor-app/editor/oryx.debug.js文件:
1782到1784行注释掉,添加一下内容:
[pre]
ORYX.CONFIG.APP_PATH= appContextRoot+"/act";
ORYX.CONFIG.ROOT_PATH = ORYX.CONFIG.APP_PATH+"/editor-app/editor/"; //TODO: Remove last slash!!
ORYX.CONFIG.EXPLORER_PATH = ORYX.CONFIG.APP_PATH+"/explorer";
ORYX.CONFIG.LIBS_PATH = ORYX.CONFIG.APP_PATH+"/editor-app/libs";
[/pre]
4.修改webpage/modules/bpm/model/modelList.js第143行:把modeler.html改成modeler.jsp
以上修改可以使项目部署在ROOT和非ROOT目录下都好用。