It's all about the answers!

Ask a question

How to Set an Attribute Value Dynamically

Kurtulus YILDIRIM (66716) | asked Sep 06, 3:00 p.m.
My customer has a request to set a value of an EWM/RTC attribute dynamically. They have two work item types; WITypeA and WITypeB. WITypeA is a standard type like defect, story, ... On the other hand, WITypeB is a catalogue type which means the customer uses it to define a system/subsystem/. Basically means, it is similar to EWM category/filed against but has more information on it, a workflow and a limited number of total records. An enumeration attribute (WITypeA_Attribute1) on WITypeA has exactly the same values as WITypeB records but is not programmatically dependent on WITypeB. I mean the customer manages values of WITypeA_Attribute1 and records of WITypeB manually.
The request is to set another attribute (WITypeA_Attribute2) value according to the value of WITypeB_Attribute1 when WITypeA_Attribute1 changes. I mean when the user changes the WITypeA_Attribute1 value, the code will find the same record on WITypeB, read the WITypeB_Attribute1 value and set the same value to WITypeA_Attribute2 dynamically.
When I investigate the options, I found;
- (I think) JavaScript API doesn't have the capability to query another WorkItem type.
- Work item Operation Advisor only works while the saving process starts/occurs, not attribute value changes.
Could you please guide me on which EWM/RTC API is best to tackle that request? Is there an example that I can use?
Thank you in advance and have a nice day.

Accepted answer

permanent link
Ralph Schoon (58.7k23642) | answered Sep 13, 7:36 a.m.

first of all, you provide some kind of implementation description and not, what the intended business use case is. Based on this here my answer.

1. It would be possible to use a Reference presentation instead of using the enumeration. See .
2. It might be possible to use a work item attribute of type WorkItem instead of the enumeration and simplify the whole use case.
3. It might be be possible to use a Java based attribute customization (calculated value) to achieve what you want. See .
4. A follow up action/participant would be able to read the attribute values of a work item during the work item save operation, detect if a specific attribute is changed. It can search for work items and read values from these work items  and execute work item attribute changes on the initial work item (or even the other work item). See especially see the EWM Extensions Workshop
Kurtulus YILDIRIM selected this answer as the correct answer

Ralph Schoon commented Sep 13, 7:37 a.m.
1 and 2 would simply replace the enumeration by using the actual referenced work item.
3 and 4 would require to search for the referenced work item and get the data you want.

One other answer

permanent link
Ralph Schoon (58.7k23642) | answered Sep 08, 5:21 a.m.

 Kurtulus, search my rsjazz blog for „Follow up action“ or „Participant“.

Kurtulus YILDIRIM commented Sep 08, 6:58 a.m.

Hi Ralph,

I already checked your blog but it doesn't cover my requirement above.
Thank you.

Your answer

Register or to post your answer.