结合ToolAgent与自定义数据类型实现下拉列表

Geeta的总结:
1. Using JaWE, defined in xpdl a new "Type declartion". Relevant props: Id="AgentListType", Type="External reference" and "Location=com.intellicare.shaleNShark.model.AgentListType"
2. Defined a new application "AgentListApp" with one formal param called "listParam", Mode="in and Out", type="Declared Type", and SubType="AgentListType"
3. Defined a new wfdata variable called "agentListWf", with type="declared type" and Subtype="AgentListType".
4. Finally, mapped the tool to my activity to an application "AgentListApp" in the usual way, with AppName as com.intellicare.shark.toolagent.AgentListToolAgent and mapping the formal to actual param etc again as usual.

the rest is easy: com.intellicare.shaleNShark.model.AgentListType is a class with just one attribute, String[].

com.intellicare.shark.toolagent.AgentListToolAgent has an public static void execute(AppParameter param1) which calls appropraite methods to populate my list of agnets, create a AgentListType object aList, then set the (in and out) param param1 with: param1.the_value = aList;

You should be able to do something very similar and thus avoid having to use servlets etc..

你可能感兴趣的:(REST)