2014-10-16 27 views
0

我試着去用戶下面的代碼來完成的jBPM任務:使用參數Jbpm的完成任務 - 地圖是空

private static RemoteRestRuntimeEngineFactory restSessionFactory = null; 
    private static RuntimeEngine engine = null; 
    private static KieSession ksession = null; 
    private static TaskService task = null; 

    public static void main(String[] args) { 
     try { 
      restSessionFactory = RemoteRestRuntimeEngineFactory.newRestBuilder() 
        .addUrl(new URL("http://localhost:8080/jbpm-console")) 
        .addDeploymentId("jbpm:formularios:1.2") 
        .addUserName("admin") 
        .addPassword("admin").buildFactory(); 
     } catch (InsufficientInfoToBuildException e) { 
      e.printStackTrace(); 
     } catch (MalformedURLException e) { 
      e.printStackTrace(); 
     } 

     engine = restSessionFactory.newRuntimeEngine(); 

     ksession = engine.getKieSession(); 
     task = engine.getTaskService(); 

     Map<String,Object> map = new HashMap<String,Object>(); 
     map.put("name", "mary"); 
     map.put("age", "23"); 
     task.complete(271, "admin", map); 
    } 

林只有這種依賴性:

<dependency> 
    <groupId>org.kie.remote</groupId> 
    <artifactId>kie-remote-client</artifactId> 
    <version>6.2.0.Beta3</version> 
</dependency> 

的TAKS不完整問題,但參數是空的;

然後我試圖使用「郵差」(瀏覽器插件)做下面的帖子:

localhost:8080/jbpm-console/rest/task/249/complete?map_name=mary&map_idade=23 

和任務完全沒有問題,但與參數。

如果我開始一個新的進程:

localhost:8080/jbpm-console/rest/runtime/jbpm:formularios:1.0/process/formularios.isluis/start?map_nome=mary&map_idade=23 

過程開始用正確的參數。

進出口使用Jbpm的控制檯6.1

我這麼想???

回答