Skip to main content
12-Amethyst
May 30, 2024
Question

Embed Thingworx application in a Micro FrontEnd architecture

  • May 30, 2024
  • 2 replies
  • 2259 views

Hi all,

Sorry if my question is stupid but i don't know anything about Micro FrontEnd architecture and technology.
Do you know if it is possible to use Micro Frontend technologie to embed a thingworx application to avoid using IFrame?

 

Thanks for your help.

 

CB.

 

2 replies

cbaurand12-AmethystAuthor
12-Amethyst
May 30, 2024

Hi VladimirN;

I think it was not my question. I don't speak about platform architecture. it is more "web" architecture. Can we embed mashups in Micro FrontEnd as we can do with iFrame ?

The context is, we have an angular Dashboard using Micro Frontend technology that gives acces to several appliquations. One of them is a TWX application and the question is, could we embed this application with the Micro frontEnd technology instead of using IFrame technogy.

18-Opal
May 30, 2024

Hi @cbaurand ,

 

I have done this in ReactJS; you can create the mashup on Thingworx. Then, create an Application Key and ensure it has the proper expiration date.

 

Then use the below Thingworx URL:
https://xyz.com/Thingworx/Mashups/MashupName?Parameter2=valuexyz&appKey=6b4668b0-1346-45bb-9892-f2f3d184b510&x-thingworx-session=true 

 

Thanks,

cbaurand12-AmethystAuthor
12-Amethyst
May 31, 2024

Hi Shashi,

Thanks for your response. Do you mean, there is nothing to change in the TWX platform config like we have to do if we use IFrame ?
Is it as simple as you write ?

 

Thanks,

 

Cyril.

18-Opal
June 1, 2024

Hi @cbaurand ,

 

Yes, you need to make a CORS change in web.xml in the Apache Tomcat;

pshashipreetham_0-1717247559741.png

 

Below is the Article:
Article - CS229450 - How to Enable Cross-Origin Resource Sharing (CORS) in Apache Tomcat for ThingWorx Platform/ThingWorx Navigate (ptc.com)

 

Thanks,