With Aris 9.8 how can I determine if a Connection Type is in Use?
Since we cannot CREATE New Connection Types I want to Rename an Un-used Connection Type, but I need to determine that the Connection Type is Un-used and I can't seem to figure out how to do that.
Hopefully somebody can help me with how to do this.
Thanks.
If
ArisData.ActiveFilter().GetTypes(Constants.CID_CXNDEF)
is available in ARIS 9.8 (or a similar method that returns all permitted connection type numbers as an array), there is no problem doing this.
- Retrieve the possible connection type numbers as an array and assign it to a variable.
- Iterate through all databases (preferably in read-only mode) > all models > all connection definitions. For each connection definition retrieve the connection type number and use the indexOf(...) method of the array you assigned to a variable in step 1 to find out the index of the connection type number.
- indexOf(...) can either return -1 if the number is already not in the array anymore (then there is nothing for you to do), or it can return an actual index number, in that case you can use the splice(...) method of the array to remove the number from the array.
Make sure to call .close() on each opened database after you iterated through all its models, to free up memory used for caching. You can also call the clearCaches() method of the database after every iterated model if you're keen on keeping a low memory footprint.
What you're left with after the all the iterating is an array that contains all connection typ numbers of connection types that aren't used yet.
Thank you for that information. I am not very skilled with the scripting/reporting capabilities of Aris yet as I have just recently been kind of "thrown in to" the Aris Administration role.
I will see if I can put something together based on your directions.
I will be adding a comment to this thread as well as I was able to figure out a "brute force method" of determining Used and Un-used Connections using the XML Export Wizard and then manipulting the xml output.
Thank you again.
Again, thank you for the reply. The Aris scripting/reporting is not my "1st go to option" as I am just not very skilled with it yet.
Anyway, I thought I would post the "brute force" method that I figured out to determine Used and Un-used Connections in Aris.
I first used the "XML Export Wizard" to export ALL the Database Information for the database I was concerned with. Make sure that the Settings: "Object definitions - Connection level" is set to "All Connections". Once I had the XML output, I simply opened it in my text editor (I use TextPad). I determined that the Connection Types used in the database were identified by the tag "CxnDef.Type=". I then used the "Search in Files" feature of my editor to search the XML output for All Occurrences of "CxnDef.Type=". Then I Copied those search results into a New Text File. I did a Search and Replace to Remove the Tag. Now I had a list of ALL the Occurrences of All the Used Connections in the Database. I Sorted this list to Delete Duplicates and then I had a list of All the Connections Used in the database. I put this list into a Column in an Excel sheet. Then I opened the Administration tab in Aris and went to Configuration/Method/Connection types. Here I was able to Highlight and Copy the full list of Connections. I pasted this into a separate Excel sheet and then Copied the "API names" and Pasted them into a separate sheet of the Excel workbook containing the list of Used Connections. So now in a single Excel workbook I had a list of All Available Connections and a list of All Used Connections. Then I just used an Excel formula (=IF(ISERROR(VLOOKUP(A460,Sheet2!$A$2:Sheet2!$A$190,1,FALSE)),TRUE,FALSE)) to see if an Available Connection actually existed in the Used Connections. If it existed, then the Connection is "Not Available" (FALSE) and if it did not exist then it is "Available" (TRUE).
Again, "brute forced" but it worked and once I found the XML Export Wizard it didn't take me too long to put this together.
Once I try the scripting and get something working, I will post it back up here.
Thanks all.
1. Create new temporary filter from database... (New filter-> Create automatically -> select 1st db)
2. Update temporary filter from the remaining databases... (Edit -> Create automatically -> Select 2nd db... - Select add content)
3. repeat the step 2 for the rest of the databases
4. run a standard report to extraxt information from filter into excel file: Output filter information