HTTP Filtered Value Set and Dependent Enumerations
Gary Mullen-Schultz (287●2●55●36)
| asked Mar 13 '13, 5:15 p.m.
edited Mar 14 '13, 11:53 a.m. by Ralph Schoon (63.5k●3●36●46)
I would like to use the results of an HTTP Filtered Value Set as the source enumeration for a dependent enumeration. Is this possible? I can't figure out how to configure it (using 4.0.2 M2).
Thanks, Gary |
2 answers
Ralph Schoon (63.5k●3●36●46)
| answered Mar 14 '13, 2:39 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Hi Gary,
as far as I can tell from helping to write the Process Enactment Workshop, dependent enumerations require two enumeration attributes. The HTTP Filtered Value Provider typically returns values like strings and the like. Therefore it is not possible to hook it up in a dependent enumeration, as far as I know. Comments
Gary Mullen-Schultz
commented Mar 14 '13, 11:38 a.m.
Ralph:
Ralph Schoon
commented Mar 14 '13, 11:52 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Gary,
Would http://sudhakarf.wordpress.com/2013/03/15/http-filtered-value-set-providers-and-dependent-enumerations/ be an alternative approach?
Nice one Freddy, I understood the question the other way around and provided a solution for that in another answer.
long TRUONG
commented Feb 05 '14, 9:53 a.m.
|
Ralph Schoon (63.5k●3●36●46)
| answered Mar 15 '13, 2:14 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited Mar 15 '13, 3:37 a.m.
This won't fit into a comment. Based on Freddies nice blog. If you want it the other way round, you can actually feed the value set for an enumeration using the HTTP Filtered Value Set providing data for another attribute too.
You feed the value set for the enumeration with the result of the HTTP Filtered Value Set similar to this script: /******************************************************************************* * Licensed Materials - Property of IBM * (c) Copyright IBM Corporation 2011. All Rights Reserved. * * Note to U.S. Government Users Restricted Rights: * Use, duplication or disclosure restricted by GSA ADP Schedule * Contract with IBM Corp. *******************************************************************************/ dojo.provide("com.example.ValueSetProvider"); (function() { dojo.declare("com.example.ValueSetProvider", null, { getValueSet: function(attributeId, workItem, configuration) { // call your HTTP Filtered Value Set for another attribute // Get the value of the attribute here and do something with the value var panic="true"; // This is the value of the other attribute var result= []; if(panic=="true"){ result.push("priority.literal.l11"); } else { result.push("priority.literal.l02"); result.push("priority.literal.l07"); } return result; } }); })(); Then you configure your script in the Attribute Customization like this. And use the value set like this: As a result you will now have only the literals to pick in the selection. You have to pick the literal values to return from the process configuration source and just push the values you want, based on the input. PS: You can use Jorge's trick to call a HTTP Based Filtered Value Set in JavaScript. Comments Sigh, unfortunately the Enumeration presentation would not present an option to actually use the HTTP Filtered Value Set in the enumeration value picker. So you would have to store the value you pick an another attribute and use that attribute value in the script.
|
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.