This code shows the structure of an expandProgram JPO:
public MapList expandJPOName (Context context, String[] args)
throws Exception
{
// Get input HashMap
//requestMap-contains all the request parameters, including the
key parameters like objectId, relId, languageStr and custom
filter, expand filter field values, default level to expand,
HashMap requestMap = (HashMap)JPO.upackArgs(args);
// Get object id
String sObjectId = paramMap.get("ObjectId");
// Get expand level
String sLevel = requestMap.get("Expand Level");
// Do necessary logic to process the level info and then return
the expanded objects
/*
**
** The code to use object id & level to get expanded objects
**
**
*/
// Return modified MapList
return mapList ;