如何使用 camunda 嵌入式 REST 和 Spring 加载表单? [英] How to load a form with camunda embedded REST and Spring?

查看:291
本文介绍了如何使用 camunda 嵌入式 REST 和 Spring 加载表单?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在

这是我的简单过程,我希望在第一个用户任务开始时加载表单.我在哪里配置资源?我没有使用带有 Web 界面(驾驶舱、任务列表等)的 camunda 嵌入式 tomcat,只是一个普通的 tomcat,我在其中部署了 .WAR 文件.我的 .html 文件也不是用 camunda 表示法编写的,它也只是一个普通的 html 文件.我将embedded:deployment:forms/request-loan.html 放在formKey 中,但它也不起作用.

有人有想法吗?我想这只是某处的一行代码,我必须添加它以便请求正确的资源并打开我的表单.这是我的项目结构的样子

谢谢!

解决方案

要使表单工作,您必须提供 ProcessApplication 和一个(空的)META-INF/processes.xml.

要么使用 ServletProcessApplication 作为基类,要么确保您的流程应用程序正确设置了 context-path 属性:

properties.put(PROP_SERVLET_CONTEXT_PATH, contextPath);

I took the project at https://github.com/camunda/camunda-bpm-examples/tree/master/deployment/embedded-spring-rest and tried to load a html form which I made and included in the src/main/webapp/forms folder. Now I want simply to load the form when a specific process starts. I tried several things including @RequestMappping annotation but I always got the same link when the process started saying that the resource is not available:

http://localhost:8080/camunda-quickstart-embedded-spring-rest/WEB-INF/classes/org/camunda/bpm/example/loanapproval/Starter.java

This is my simple process and I want the form to be loaded when the first user task starts. Where do I configure the resources? I am not using camunda embedded tomcat with the web interface (cockpit, tasklist, ...), just a plain tomcat where I deployed the .WAR file. My .html file is also not written in camunda notation, it's also just a plain html file. I put embedded:deployment:forms/request-loan.html in the formKey but it also doesn't work.

Does anybody have an idea? I guess it is just one line of code somewhere, that I have to add so that the right resource is requested and my form opens. This is how my project structure looks like

Thank you!

解决方案

To make forms work, you will have to provide a ProcessApplication and an (empty) META-INF/processes.xml.

Either use the ServletProcessApplication as a base class or make sure that your process-application sets the context-path property correctly:

properties.put(PROP_SERVLET_CONTEXT_PATH, contextPath);

这篇关于如何使用 camunda 嵌入式 REST 和 Spring 加载表单?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆