top of page
Writer's pictureGlen Keller

Discover the Latest on Teamcenter's Active Workspace AppCtxService Transition to Redux Equivalent

Updated: May 19

Siemens' Active Workspace Client (AWC) uses a set of values (ctx object) provided to the interface to perform essential functions like conditionally controlling the display of commands, binding data into Location searches and more.


In previous versions of AWC, developers and administrators used the appCtxService command with AngularJS to invoke these values (the ctx object) into the browser tools of a client to determine what values were available to utilize with the code.


The value supplied to the Console of a browser in the previous method was:

angular.element(document.body).injector().get('appCtxService').ctx;
Tip. A link to the Active Workspace 6.1 documentation for the appCtxService is located HERE.
Image of the appCtxService command used in the Active Workspace browser console
Shows the method used with the appCtxService in Active Workspace 4.2 - 6.1.

As of Active Workspace 6.2, this mechanism was replaced due to the transition from AngularJS to React. The method used in previous versions of the client is no longer supported (or works) in the newer iteration of AWC.

Active Workspace Error message when running appCtxService in Active Workspace 6.2+
Shows the error that displays in Active Workspace 6.2 when executing the appCtxService command to populate and retrieve the ctx object.

Caution. The online help documentation for Active Workspace 6.2 still contains a reference to the old mechanism that now fails. This error in the documentation may be located HERE (unless it has been fixed since this post was published). The link still provides good examples of how ctx is utilized in the source code of the client for reference. There is a Knowledge Base Arcticle (KB Article ID# PL8705946) in the Siemens Solution Center regarding this error in the documentation.

As an alternative solution, it is recommended to use Redux as of version 6.2. Redux is a browser extension that provides this information and much more.



Information regarding Redux used with Active Workspace is documented in the Beyond AngularJS Transition Guide on the Siemens Solution Center. The information in this document provide the justifications as to why Siemens transitioned to React from Angular, as well as some really good information regarding transitioning your declarative components, new architecture and API information and much more.

Demonstrates the Redux tool used with Teamcenter's Active Workspace Client (AWC)
Demonstrates the method used with the Redux browser plugin in Active Workspace 6.2

As you begin to work with the Redux extension, the State tab will show similar information to the appCtxService in previous versions.

 

Take a moment to watch our instructor demonstration to see how to install and use the Redux tool.


 

To learn more about Redux, below are some helpful links to get you started in your journey.







Comments


Commenting has been turned off.
bottom of page