0 Replies Latest reply on Apr 3, 2015 2:00 PM by Burt Repine

    Retrieving output from a process thru Remote API

    Burt Repine Newbie

      Hello,

       

      I'm quite new to jBPM.

      We're attempting to implement jBPM 6.2.0.Final as a service and I am currently trying to invoke a process thru the Remote API and then retrieve its output.

      Can anyone point me to an example of this?

       

      I'm able to do this thru successfully the Java API via:

       

      ...
      KieSession kSession = kContainer.newKieSession();
      
      Map<String, Object> params = new HashMap<String, Object>();
      params.put("input", "someData");
      ProcessInstance processInstance = kSession.startProcess("com.sample.bpmn", params);
      List myList = (ArrayList) ((WorkflowProcessInstance) processInstance).getVariable("output");
      

       

      I tried similar thru the REST API but there is no "getVariable" operation on the JaxbProcessInstanceResponse:

       

      ...
      RuntimeEngine engine = RemoteRuntimeEngineFactory.newRestBuilder()
                      .addDeploymentId(deploymentId)
                      .addUrl(baseUrl)
                      .addUserName(user)
                      .addPassword(password)
                      .build();
      KieSession ksession = engine.getKieSession();
      Map<String, Object> params = new HashMap<String, Object>();
      params.put("input", "someData");
      JaxbProcessInstanceResponse processInstance = (JaxbProcessInstanceResponse) ksession.startProcess("com.sample.bpmn", params);
      

       

      Am I on the right track?
      Thank you.