【问题标题】:JBPM Workflow not moving forward after Human TaskJBPM 工作流在人工任务之后没有向前推进
【发布时间】:2015-04-23 14:48:40
【问题描述】:

我正在使用 jBPM 6.2.0。我有一个包含用户任务的小工作流。 我正在尝试通过 Java 客户端使用远程 API 完成任务。

以下是使用的代码。

TaskService taskService = connManager.getTaskService("admin", "admin");
taskService.start(4, "admin");

taskService.complete(4, "admin", null);

以及相关的方法。

private RemoteRuntimeEngine getRuntimeEngine(String deployment, String user,
        String password) throws MalformedURLException {
    URL deploymentUrl = new URL("http://localhost:8080/jbpm-console/");
    return (RemoteRuntimeEngine) RemoteRuntimeEngineFactory
            .newRestBuilder().addUrl(deploymentUrl).addUserName(user)
            .addPassword(password).addDeploymentId("").build();
}



public TaskService getTaskService(String user, String password)
        throws MalformedURLException {
    // Establish Connection
    RemoteRuntimeEngine conn = getRuntimeEngine("", user, password);

    TaskService taskServcie = conn.getTaskService();

    return taskServcie;
}

我完成任务后,工作流程没有向前推进。就我而言,以后没有活动,所以我期待工作流程结束。

【问题讨论】:

    标签: java workflow jbpm


    【解决方案1】:

    完成任务时需要指定正确的deploymentId(而不是“”)。这意味着您可以在不指定部署 ID 的情况下查询任务列表等,但要完成它,您需要使用正确的“上下文”。 deploymentId 可以从任务本身中获取。

    请注意,我们已经对 master 进行了一些改进,以确保如果您事先不知道 deploymentId 并且希望我们为您查找,您实际上可以传递 null 或 ""。但对于 6.2.0.Final,您仍然需要自己查找。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-07-06
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多