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

Pages: [1]
1
I see.  For further explanation, let me list out the steps in that part of my process:

  • Connect to the model hosted in our cloud.
  • Run a user created EA internal script to generate a local EAP file that references the model.
  • Do whatever I need to do with the model.

The script I mention was written within EA and comes with the model I download.  I didn't write them but I seem to need to use them.  I was just going to try and remove myself from EA completely, but I got an answer from Sparx support saying that can't happen.  Though, they also included a white paper from LieberLieber Software explaining how I may be able to work around this, though it also may not work.

I'm going to give these instructions a shot but support insists that it's a long shot. 

2
That's what I keep running into also today :( Looks like that's what I'll be doing while looking for other workarounds.

Thanks qwerty, I appreciate your answers and glad this forum isn't super dead :)

3
I have not tried that with my own string, within EA itself.  I will give that a shot.

Though, the script I'm cannibalizing code from has an even simpler source string:

This code is Jscript
Code: [Select]
var intakeSource = "Enterprise Architect on <ORG> Cloud --- ;Connect=Cloud=protocol:https,address:<org address>,port:443;Data Source=<DS>;DSN=<DSN>"

4
All these years coding and I forget to do that first :P

Further reading about the error I posted suggests that I have a COM object issue.  When I attempt to call projectTransfer is where the error gets thrown.

This is the first I've had to learn about this so here we go!

Snippet with appropriate stuff removed of course.

Code: [Select]
# Create the EA object
$ea = New-Object -ComObject "EA.Repository" -Strict

# Get the project interface
write-host $ea.ConnectionString
write-host "Getting project interface"
$project = $ea.GetProjectInterface()

$sourceFilePath = "MyName --- DBType=0;Connect=Cloud=protocol:https,address:<address within firewall>,port:443;Data Source=<DS>;DSN=<DSN>;LazyLoad=1;"

write-host "sourceFilePath: $sourceFilePath"

$targetFilePath = "<path to file>-test.eap"
$transferLog    = "<path to file>LogFile.txt"

write-host "Transferring project"
$project.ProjectTransfer("$sourceFilePath", "$targetFilePath", "$transferLog")

write-host "Transfer complete."
ii (get-item $targetFilePath).Directory
# Close the session and exit
$ea.Exit()


5
I've confirmed we have a MySQL database (DBType=0) so this is what I'll use in my string.

For further debugging, I'm digging into an error from powershell that states this:

"
Exception calling "ProjectTransfer" with "3" argument(s): "The server threw an exception.
(Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT))
+ $project.ProjectTransfer("$sourceFilePath", "$targetFilePath", "$transferLog")
"

According to the API documentation here,
https://sparxsystems.com/enterprise_architect_user_guide/12.1/automation_and_scripting/project_2.html
...it says there are supposed to be 3 arguments.  I'll dig around more and see what I can find, maybe it's something deeper.

6
I'm being told a guess that it's an Oracle database within our firewall.  I'm waiting on some confirmation but let's go with that for now.

7
Ah, that is disheartening :(

Thank you though, I appreciate your answers qwerty.

8
I agree that this is the correct way for me to get my connection string.  Though digging deeper, I'm looking to avoid the "Source must be 3.50" popup and the Project Transfer popup that I am forced to click through.  Is there a way to avoid these popups with arguments?

I had thought that the 3.5 message referred to the Jet version, though I do not have Jet 4 checked in the application.  Maybe I'm not importing a particular dll or module?

9
Hello everyone, first time poster here. TL;DR below if you like.

I'm super new to Sparx, and I'm attempting to take automation for project transfers from inside EA to outside EA (so it can be scheduled instead of manual).  I've scoured these forums and came across a suggested powershell method here:

https://sparxsystems.com/forums/smf/index.php/topic,2708.0.html

This is awesome!  Love me some powershell.  And I'm rather sure this is the correct syntax to do what I want to do.  Though, I'm having lots of trouble trying to transfer the project to a file.

First I execute the script and I get a popup stating:

"Source database must be at least version 3.50. Please upgrade source first, then try again."

Checking another forum suggestion I looked at the %APPDATA%...DBError.txt file and see this:

"Transmission error communicating with server.

The server name or address could not be resolved"

So I am assuming that my issue is with the source string.

I have a cloud connection string that I copied from a saved model shortcut on my desktop, and use this as my source string.  I've added other parameters from the powershell suggestion that I thought were appropriate, but I'm simply not able to connect to the server with this string using automation.  FYI, yes I am under a corporate firewall.

So finally my question is: what is the difference in connection string structures between the application transferring the model vs automation?  Could I be missing something in the string to make it connect? Why would automation running within the application work (ie projectTransfer works within the application), but parallel logic outside of the application does not?


TL;DR - How do you transfer a project from a model in our cloud?  What the difference in connection strings between the EA application vs automation?

Pages: [1]