0

我已经使用本地服务集成JBPM 5.4了。Spring Framework 3.x.x我的 Web 应用程序运行成功。我LocalHTWorkItemHandler用来启动、执行、暂停或完成人工任务。

但我的问题是如何向用户显示与任务关联的表单。我可以通过调用 REST API 来做这件事/gwt-console-server/rs/form/task/{id}/render。但是如何检索表单并将其集成到我的SpringMVC应用程序的视图中?

4

2 回答 2

0

I believe you use Guvnor for storing your assets (process-definition, rules, etc).By default the task's form is stored by the name "TaskName-taskform" in guvnor.

You can use the rest services exposed by the Guvnor and read the form's source.

I believe that is how TaskFormDispatcher ,as mentioned by Kris, gets the form source.

Ex. The source of a task named "UpdateComments" in package "HR" will be

 http://guvnorserver:8080/drools-guvnor/rest/packages/HR/assets/UpdateComments-taskform/source
于 2013-04-10T07:53:11.977 回答
0

您可以使用 jBPM 控制台提供的内容作为 REST 服务的一部分,但如果您想要在自己的应用程序中更集成的东西,您可以自己渲染任务表单,它们是简单的 freemarker 模板,任务数据被注入其中。例如看一下这个类(以及同一个包中的其他类): https ://github.com/droolsjbpm/jbpm/blob/5.4.0.Final/jbpm-gwt/jbpm-gwt-form/src/主/java/org/jbpm/integration/console/forms/TaskFormDispatcher.java

于 2013-03-23T23:11:44.327 回答