Can you open a partially corrupt oml file to merge changes to a non-corrupted version

Hello,

We have an espace which is partially corrupt. Unfortunately it has been this way for a few revisions while we logged a call and continued with a 'workaround' (for better or worse).

Edit: I have tried running Service Studio from the command line with the recover option and it does not work.

I've managed to go back in the version history and find the first non-corrupted version. From there I've been trying to rebuild the changes by merging the subsequent changes into this non-corrupted version.

Unfortunately when comparing and merging, the corrupted later version cannot be opened and our 'workaround' method of opening the partially corrupted oml cannot be applied in the middle of a compare operation.

Question 1) Can you force Service Studio to load a partially corrupted oml for the sake of merging?

Our workaround for opening the partially corrupt module was simply to try it three times.
1) The first time opening the espace raised an Unexpected Error followed by a Partially Corrupt message.
2) The second time opening the espace raised only a Partially Corrupt message.
3) The third time, it opened 'without' errors.

The error report for the 'Unexpected Error" in step 1 suggests that there is a missing fragment in the oml file. 

Question 2) Can you somehow decode/decipher/de-hash and oml file to use a different compare tool, e.g. Beyond Compare, to merge changes? Or at least identify the missing fragment and merge only that across?

I've compared two successive versions of the oml in Beyond Compare and the fact that almost the entire file is different leads me to believe that the oml file is hashed or encrypted. Probably using values from one or more of the various hash columns in the System Espace_Version table.

Here's hoping.

Albert


Hello Albert,

You can try to recover your espace following these steps:

1. Place your espace.oml on a given folder on your computer (eg: c:\OmlHospital\myespace.oml)

2. Open a Command line window and change to your OutSystems version \ Service Studio directory

eg: cd "\Program Files\OutSystems\Development Environment 11.0\Service Studio"

3. Have Service Studio recover your espace with the following command:

ServiceStudio -recover c:\OmlHospital\myespace.oml

4. Service Studio will now open your espace and try to recover it - might take some time - and after it is done, save the recovered espace and let me know how this worked for you.

Cheers,

Afonso

Hey Albert,

Regarding your 2nd question, I do not have all of the details but I know that the OML file is a combination of base64 encoded binary data, as well as AES256 encrypted binary data.  I do not know of any way to "convert" it to XML, for example.

Afonso Metello wrote:

Hello Albert,

You can try to recover your espace following these steps:

1. Place your espace.oml on a given folder on your computer (eg: c:\OmlHospital\myespace.oml)

2. Open a Command line window and change to your OutSystems version \ Service Studio directory

eg: cd "\Program Files\OutSystems\Development Environment 11.0\Service Studio"

3. Have Service Studio recover your espace with the following command:

ServiceStudio -recover c:\OmlHospital\myespace.oml

Hi Afonso,

Thank you for your suggestion, but I've tried the recover option and it doesn't work. It attempts the recovery and then raises and error that the module is corrupt.

Albert


I might have found a partial answer to one of the questions of my original post: 

Question 2) Can you somehow decode/decipher/de-hash and oml file to use a different compare tool, e.g. Beyond Compare, to merge changes? Or at least identify the missing fragment and merge only that across?

In the OutDoc application there is an action called GetXML which 'translates' an oml to xml, however it seems as though it is only extracting the Elements Tree from the oml. The oml is 20MB, but the xml is 628KB.

Albert Swart wrote:

I might have found a partial answer to one of the questions of my original post: 

Question 2) Can you somehow decode/decipher/de-hash and oml file to use a different compare tool, e.g. Beyond Compare, to merge changes? Or at least identify the missing fragment and merge only that across?

In the OutDoc application there is an action called GetXML which 'translates' an oml to xml, however it seems as though it is only extracting the Elements Tree from the oml. The oml is 20MB, but the xml is 628KB.

Hi Albert - 20 MB espace? You are looking for trouble and I would strongly advise you to refactor, taking OutSystems recommedations in consideration: https://success.outsystems.com/Documentation/Best_Practices/OutSystems_Platform_Best_Practices - "An eSpace with a size > 4 MiB normally means bad architecture"

About the oml to xml thing - its a dead end if you try to go that path: forge version of OutDoc does not retrieve full oml XML, and even if it did you will most likely not be able to change it and get it back to OML format.

Since you seem to be stuck regarding steps you can take on your own to recover your work, I'd recommend you contact OutSystems Support.

And please have some lighter espaces (20 MB not good).

Cheers,

Afonso


Afonso Metello wrote:

Hi Albert - 20 MB espace? 

...

And please have some lighter espaces (20 MB not good).


Hahahahaha,

Thank you for the reply Afonso. I think you omitted your exclamation (!) of disbelief. :-)

I've been thinking that it is too big, at least you've now given me a benchmark (4MB) to aim for. 

We have logged a support case regarding this, and I suspect they might come back with the same response.

In the meantime we've rolled back to a non-corrupted version and reapplied the affected changes.

Thanks

Albert