It's all about the answers!

Ask a question

Retrieve custom data from a custom precondition


Ankur Sharma (151194) | asked Jul 16 '09, 6:25 a.m.
Hi all,

We are developing a set of preconditions/followup actions in RTC 2.0. Now we have a use where a custom RTC client side plugin asks for some data from the user and stores it (where ??) This is basically initial setup. Now I want to access this data from one of my preconditions. (The data will be different depending upon on which workitem the precondition is acting. The set of data will be choosen depending upon the value of a pre-defined attribute of workitem.) I may also need to modify/update the stored data in some cases when required in due course of time.(not necessarily through precondition though, but through some other operation using java client libraries). So what is correct way to approach this problem ? Where should I store my data, so that I can easily access it from the preconditions depending upon the value of particular attribute of workitem And also I can modify the stored data, if required ?

Currently we were following an approach where we were storing the initial setup data in custom attributes of RTC Stream (The data is related to RTC streams). We were trying to retrieve the data in precondition but couldn't. Here is the earlier query posted on that issue :
https://jazz.net/forums/viewtopic.php?t=5213
Not sure if this correct way to approach this problem or not. Any comment on this would really be appreciated.

Thanks
-Ankur

5 answers



permanent link
Jared Burns (4.5k29) | answered Jul 20 '09, 10:13 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
On Thu, 16 Jul 2009 10:38:04 +0000, askankur wrote:

Hi all,

We are developing a set of preconditions/followup actions in RTC 2.0.
Now we have a use where a custom RTC client side plugin asks for some
data from the user and stores it (where ??) This is basically initial
setup. Now I want to access this data from one of my preconditions. (The
data will be different depending upon on which workitem the precondition
is acting. The set of data will be choosen depending upon the value of a
pre-defined attribute of workitem.) I may also need to modify/update the
stored data in some cases when required in due course of time.(not
necessarily through precondition though, but through some other
operation using java client libraries). So what is correct way to
approach this problem ? Where should I store my data, so that I can
easily access it from the preconditions depending upon the value of
particular attribute of workitem And also I can modify the stored data,
if required ?

Currently we were following an approach where we were storing the
initial setup data in custom attributes of RTC Stream (The data is
related to RTC streams). We were trying to retrieve the data in
precondition but couldn't. Here is the earlier query posted on that
issue :
https://jazz.net/forums/viewtopic.php?t=5213 Not sure if this correct
way to approach this problem or not. Any comment on this would really be
appreciated.

Thanks
-Ankur

Hi, Ankur.

Any information that a precondition needs should be stored inside the
process XML as custom syntax within the precondition element. To do this,
you would provide an XML namespace mapped to your precondition's ID along
with an XML schema file which defines the syntax. You can then provide a
graphical UI to allow configuration of this data within the Process
Configuration editor using the "aspect editor" extension point
(com.ibm.team.process.ide.ui.processAspectEditorFactories).

You can find more information about this in the Process team's wiki, in
the "Topics for Jazz developers" section:
https://jazz.net/wiki/bin/view/Main/ProcessMain


--
Jared Burns
Jazz Process Team

permanent link
Ankur Sharma (151194) | answered Jul 21 '09, 2:07 a.m.
Hi Jared,

First off all thank you for replying to this problem. I can't express how happy I am to see your reply. We are stuck for about a month on this issue.
What we are doing is creating precondition for generating automatic approval records in workitems for certain users. So custom data in my case is 'user' info. So lets say I have two 'user' info sets- U1 and U2. Now If workitem attribute lets say 'Found In' is having value 'A' then I want to get the user info set U1 and will generate approval records for them. And if value of 'Found In' parameter is 'NOT A' then I want to create the approval records for the user info set U2. ( We have successfully created the approval records using preconditions but till now we were hard coding the user info. I can also get the value of 'Found In' parameter from workitems). My doubts are :
1. I want to confirm that will the above case be possible with this storing data inside the process XML, as you told earlier ?
2. Since this is specifically user info that we need, is it possible that we can get the standard user search wizard in precondition aspect editor for searching and storing the user info ?

Thanks
-Ankur

permanent link
Jared Burns (4.5k29) | answered Jul 21 '09, 8:33 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
On Tue, 21 Jul 2009 06:07:51 +0000, askankur wrote:

Hi Jared,

First off all thank you for replying to this problem. I can't express
how happy I am to see your reply. We are stuck for about a month on this
issue.
What we are doing is creating precondition for generating automatic
approval records in workitems for certain users. So custom data in my
case is 'user' info. So lets say I have two 'user' info sets- U1 and U2.
Now If workitem attribute lets say 'Found In' is having value 'A' then I
want to get the user info set U1 and will generate approval records for
them. And if value of 'Found In' parameter is 'NOT A' then I want to
create the approval records for the user info set U2. ( We have
successfully created the approval records using preconditions but till
now we were hard coding the user info. I can also get the value of
'Found In' parameter from workitems). My doubts are :
1. I want to confirm that will the above case be possible with this
storing data inside the process XML, as you told earlier ? 2. Since this
is specifically user info that we need, is it possible that we can get
the standard user search wizard in precondition aspect editor for
searching and storing the user info ?

Thanks
-Ankur

First, a word of warning about what you're doing... According to our API,
preconditions may not make modifications to the repository. Technically,
we don't currently prevent today but we reserve the right to add
technical restrictions to support this prohibition in the future. I would
suggest that you consider using a follow-up action (called a
"participant" in the code) instead. From the Javadoc on IOperationAdvisor:

* Advisors may not make modifications to data which is persisted in the
* repository. Clients wishing to participate in operations by modifying
data
* should implement an {@link IOperationParticipant} instead.

That said, what you're talking about sounds entirely feasible to me.
Since user ids are unique and non-modifiable, you could use those in the
XML. You can provide a graphical editor for your follow-up action which
would use the standard contributor selection dialog,
TeamContributorSelectionDialog.

More details about followup creation and aspect editors can be found in
the articles listed under "Topics for Jazz developers" on the main
Process wiki:

https://jazz.net/wiki/bin/view/Main/ProcessMain

--
Jared Burns
Jazz Process Team

permanent link
Anthony Krowiak (1111612) | answered Jul 13 '11, 5:18 p.m.
I have an aspect editor for editing the custom configuration data for an operation participant. I need to access the project area whose process configuration is being edited by my aspect editor. How do I programmatically get the IProjectArea object for the project currently being edited?

permanent link
Jared Burns (4.5k29) | answered Jul 14 '11, 2:52 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
I have an aspect editor for editing the custom configuration data for an operation participant. I need to access the project area whose process configuration is being edited by my aspect editor. How do I programmatically get the IProjectArea object for the project currently being edited?


It's important to remember that your aspect editor is not only used for project areas - it is also used for process templates. So your editor must only depend on data that's available in the process XML, not any data in a project area.

Can you be more concrete about exactly what information you're trying to get from your editor?

- Jared

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.