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 - motivatedgorilla

Pages: [1] 2 3
1
General Board / SQL query help
« on: July 20, 2014, 11:41:53 pm »
I'm trying to return results similar to the package browser however via SQL however don't quite know how i can display the relationships. My code thus far.  Is there a way for me to do this? I'm running the query against an EAP file.

Code: [Select]
SELECT o.*,p.*
FROM   t_object AS o
INNER JOIN  t_package AS p on o.Package_ID = p.Package_ID
WHERE o.pdata1 IN (
    SELECT o2.pdata1
    FROM t_object AS o2
    )
ORDER BY p.parent_ID ASC


2
General Board / Re: Issues filtering tags that contain dates
« on: May 12, 2014, 01:35:12 pm »
Thanks Simon. How do i resolve the issue?

3
General Board / Issues filtering tags that contain dates
« on: May 10, 2014, 12:12:37 pm »
I'm using an EAP project file and have attempted to filter tags that contain dates. For some odd reason or the other Sparx appears to store dates in 2 formats e.g. 01 May 2014 or 01/05/2014 (DD/MM/YYYY).

The query is as below returns no results even though there are tags that fall within that range

Code: [Select]
SELECT o.ea_guid as CLASSGUID, o.Object_Type as CLASSTYPE,
       o.Name, type.Property, type.Value
FROM ((t_object as o
       INNER JOIN t_objectproperties as location
         ON o.Object_ID = location.Object_ID)
       INNER JOIN t_objectproperties as type
         ON o.Object_ID = type.Object_ID)
WHERE location.Property = 'Location'
  AND location.Value = 'ND'
  AND type.Property = 'FDate'
  AND CDate(type.Value) >= CDate('01/05/2014')
  AND CDate(type.Value) <= CDate('05/05/2014')

4
General Board / Re: Iterate through tagged names and values
« on: March 07, 2014, 11:29:45 am »
Quote
tag is declared and used but not given a value, thisTaggedValue is given a value but not declared, and you're missing a ; on line 3.

Can you give me an example of how i can assign a value to tag and what thisTaggedValue should be declared as?

5
General Board / Iterate through tagged names and values
« on: March 07, 2014, 10:58:15 am »
I am attempting to iterate through a set of tagged values for a given element however unable to execute the code as it displays the error an object is required. I'm probably doing something wrong however am unsure what

Code: [Select]
var theElement as EA.Element;
var tag as EA.TaggedValue;
theElement = Repository.GetElementByID(52)
for ( var i = 0 ; i < theElement.TaggedValues.Count ; i++ )
 {
            thisTaggedValue = theElement.TaggedValues.GetAt(i);
            If (thisTaggedValue.ElementID == tag.ElementID)
            {
                  Session.Output(tag.Value);
            }
            
 }

6
General Board / Re: Is there a way to run scripts on the fly?
« on: February 22, 2014, 04:27:41 am »
Quote
Actually each EA user has full access to the tables. Of course, since without he would not be able to do anything at all. So they can execute a DELETE FROM t_... from any client. The database can't be protected. However, why should any of the modelers do that? Seeking a way to loose the job? The database log will show who was the bad guy easily. And if the repository was clobbered it can easily be restored from wherever the backups went. So what the fuzz?

q.

In my opinion, certain controls should be in place. It's human nature to experiment. What they may consider "testing", "trial", etc may inadvertently cause mishaps. If you are working in a larger organizations, they may expect adherence to certain security policies.

7
General Board / Re: Is there a way to run scripts on the fly?
« on: February 22, 2014, 03:47:54 am »
Quote
This thread prompted me to look again at how we have secured our SQL server instance used by Sparx. At the SQL Server level, i can restrict connections so they are only accept from Sparx.

I can then only grant read only access to a Sparx user (using Sparx security profile).

However as has been highlighted in this thread - there is nothing stopping that user creating a script and running it. If that user knew of a certain hidden method on the repository class they could in theory delete the repository...

I think Sparx should look at adding/removing access to create and run scripts into the security profile...

That raises a good point. If i were to delete a repository using the hidden method, is it captured, logged, etc anywhere whether by Sparx or the RDMS?

8
General Board / Re: Is there a way to run scripts on the fly?
« on: February 20, 2014, 05:12:05 am »
Quote
Oops.. thought they already zeroed in on VBScript / JScript...

Quote
You'll end up using JScript or VBScript instead of Javascript

What do you mean by zeroed in?

9
General Board / Re: Is there a way to run scripts on the fly?
« on: February 19, 2014, 10:14:02 am »
Quote
You'll end up using JScript or VBScript instead of Javascript, but have a look at http://answers.yahoo.com/question/index?qid=20090717063113AAEzenT

The main difference is that you'll need to create the repository instance and explicitly use it instead of implicitly having its namespace available.

Of course you don't need a batch file to run it, with an appropriate extension a double click will run it.

Thanks Simon. Is there an example of creating a repository instance that i can refer to? Secondly, is there a way to restrict whom can run the scripts within Sparx?

10
General Board / Re: Is there a way to run scripts on the fly?
« on: February 19, 2014, 07:50:24 am »
Quote
You could run then via a batch script locally on your disk.

q.
You mean a batch file? Don't believe a batch file can execute Javascript.

11
General Board / Is there a way to run scripts on the fly?
« on: February 19, 2014, 06:21:51 am »
Rather than create a script, execute it and then delete it, is there a way to run them on the fly i.e. execute and discard. The reason is the because i don't want people who don't have authority to execute them.

12
General Board / Re: Is there a way to validate metamodels?
« on: February 21, 2014, 07:26:55 am »
What i should have used instead is "verify"? How do i verify that the modelers or users are conforming to a standard i.e a node represents a server, an actor a person, etc and they are not using non-conventional constructs? Can this be done automatically?

13
General Board / Is there a way to validate metamodels?
« on: February 21, 2014, 05:37:38 am »
If i have a metamodel, is there a way to validate the elements being created in a particular model?

14
General Board / Re: Setting Diagram Statuses
« on: February 13, 2014, 08:12:19 am »
@qwerty - Agreed hence the note on how he expects people to keep track. I would go down the route you suggested of using diagram notes or having a note on the diagram which can be locked to avoid double-handling, etc

15
General Board / Re: Setting Diagram Statuses
« on: February 13, 2014, 06:25:50 am »
@Geert,

I don't quite agree that diagrams don't carry significance. Being views of models, they carry significance in communicating a particular view to the intended audience as they help visually describe relationships, behaviors, etc. I agree that this information would exist in a model as does metadata for a given object. A diagram like any other element may progressively change e.g. v 0.1, 1.0, etc as the views of the model change.

What is unclear is the difference between models and diagrams as there is a lack of information out there and hence adding confusion.

Pages: [1] 2 3