Managed assets are images, style sheets, AMD modules or
other assets that are part of a coach view, but are developed outside
of Process
Designer. To access these assets from a coach, you might
need use a global JavaScript function to generate the URL of the asset.
For example, to generate a URL for an AMD module which is contained
in a zip file.
About this task
The
com_ibm_bpm_coach.getManagedAssetUrl global JavaScript function composes
the URL to the managed assets without checking whether the asset exist
or not.
Procedure
- Use the following syntax:
- syntax
- com_ibm_bpm_coach.getManagedAssetUrl = function(assetName, assetType, projectShortName, returnWithoutAssetName)
- returns
- the URL of the managed asset. If assetType is
not one of the three allowed (see the following table), the function
returns null.
- Use the following parameters:
Parameter |
Description |
assetName (String) |
The file name of the managed asset. Note: You
can use the '!' notation to reference a file inside
an archive. For example, if you are pointing to an image file in a .zip file,
use the following format for the URL: file.zip!path/file.extension.
|
assetType (String) |
The type of the managed asset. Must be one of
the following: - com_ibm_bpm_coach.assetType_WEB: web managed asset (css, png,
..)
- com_ibm_bpm_coach.assetType_SERVER: server managed asset (for
example zip, jar)
- com_ibm_bpm_coach.assetType_DESIGN: design managed asset (xsl)
|
projectShortName (String) |
The short name of the project where the managed
asset is requested. If this is not provided, the current project is
assumed. If the module is in a referenced toolkit, you must include
the PROJECT parameter to ensure that the Coach
View can use module in the context of the process application. |
returnWithoutAssetName (Boolean) |
Optional. Indicates whether the return url should
include the asset name. If this parameter is not provided, the default
is false, and the asset name is included in the url path. |