Andrew,
In the tasks.json, in the "properties" array of the task, you will have to add something like this for a drop down property:
{
"name": "EventFamily",
"displayPropName": "Event family",
"type": "string",
"controlType": "combo",
"modelName": "setEventFamily",
"filler": "getInstance.eventFamily",
"fillerModel": "com.avaya.workflow.events.EventCatalogEntries",
"fillerLevel": "0"
}
This is an entry for an existing task (Receive Task) that has drop down boxes. The control type is 'combo'. The items of importance here is the "filler" and "fillerModel" tags. The "fillerModel" tag states the name of the class that has a function with the name defined in the "filler" tag. In the example above, there is a class "EventCatalogEntries" which will be a singleton (hence the 'getInstance'). This has a function defined as "eventFamily" which will return a list<String>. Here is that function for your reference:
public List<String> eventFamily() {
List<String> eventsFamily = new ArrayList<String>();
//for (final EventId eventId : eventList) {
// eventsFamily.add(eventId.getFamily());
//}
return eventsFamily;
}
As you can see above, this function returns a list of strings "eventsFamily". Instead of the three commented lines inside the function, you write your logic to put your elements into the target list of Strings and return that list. It will show up magically in your task's drop down.
All this is documented in the Dynamic Task Development Guide. If you need further help, feel free to reach out to me and I will schedule a call with you to get you moving.
|