[jboss-user] [jBPM] - jBPM-4.4 Unable to save Process Variable History
Santosh Singh
do-not-reply at jboss.com
Thu Sep 27 07:20:26 EDT 2012
Santosh Singh [https://community.jboss.org/people/santoshsingh] created the discussion
"jBPM-4.4 Unable to save Process Variable History"
To view the discussion, visit: https://community.jboss.org/message/761889#761889
--------------------------------------------------------------
Hello Everyone,
I have requirement where i need to show tracking of an workflow. However history for task, Activity, Process intances are saved into corresponding history tables.
But while browsing through JBPM4_HIST_VAR table , i am unable to get ani information about process variables.
please see the following code.
ProcessInstance pInstance =
executionService
Map<String, Object> params = new HashMap<String, Object>();
params.put("SubmittalCoordinator", "HO-DWG");
params.put("CivilDepartment", "HO-CIVIL");
params.put("MechanicalDepartment", "HO-MECH");
ProcessInstance pInstance = executionService.startProcessInstanceByKey("workflowStatus", params);
executionService.setVariable(pInstance.getId(), "ProcessInstanceId", "workflowStatus");
repositoryService.createDeployment().addResourceFromClasspath("insight/abg/jbpm/workflowStatus.jpdl.xml").setName("workflowStatus").deploy();
ProcessInstance pInstance = executionService
.startProcessInstanceByKey(instanceKey, params);
executionService.setVariable(pInstance.getId(), "ProcessInstanceId", pInstance);
((ExecutionImpl)pInstance).createVariable("someString", "SomeString","string",true);
Variable variable = ((ExecutionImpl)pInstance).getVariableObject( "SomeString");
HistoryEvent.fire(new VariableCreate(variable));
// EnvironmentImpl environment = ((EnvironmentFactory) processEngine).openEnvironment();
// try {
// ((ExecutionImpl)pInstance).createVariable("someString", "SomeString","string",true);
// Session session = environment.get(Session.class);
// Transaction tx = session.beginTransaction();
// session.update(pInstance);
// tx.commit();
// } finally {
// environment.close();
// }
While debugging I am able to see data in variable object, but it is not getting save in JBPM4_HIST_VAR table.
Can anyone help me?
Thanks in advance .
Regards,
Santosh
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/761889#761889]
Start a new discussion in jBPM at Community
[https://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/20120927/ab71e758/attachment-0001.html
More information about the jboss-user
mailing list