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

HTTP Filtered Value Set and Dependent Enumerations

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

0 votes



2 answers

Permanent link
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.

0 votes

Comments

Ralph:

That's what I thought, thanks.

Seems like it would be nice to be able to create an enumeration from the results of an HTTP Filtered Value Provider (or a Script Based Value Set) to be used elsewhere. 

Your thoughts?

Gary

Gary,

I think it would be a nice idea to have a way to limit the selectable/displayed values of any attribute based on any combination of attributes. One thought I would have in your case: is it possible to use a value set for an enumeration value and feed that using a JavaScript based value provider? You can do that with Java Script in general, but I have not tried out if you can use that with an enumeration. See https://jazz.net/library/article/1093 Lab 5 for some ideas.

Nice one Freddy, I understood the question the other way around and provided a solution for that in another answer.


Permanent link
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.

0 votes

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

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
× 6,131

Question asked: Mar 13 '13, 5:15 p.m.

Question was seen: 7,801 times

Last updated: Feb 05 '14, 9:53 a.m.

Confirmation Cancel Confirm