[jboss-user] [jBPM] - Re: How to update the process variable instances values dynamically in audit logs.
Lingaiah Sundari
do-not-reply at jboss.com
Thu Aug 9 07:08:10 EDT 2012
Lingaiah Sundari [https://community.jboss.org/people/lingaiah.sundari] created the discussion
"Re: How to update the process variable instances values dynamically in audit logs."
To view the discussion, visit: https://community.jboss.org/message/752801#752801
--------------------------------------------------------------
Hi https://community.jboss.org/people/swiderski.maciej *Maciej Swiderski*,
Thank you very much.
I would like to update the process params in audit logs ( VariableInstanceLog) , While starting the process the initial param value is inserted into audit logs , but in process update of the same param in the action script or drools, the reset value is not updated in the audit logs.
My aim is to update the process status in the VariableInstanceLog audit log . I am using H2 in memory database, I am not sure any costraint with data base.
While starting the process the initial param value is inserted into data base , but changed param value in progress process is not updated in audit log.
I' have started the process using below code: in middle of the process the param value is changed but it is not updated in the audit log end of the process. But the changed value is availabke in WorkflowProcessInstance instance.
**if** (action.equals("CreateProcess")) {
UserTransaction ut = (UserTransaction)
**new** InitialContext().lookup( "java:comp/UserTransaction" );ut.begin();
**new** JPAWorkingMemoryDbLogger (ksession);
KnowledgeRuntimeLoggerFactory.+newConsoleLogger+(
ksession);
ksession.getWorkItemManager().registerWorkItemHandler("Log", **new** SystemOutWorkItemHandler());
ksession.getWorkItemManager().registerWorkItemHandler(
"Email", **new** EmailWorkItemHandler("20.139.68.11","86400","lsundari","Shiva at 2012"));
//ksession.getWorkItemManager().registerWorkItemHandler("Human Task", new WSHumanTaskHandler());
CustomerProfile customerProfile =
**new** CustomerProfile(request.getParameter("fName"),request.getParameter("lName"),Integer.+parseInt+(request.getParameter("age")),Integer.+parseInt+(request.getParameter("aLimit")),Integer.+parseInt+(request.getParameter("mSalary")),request.getParameter("eMail"),"TODO","TODO");Map<String, Object> params =
**new** HashMap<String, Object>();params.put(
"customerProfile", customerProfile);params.put(
"employee", "lingaiah");params.put(
"reason", "CC Review Process");
ksession.startProcess("com.sample.bpmn.creditcardissueprocess",params);Thread.+sleep+(200);
ksession.fireAllRules();Thread.+sleep+(200);
ut.commit();
//logger.dispose();
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/752801#752801]
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/20120809/35239b4d/attachment.html
More information about the jboss-user
mailing list