Question
Pegasystems Inc.
JP
Last activity: 16 Feb 2017 3:19 EST
How to save history record in History-Data-Admin-Operator-ID class when operator instance is saved by activity
Hi,
I am creating a workflow where end user can update Operator ID profile. When workflow is completed, I am running an activity to save OperatorID page that was input from UI into database. It is working fine except for Operator's history. When we save Operator record from Designer Studio, PRPC automatically adds an record in History-Data-Admin-Operator-ID class (physically pr_history_data table) with history memo of "Saved this record" and I want to do the same in my activity. I am simply calling Data-Admin-Operator-ID.Save but I believe I need to call some other out-of-the-box activity as well. What is the name of activity? I traced activities that get run when Operator ID is saved in Designer Studio but I could not find something special. Please see attached for my code.
Thanks,
***Updated by moderator: Lochan to update Categories***
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Pegasystems Inc.
JP
Since we need to complete this development in a day or two, we are not creating an SR for this. I handled this by my local change workaround (copy to an intermediate top page from embedded page just for this). This is technically a product defect but I hope someone finds workaround from this post.
Thanks,
Pegasystems Inc.
US
Hello,
By default all the corresponding Save activities will have the History-Add method in it to save the history of the saved record, i had cross checked the Data-Admin-Operator-ID.Save activity in v7.2.2 and it contains the History-Add method in it as shown in attachment.
If you are working in different version then you can use the History-Add method in activity or History_Add activity which is available in parent class i.e. Data-
Hope this might be helpful to resolve your issue.
Regards
Mahesh
Pegasystems Inc.
JP
Data-Admin-Operator-ID.Save activity has parameter of "HistoryMemo" but when I pass String it is written to the History Work class (History-MyCo-MyApp-Work), not History-Data-Admin-Operator-ID class. PRPC should have a whole mechanism that adds records automatically in History Operator table when Operator ID is created or saved, and this mechanism automatically includes the entire snapshot of page. What I want is to call this entire mechanism somehow, not just History-Add.
Thanks,
Pegasystems Inc.
US
Hello,
In tracer i had noticed the Primary Page class for the History-Add method is Data-Admin-Operator-ID in Save activity when i tried to update an operator normally, could you look into the document attached and try accordingly.
Regards
Mahesh
Pegasystems Inc.
JP
I traced my activity and found History-Add's Primary Page Class is "Data-Admin-Operator-ID". However it is saving record in History of Work class, and it is NOT saving anything in History-Data-Admin-Operator-ID class. I also tried in a separate step adding History-Add method with the same step page but the result was the same. For step page, I am setting a Single Page property (class of Data-Admin-Operator-ID) but is this wrong?
Pegasystems Inc.
US
Hi,
Could you enable the debug for the DB Queries in tracer settings then run the usecase and share the saved tracer file for further analysis.
Regards
Mahesh
Pegasystems Inc.
JP
Thanks for your suggestion. I have just sent you the tracer output xml file for my activity with DB Query enabled. Please let me know if you find anything.
Thanks,
Pegasystems Inc.
IN
Hello!
Do you mind attaching the tracer file on this thread for the benefit of the community?
Regards,
Lochan | Community Moderator | Pegasystems Inc.
Pegasystems Inc.
JP
How can I do that? I tried but it seems xml extension is not allowed.
Allowed file types: txt pdf doc docx ppt pptx xls xlsx jpg png gif.
Pegasystems Inc.
IN
Hello!
Would it be possible to import the tracer content from xml to a word doc?
Regards,
Lochan
Pegasystems Inc.
JP
Okay, please see attached for the doc file. If you rename the extension from .doc to .xml, it should be readable by Tracer tool.
[Before]SaveSORActivityTracerOutputWithDBQuery.doc
[After]SaveSORActivityTracerOutputWithDBQuery.xml
Pegasystems Inc.
US
Hello,
Thanks for sharing the requested information. Today i had created a similar use case at my end and tried with call pxUpdateRecord activity by passing the step page of type Data-ADMIN-Operator-ID and its working fine.
Note: pxUpdateRecord will act as a create/update functionality based on the available of the existing record in your activity.
Kindly go through the use case created at my end in the attachment and let me know if it resolved your issue.
Regards
Mahesh
Pegasystems Inc.
JP
Can you please try embedded Single Page for your step page, instead of top page to see if that works as well. In my case, I copied embedded page into top page and that worked. However I believe embedded Single Page should work as well. Please see my workaround solution in the attached. Isn't this a product defect?
Thanks,
Pegasystems Inc.
US
Hello,
I had tried to use the embedded page property in the step name of the activity and its not able to save the history into the pr_history_data table, infact i am facing error when i am using Embedded page property as step page while saving history.
If you are not satified with the local change suggested and needs more investigation to be done you can go ahead and raise an SR for our further investigation.
Regards
Mahesh
Pegasystems Inc.
IN
Hello!
Do let us know if you do log an SR for this and its ID. That way we can track it and follow-up this discussion with the resolution.
Regards,
Lochan | Community Moderator | Pegasystems Inc.
Accepted Solution
Pegasystems Inc.
JP
Since we need to complete this development in a day or two, we are not creating an SR for this. I handled this by my local change workaround (copy to an intermediate top page from embedded page just for this). This is technically a product defect but I hope someone finds workaround from this post.
Thanks,
-
Jaikishan Sridhar