Spring 3.2.5 集成 Activiti Modeler 5.17.0

Activiti 5.17.0Modeler上做了很大的变化,集成比以前貌似简单些,参考集成activiti 5.16.4modeler,完成集成。

1、下载Activiti 5.17的源代码

2、复制Activiti Modeler相关的组件依赖到pom.xml(注意:更新com.fasterxml.jackson.databind的版本为2.4.4,否则保存时报错,但不影响使用)

3、在Spring-Activiti.xml中增加以下bean的申明。

<!-- json处理 -->

   <beanid="objectMapper"class="com.fasterxml.jackson.databind.ObjectMapper"></bean>

<!-- Rest处理 -->

   <beanid="restResponseFactory"class="org.activiti.rest.service.api.RestResponseFactory"></bean>

   <beanid="contentTypeResolver"class="org.activiti.rest.common.application.DefaultContentTypeResolver"></bean>

4、将modules\activiti-webapp-explorer2\src\main\webapp\edtior-app整个目录拷贝到工程的webapp/workflow

5、将modules\activiti-webapp-explorer2\src\main\webapp\modeler.html文件拷贝到工程的webapp/workflow

6、修改edtior-app/app-cfg.js中的contextRoot为自己的工程目录。

7、修改editor-app\editor\oryx.debug.js中的config部分,和自己存放modeler的路径一致:

ORYX.CONFIG.APP_PATH=                               "/XXX";

ORYX.CONFIG.ROOT_PATH=                            ORYX.CONFIG.APP_PATH+ "/workflow/editor-app/editor"; //TODO: Remove last slash!!

ORYX.CONFIG.EXPLORER_PATH=                           ORYX.CONFIG.APP_PATH+ "/workflow/editor-app/explorer";

ORYX.CONFIG.LIBS_PATH=                              ORYX.CONFIG.APP_PATH+ "/workflow/editor-app/libs";

 

/**

 * Regular Config

 */  

ORYX.CONFIG.SERVER_HANDLER_ROOT=     ORYX.CONFIG.APP_PATH;

ORYX.CONFIG.SERVER_EDITOR_HANDLER=  ORYX.CONFIG.SERVER_HANDLER_ROOT +"/editor";

ORYX.CONFIG.SERVER_MODEL_HANDLER=   ORYX.CONFIG.SERVER_HANDLER_ROOT +"/model";

其他类似。

8、在模型发布的时候,需要指定编码字符集为GBK,否则相关中文都是乱码。如下:

BpmnModel model =new BpmnJsonConverter().convertToBpmnModel(modelNode);

  byte[] bpmnBytes =newBpmnXMLConverter().convertToXML(model,"GBK");


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 10
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 10
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值