It's all about the answers!

Ask a question

Risk Exposure.js Package Explorer Structure


kaushambi Singh (561611) | asked Jan 22 '10, 9:20 a.m.
This is regarding the Risk Exposure example given on https://jazz.net/wiki/bin/view/Main/AttributeValueProviders#Examples link. In Package Explorer, How do we define the structure of javascript class(ExposureProvider.js). Do we need to create java project and then create a javascript file in it to write the dojo scripts. What is the com.example.common package in ExposureProvider.js? Is it a package we need to create? Please help me understanding the creation of folders in package explorer for ExposureProvider.js.

5 answers



permanent link
Patrick Streule (4.9k21) | answered Jan 22 '10, 12:23 p.m.
JAZZ DEVELOPER
This is regarding the Risk Exposure example given on
https://jazz.net/wiki/bin/view/Main/AttributeValueProviders#Examples
link. In Package Explorer, How do we define the structure of
javascript class(ExposureProvider.js). Do we need to create java
project and then create a javascript file in it to write the dojo
scripts. What is the com.example.common package in
ExposureProvider.js? Is it a package we need to create? Please help
me understanding the creation of folders in package explorer for
ExposureProvider.js.

There are two ways to deploy these scripts:

1) In a plug-in using the regular provisioning mechanisms. I haven't
documented that in
https://jazz.net/wiki/bin/view/Main/AttributeValueProviders yet, but
hope to do so soon.

2) At runtime. This is the more interesting option as it solves the
provisioning problem. There aren't many constraints here. You can
basically just upload a JS file from the filesystem as described in
https://jazz.net/wiki/bin/view/Main/AttributeValueProviders (at the
bottom). The only constraint is that the 'class' name as defined by
dojo.provide(...) must match the configuration provider. E.g.:

Configuration:
<script>

Script:
dojo.provide("com.example.common.ExposureProvider");

How you organize these scripts locally is up to you. It is certainly a
good idea to organize them in a project with a package structure, and we
may have some more tooling support to sync a local project with the
process attachments in 3.0.

--
Regards,
Patrick
Jazz Work Item Team

permanent link
kaushambi Singh (561611) | answered Jan 29 '10, 8:39 a.m.
When you say configuration Provider, what does it specifically means?

permanent link
kaushambi Singh (561611) | answered Jan 29 '10, 8:56 a.m.
I believe when you say Configuration provider should be same it means the 'script class' name defined in Process Configuration Source should match to what has been defined in dojo.provide() in Risk Exposure.js. Please confirm.

permanent link
Patrick Streule (4.9k21) | answered Jan 29 '10, 9:08 a.m.
JAZZ DEVELOPER
When you say configuration Provider, what does it specifically means?

It was a typo, I just meant 'configuration'. The sentence should have read:

The only constraint is that the 'class' name as defined by
dojo.provide(...) must match the configuration:

Configuration in the process XML:
<script>

Script:
dojo.provide("com.example.common.ExposureProvider");

--
Regards,
Patrick
Jazz Work Item Team

permanent link
Patrick Streule (4.9k21) | answered Feb 01 '10, 4:08 a.m.
JAZZ DEVELOPER
I believe when you say Configuration provider should be same it means
the 'script class' name defined in Process Configuration Source
should match to what has been defined in dojo.provide() in Risk
Exposure.js. Please confirm.

Yes, that is right.

--
Regards,
Patrick
Jazz Work Item Team

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.