Detach Source code without terminating Outsystems subscription

Detach Source code without terminating Outsystems subscription

  
 Hi,

 I want to get the full source code generated (detach process) for each espace in an application without terminating my outsystems subscription. 

thanks,
Pradeep V.B.
What do you want this for?
 Hi RIcardo, 

I wanted to run the fortify and sonar scan on the generated code. 

http://www.outsystems.com/forums/discussion/10392/running-fortify-scan-on-generated-code-java/
From what I get on the other thread, your problem was that some of the code was not available to you (namely, some of the OutSystems libraries code).

For this use-case you might be able to get away with using a hybrid approach.

1) You use the detach source code, no-lockin tutorial to get the OutSystems library code
2) You use the shared folder code for your eSpaces' code

You can start the no-lockin tutorial by visiting the eSpaces Source Code link in your Service Center.

It might take a bit for you to stitch everything together, but this way you'll have the code that's actually being used for your applications (from your share folder) and some code which is very close to the code used by the OutSystems libraries.

Plus, this approach is applicable anytime without any kind of special license or agreement, and it shouldn't be against the terms of your contract with OutSystems.
 Ricardo,

 I went through the no-lock in tutorial, I see the detach button for the tutorial. But for my espaces, i get the info saying this

--------------------------------------------------------------------------------------------------
The detachment process for this eSpace can only be executed when you decide to terminate your Agile Platform subscription. If you want to detach the source code please contact us.

To learn more about the detachment process and the No Lock-In capabilities of the Agile Platform, run the No Lock-In tutorial in Service Studio.
--------------------------------------------------------------------------------------------------

Is there anything that i have to do to enable the detach option?

thanks,
Pradeep V.B.

What Ricardo was sugesting was to use the demo eSpace from the tutorial to get the source for the outsystems components you were missing the source code, and then combine it with the code in "share" folders.

It's probably not 100% correct since it will still be missing some bits of code, but should be close enough.
Also don't forget that are .jar's in the "outsystems/lib" folders and the jboss libs folders that there won't be source available (external libraries). Not sure how that affects the validators.

You can request a special temporary license to run it, but It's not pratical if you want to repreat this process multiple times in the future.

Just out of curiosity, what missing functions is it complaining about?
 Hi Joao,

I understood Ricardo's comments.. but i dont want to go with that approach. As you see i get some warnings like

Unable to resolve function call: newExecuteSimpleQuery at: /apps/OM45Code/om_apm_revolving/full/src/osom_apm_revolving/actions/ActDM_MakeDecision_BuildRequestFromDatabase.java:1046:10
[2013-07-25 13:30:32 com.fortify.frontend.translator.java.JavaResolver.cannotResolveFunction() WARNING]
Unable to resolve function call: closeDataReader at: /apps/OM45Code/om_apm_revolving/full/src/osom_apm_revolving/actions/ActDM_MakeDecision_BuildRequestFromDatabase.java:1048:6
[2013-07-25 13:30:32 com.fortify.frontend.translator.java.JavaResolver.cannotResolveFunction() WARNING]
Unable to resolve function call: closeDataReader at: /apps/OM45Code/om_apm_revolving/full/src/osom_apm_revolving/actions/ActDM_MakeDecision_BuildRequestFromDatabase.java:1051:6

 I checked all references were in place, but due to some reason the analysis failed. 

Secondly, correct me if i am wrong. The code obtained from the detach process is actually maintenable. Whereas the code in shared location is not.
Yes the code from the detach is different to improve maintenablility.
Thats why i said "not 100% correct" :)
Count me VERY interested in this too.  We have a requirement to scan our code for vulnerabilities, and since Outsystems is generating code it certainly falls in scope.  

(This is one of the main reasons my "day job" company is looking at dumping Outsystems in favor of Microsoft's Lightswitch + Azure.) 
Hi Jonathan, 

Just wanted to ensure that this found your attention as it may be helpful in your pursuits: http://www.outsystems.com/company/news/2013/outsystems-hp-fortify/

best,

bb

While I will eventually need to scan the code as well, my initial need is to just to get some samples of what the generated code looks like.  If I send someone at Outsystems an OML file can they send me back the .Net and/or Java code that the detach process generated?  As others have mentioned, there are several concerns about generated code in a production environment.  It would also be good to add an addendum to the Detach Code process showing some sample code hopefully eliminating these questions in the future.
Jonathan Lampe wrote:
Count me VERY interested in this too.  We have a requirement to scan our code for vulnerabilities, and since Outsystems is generating code it certainly falls in scope.  

(This is one of the main reasons my "day job" company is looking at dumping Outsystems in favor of Microsoft's Lightswitch + Azure.) 
 Since I don't really care WHAT gets generated (and we don't plan on running it locally), and Outsystems announced a partnership with HP (http://www.outsystems.com/company/news/2013/outsystems-hp-fortify/), an acceptable alternative would be to receive a notification from Outsystems that a particular application had been scanned by their Fortify deployment and found clean on {date}.  (I know Salesforce does something similar with its CheckMarx deployment - e.g., http://wiki.developerforce.com/page/Security_Tools.)    
 
"It would also be good to add an addendum to the Detach Code process showing some sample code hopefully eliminating these questions in the future."

You already have this. If you go to the eSpace Source Code tab in Licensing you can start the no-lock-in tutorial where you are provided with a small application that lets you detach it's source code.

It's NOT the same code as the one which will run in production, I'd like to add, since the detached source code is different from the code when the OutSystems Platform is still there.
That would be good enough for now and I tried this in the past with no luck.  Tried it again and it fails at step two.  I submitted the feedback form to support with the screen shot.
Yes, I believe the tutorial is somewhat broken.

But no matter, all you need from it is the eSpace. After publishing the eSpace you can go to Service Center > Licensing > eSpaces Source code, and download the detached source code for your application directly. No need to follow through the tutorial inside Service Studio.
Perfect!!  Thank you!!!
One last thing.  Just for fun I tried to run it in Visual Studio and I get the the error shown below.  I'm guessing I need to execute the runtime to get this to work but I don't know which project type to use and which project of the several created to point to.  The detach code documentation doesn't mention this.  Thanks!

You should use Visual Studio 2008 for this, as the project extensions used to define the project as a web project and to automatically deploy it to a server only work in that Visual Studio version.
Ah ha!!  I'm using Visual Studio 2012.  It's always something!  Thanks again!!