Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Audit log entry into custom table

Status
Not open for further replies.

scnuser

Technical User
Jun 16, 2015
10
IN
Hi,

Can I orphan LLIAPI:LLIAPI Root: AuditEvent and implement my own logic in AuditSubclassPre method to manipulate the data being stored in the DAuditNew table? will this new inplemented custom logic in my module will trigger for all the event action in Content server?

When i kept a break point in LLIAPI:LLIAPI Root: AuditEvent, the break point triggers, when i keep breakpoint in my implemented logic it is not stopping?

Is there any other way to add or manupalate the data being stored when an event is triggered?


Thanks & Regards
 
When I look at the code each AuditEvent is actually made into a useful mecahnism by Orphaning LLIAPI:LLIAPI Root: AuditEvent
so the Add Version audit event is a temp object of this with ID=11.If you actually put ID=11 then the Add Version will obey whta you put in that code segment.
Registration is done by ID The LLIAPI:LLIAPI Root: AuditEvent is kind of like a Shell and its registration methods are by ID.
Since already these events are being put into the database in a convenient fashion why would you need to intercept this and do things with it?
Ideally you want a callback when a particular audit event occurs that is what I think you are aiming,I am not sure if OT gave you that or not

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008,Livelink ECM Champion 2010
 
Hi Appunair,

Thanks for your prompt reply.

Actually my requirement is to keep track of all the changes done for items in a Business Workspace node. Since we directly do not get the child and their sub child node details directly, I am trying this approach. If some how I intercept the audit entry, I can look out for reading the category attributes of that node and make and entry into my custom table. So in my workspace I can add a query on that custom table and show the required audit list.

I know the category attribute used for my business workspace, so I add entries into custom table only if matching category attributes triggers, this way I can restrict entries of other action.

As you suggested, if I get a callback, can I achieve my requirement?

Do suggest any other approach?

Thanks
scnuser
 
The BWS workspace node is a lliapi node so you can create a callback on a event that you are needing to watch.For e.g let's assume that you put a NCB on Create Node of BWS Subtype
As soon as the BWS is created your callback will get its ID.Typically one would store this into a table.Similarly Category attributes offers call backs like Attribute data cahnged pre and post.
So one can foresee a table like this
Dataid Event Status
12345 Create New

since you now have 12345 in your table using Oscript you can find everything about it liek children its attributes etc.



The reason why synchronous cation on callbacks is not preferred is because this gives you more time to act on things otehrwise if you do a lot of processing synnchronously you will make that thread wait more and more and since thes are transcation warpped things if you dont do yours tuff cleanly the BWS creation will be toast.

You can also override the audit event that you are really interested in.

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008,Livelink ECM Champion 2010
 
Hi Appunair,

My requirement is to track all the action performed in a BWS not only only single event. The events which i want to keep track are like
a) Addition of a Folders and Sub folders.
b) Addition of any documents in any folder or sub folder of the BWS.
c) Any operation performed on folders and subfolders access permissions.
d) Any operation(Change/Move/Delete/Add Version) performed on the document in the BWS.
e) Keep track of all the Workflows in the BWS documents and their status.
f) In future if we add any custom event provision to track that as well.

I got your point on the halting the normal process by implementing the NCB, i did not realize that in the first thought. I have to rethink of my approach now.

So if i go with implementing the NCB, first i need to pick for which all actions i need to capture and implement their NCB to make an entry in the custom table. Then based on those entries i have to make a query on DAuditNew table.

I need your suggestion on another enhancement in BWS, If i want to add any custom button which only visible in a BWS, how can i implement on this? This button should not be visible in any other place except in BWS.

Thanks & Regards
scnuser
 
On your last point I am not sure I understand the Button,you know which file paints the BWS so whatever elements you want on it you can implement the business rule yourself. You may want to look at how webnode,webnode cmd and webnode cation objects work in tandem.A button is kind of like a webnodecmd.OT allows easy interception to put your bsuiness rule if it is a webnode cmd/action pair

Since BWS is a SAP Front Ended thing I am pretty sure that the ABAP or Netweaver code probably has easy hooks as well instead of tackling in oscript.I am not a SAP person
so my ignorance.

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008,Livelink ECM Champion 2010
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top