Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Avoid Participant Propagation

We have the following WI structure:

WorkItem3(fathers father)
|--WorkItem2 (father)
|--WorkItem1

We created an Operation Participant that when the user modifies an attribute in WorkItem1, it updates this value in the fathers WorkItem (WorkItem2).

The trouble we are finding is that when the value in WorkItem2 is automatically updated and saved by the Operation Advisor, another instance of the Operation Participant is triggered and tries to update the WorkItem3. Normal behavior, but not desired one: we need only one level of propagation.

We cant find the way of detecting who triggered the Save Operation, whether the user, or the "workItemServer.saveWorkItem2()" operation in the Participant.

Any idea about how to tackle it??

Appreciate any comment.
Thanks
Noel.

2

1 vote


Accepted answer

Permanent link
Hi Eduardo. I have just received an update on this question.
First of all, thanks a lot for your answer.

I actually got to solve the problem by passing a flag between the participants. I found it the clearest way to perform simple communication between advisable operations (advisor/participants).

Works as follows:

Set the flag in the save operation of WorkItem 1:
>additionalSaveParameters.add(MY_FLAG);
>saveWorkItem3(workItem, references, workflowAction, additionalSaveParameters)

Receive the flag in the excution of the operation aprticipant in WorkItem 2:
>ISaveParameter saveParam = (ISaveParameter) operation.getOperationData();
>if(!saveParam.getAdditionalSaveParameters().contains(MY_FLAG){
        //Execute propagation in WorkItem2
  }

Hope this can help others.

NOEL.
Ralph Schoon selected this answer as the correct answer

7 votes

Comments

Hi Noel, thanks for this great post!

Great Solutions!!! thanks!

This is what we were looking for.

Cheers.

Really glad it helped you!


2 other answers

Permanent link
Hi, I had the same problem and tried to get some help here. As I got nothing, I use a simple manual solution: common plug-in+session manager.

Here is some more information: http://jazz.net/forums/viewtopic.php?p=52519#52519

0 votes


Permanent link
 Hi, I'm facing the same problem but instead of the infinite loop behaviour I'm obtaing a blocking one by several advisors. Is there a way to make a builtin advisor to skip the execution if a postop already run?
I mean there exist a builtin FLAG to skip builtin advisor executions?

0 votes

Comments

Raffaele, if you are blocked by other advisors, you should fix the configuration for your role. Also the behavior is orchestrated and they are run in the order top to bottom. You have to satisfy all configured advisors, because that is the rule. They will be called by the save in a participant, but because they are advisors you should have no issue when saving the same work item. If you create work items in participants, you simply have to provide the data that is asked for.

Note, don't modify the triggering element in an advisor.

Hi Ralph, first of all thanks for your fast reply. I admit that after a workitem save, attributes status must remain coherent with respect to advisors, but in the case of both readonly attribute for type and state and readonly by condition this might be useful to permit the attribute to be written by the plugin but not modificable by the user.

BTW (if there is no possibility to obtain that) is there the possibility to hide an attribute in the presentation if a  conditio(server or js side) macthes? 
Thank you again

Hi Rafaele,

I am not aware of hide for condition unfortunately. I don't think we have it. Please feel free to create an enhancement request.

I have only written into read only attributes so far with calculated values, as far as i can remember. If you can't write into a read only attribute using the API, how is data supposed to get in there anyway? If it is an issue of the state, change them before entering the state.

Another thought is to make the attribute read/write and only the presentation read only. Again, I haven't tried this with the API.


 I'm using RTC 401, there are some attributes that become read only only if another wi is linked to a specific link type in the other case the same attributes are not readonly and mandatory (the latter scenatio permit the user to write the attribute). In the former case we would "inherit" values from the linked workitem  (and remain "synchronized") but any user modification must be denied. (i know that a participant solve the issue, but the customer won't renunce to readonlyness).


Regarding the ability of calculated values to write on fields, regardless of readonlyness, did you mean a presentation (always) readonly or state by state one? 

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 11,053

Question asked: Apr 15 '11, 7:07 a.m.

Question was seen: 8,475 times

Last updated: May 21 '13, 5:01 p.m.

Confirmation Cancel Confirm