[jboss-user] [jBPM] - Variables from ended process ...

Jaber C. Mourad do-not-reply at jboss.com
Thu Jun 17 12:01:55 EDT 2010


Jaber C. Mourad [http://community.jboss.org/people/newbeewan] replied to the discussion

"Variables from ended process ..."

To view the discussion, visit: http://community.jboss.org/message/548548#548548

--------------------------------------------------------------
Hi,

To get history variable i'm using that code using the processInstanceId :
      public Map<String, Object> getHistoryProcessInstanceVariable(String processInstanceId) {
            Set<String> variableNames = historyService.getVariableNames(historyProcessInstanceId);
            return historyService.getVariables(processInstanceId, variableNames);
      }


In my test :
HistoryProcessInstance historyProcessInstance = processInstanceService.getHistoryProcessInstanceById(processInstance.getId());
            assertEquals(historyProcessInstance.getState(), "ended" );
            Map<String, Object> historyVariables = processInstanceService.getHistoryProcessInstanceVariable(historyProcessInstance.getProcessInstanceId());
            assertNotNull(historyVariables);
            assertFalse(historyVariables.isEmpty());


In my service, to create my variables (I change the code to be sure that I'm using the processInstanceId) :

String processInstanceId = executionService.findProcessInstanceById(taskService.getTask(taskId).getExecutionId()).getId();
executionService.createVariables(processInstanceId, variables, true);


But nothing better  :( 

Any Idea ?

--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/548548#548548]

Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100617/81132ef5/attachment.html 


More information about the jboss-user mailing list