Skip to main content
12-Amethyst
May 30, 2024 7:16 AM UTC
Question

Embed Thingworx application in a Micro FrontEnd architecture

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.

 

6 replies

cbaurand12-AmethystAuthor
12-Amethyst
May 30, 2024 12:16 PM UTC

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.

Translate
pshashipreetham
19-Tanzanite
May 30, 2024 6:42 PM UTC

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,

Translate
Shashi Preetham || +91 8099838801 || shashi@psptechhub.com
cbaurand12-AmethystAuthor
12-Amethyst
May 31, 2024 9:46 AM UTC

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.

Translate
pshashipreetham
19-Tanzanite
Jun 1, 2024 1:06 PM UTC

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,

Translate
Shashi Preetham || +91 8099838801 || shashi@psptechhub.com