Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Adam P

Pages: [1]
1
Quote
Back to business :)

The record actually contains the time stamp:
Quote
User="Adam" DateTime="2015-01-19 10:13:51"
Just decode Bincontent1 using base64 (you can do that with Notepad++) and unzip the result. Inside is a str.dat file which contains the information in XML format.

q.

I got the code working last night to base64 decode, unzip and inflate the BinContent section. Thanks again for the help -- is there someplace I can share this code for the benefit of others?

q: As I'm looking at the Notes section of the audits, it's not entirely clear what all the different fields are supposed to mean in different circumstances. Do you have any thoughts / documentation about the Audit Notes field?

2
Unzipping binContent to get at the XML content is turning out to be a total nightmare. Anyone have any tricks or tips about how to do this from JScript?

3
Wow, I certainly would have never found that. Thanks a million.

The reason behind all this is that I have created a rather complex data mapping model which is providing field-level mapping from multiple source databases, through an enterprise services bus (ESB), to a central database. This creates thousands of attribute-to-attribute connectors that need to be communicated with various parts of the team (e.g. - the engineers that are implementing the ESB code, data modelers, etc.) which is currently being done through a script that creates a CSV of all the data mappings.

The team needs a "last modified" timestamp to see what has been updated since the last version of the data mapping document.

As a follow-on question: I'm implementing this as a JScript under EA so that it is more maintainable and easier for people after me to run it without installing an external development environment. I'm now going to need to load an unzip library to get at the contents of BinContent1. Is there any way to load a JavaScript library such as zip.js from within a EA JScript? e.g. - http://gildas-lormeau.github.io/zip.js/fs-api.html

4
Thanks. Is the t_snapshot table the right table to query for audits logs? I don't see any timestamp in that table, unless it is hidden in the binary blobs.

Here's an example of the XML I am getting back from t_snapshot:
http://codebin.org/view/b5ebdbf2

5
I am trying to get a "LastModified" time for connectors in my model. I have turned on Auditing and can see the modification dates in the Audit Log, but I would like to output that data programmatically.

How do I go about getting Audit data out of the repository and / or database? I see a mention in Thomas's book about the t_snapshot table -- is the best route to do a SQLQuery() to find the GUID and modification dates in that table?

6
Thanks. Do you have a link to JSON2.js?

7
I'm trying to use JSON.stringify in JScript, but when I call the function I get the error "JSON is undefined". The MSDN documentation for JScript says that the JSON object is a built-in and can't be created using a new call:
http://msdn.microsoft.com/en-us/library/cc836458%28v=vs.84%29.aspx

Is the JSON object not included in EA?

8
After installing the Microsoft Script Debugger that works.

Thanks again, I really appreciate the help.

9
Thanks again, looks like I'm getting closer. I now get the error "Failed to create object from CLSID". I tried both "Scripting.FileSystemObject" and ""{0D43FE01-F093-11CF-8940-00A0C9054228}" (which is the CLSID for Scripting.FileSystemObject). I also confirmed that the CLSID is in the registry and associated with Scripting.FileSystemObject and scrrun.dll, and that scrrun.dll is in the Windows\System32 folder.

Can someone else drop these lines into a new JavaScript file and see if it works for them?

      var fs = new COMObject ("Scripting.FileSystemObject")
      var fs = new COMObject ("{0D43FE01-F093-11CF-8940-00A0C9054228}")

Any other suggestions from the pros on ways to write to a file from JavaScript or get COM to work?

Thanks again.

10
Thanks, that produces the error "CreateObject is not defined" (and a similar error with ActiveXObject). Is there some package I have to import?

11
Automation Interface, Add-Ins and Tools / JavaScript: Writing to File?
« on: January 15, 2015, 08:54:54 am »
Is there any way to write to a file using JavaScript / JScript from EA?

Pages: [1]