Giter Club home page Giter Club logo

Comments (6)

cbadici avatar cbadici commented on July 17, 2024

Hi Alessandro, Exporting the data is a process that can run for a long time depending on how much data you have. Have you verified if the data is actually exported ? I suspect one of the reasons the service is timing out is because it's running longer that the ScriptTimeout setting in platformsettings.json file which is typically 30 or 60 seconds. I will also investigate if it is an UI issue. You can find the related service in the Git.Utility.ThingShape - ExportProjectData

from thingworx-gitbackup-extension.

AlessandroNicoli avatar AlessandroNicoli commented on July 17, 2024

Hi Alessandro, Exporting the data is a process that can run for a long time depending on how much data you have. Have you verified if the data is actually exported ? I suspect one of the reasons the service is timing out is because it's running longer that the ScriptTimeout setting in platformsettings.json file which is typically 30 or 60 seconds. I will also investigate if it is an UI issue. You can find the related service in the Git.Utility.ThingShape - ExportProjectData

Hi, yes the data is correctly exported, and I don't have found any "ScriptTimeout" string in the platformsettings.json, so I expect it tooks the default 30" timeout.

from thingworx-gitbackup-extension.

cbadici avatar cbadici commented on July 17, 2024

Can you also let me know what version of thingworx and git extension you are using? You can also test if the service is giving a timeout or an error. Go to your Git backup thing, to services, and execute ExportProjectData service, you just need to input the project name. If you receive a timeout error, you can increase the ScriptTimeout like in this article: https://www.ptc.com/en/support/article/CS314493

from thingworx-gitbackup-extension.

AlessandroNicoli avatar AlessandroNicoli commented on July 17, 2024

I'm using TW 9.0.2 (I've two different instances on 2 different servers and both have this behaviour).
The service gives me back this error:

Cattura

from thingworx-gitbackup-extension.

cbadici avatar cbadici commented on July 17, 2024

Ok, the service is not correct (at least for version 9) and that's why it is returning an error. I can provide you with a fix for this.
First of all you will need to import the attached thingworx blob extension, it will be used to convert a blob to a base64 string
Then, go to Git.Utility.ThingShape, and edit ExportProjectData, line 114, where ExportURL variable is defined.
Please replace that portion of code with my following code, which will correctly export the project data and provide the task id in a string. Save your service and test again, it should also work from the Mashup and once it is completed, it will produce a popup.
var ExportURL = target.baseURL + "/DataExporter?path=" + encodeURIComponent(iftbl_ConfigurationRow.FileRepoPath) + "&repositoryName=" + encodeURIComponent(iftbl_ConfigurationRow.FileRepository) + "&searchTags=" + encodeURIComponent("Applications:" + ProjectName); var params2 = { headers: { "appKey": target.appKey, "Accept": "application/octet-stream" } /* JSON */ , ignoreSSLErrors: true /* BOOLEAN */ , url: ExportURL /* STRING */ }; // result: STRING var str_ExportResult = Resources["ContentLoaderFunctions"].LoadBinary(params2); str_ExportResult = base64DecodeString(Resources["BlobServices"].GetBase64StringValue({blob: str_ExportResult /* BLOB */}));

thingworx-blob-extension (1).zip

from thingworx-gitbackup-extension.

AlessandroNicoli avatar AlessandroNicoli commented on July 17, 2024

Hi, I did it and seems to work like a charm!
Anyway, I'll test it better in the next days :)

107712592-f9329480-6cc9-11eb-9199-a0b58a9ebc19

Thanks a lot for the support.

from thingworx-gitbackup-extension.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.