IBM BPM, V8.0.1, All platforms > Programming IBM BPM > Developing using the JavaScript API > Samples

Extracting a managed file

If a process application or a toolkit contains a managed file, you can extract it from the runtime to evaluate its content.

This example illustrates how to extract a managed file by writing its content to a local file.

var managedFile = tw.system.model.findManagedFileByPath("lsw-services.jar", TWManagedFile.Types.Server);
log.error("Got the managed file!: " + managedFile);
managedFile.writeDataToFile("C:\\lsw-services.jar");

Samples