Example 14: File

This example provides the basics on how to load files from a Windchill Extension into the system.

You can find the code for this example in our GitHub repository.

Introduction

This example will load a file from the Diagnostics window of a Windchill Extension and output some text to the Background Method Server.

Implementation

The loading is triggered by a Diagnostics screen of the extension, which can be found in the Extension Manager.

18043043

This will send an AJAX call to the backend and run the function.

9849839434

Execution

The Diagnostics window will execute the function using apache commons to process the request into a stream.

193789343

Once the file is uploaded, a message will display in the window telling the user to check the Method Server logs.

10346430

The output will be displayed in the Background Method Server after the upload is completed.

10704329