The postProcessJPO parameter specifies the name of the JPO program and method to invoke during post processing. This example shows how to invoke the emxForm.jsp with postProcessJPO: ${COMMON_DIR}/emxForm.jsp?mode=Edit&form=<form_name> &postProcessJPO=<JPO Name>:<Method Name> If you specify both a postProcessURL and postProcessJPO, the postProcessURL executes first followed by the postProcessJPO. The post process JPO specifies the programMap as an argument for post processing. The programMap contains the following HashMaps:
The above maps are packed using the packArgs method supported by JPO and passed on to the post process JPO being invoked. The post process JPO can unpack this input parameter and it can be used by the post process for custom coding. This code sample shows how to get the values for objectId, timeStamp, relId, EditAction using a custom processing JPO. // unpack the incoming arguments into a HashMap called 'programMap' HashMap programMap = (HashMap)JPO.unpackArgs(args); // get the 'paramMap' HashMap from the programMap HashMap paramMap = (HashMap) programMap.get("paramMap"); // get the values for objectId, timeStamp, relId, EditAction from the paramMap String objectId = (String) paramMap.get("objectId"); String timeStamp = (String) paramMap.get("timeStamp"); String relId = (String) paramMap.get("relId"); String EditAction = (String) paramMap.get("EditAction"); You can use the code sample in Pre-Process JPO for an Editable Form Page to retrieve the individual field information. The post process JPO returns a HashMap or nothing. The HashMap contains the keys defined in this table:
If the Message key contains a value, the system displays it to the user as an alert. If the value of the Action key is CONTINUE, the system commits the transaction containing the edit process, post process JSP, and post process JPO. If the value of the Action key is STOP, the system aborts the entire transaction, including the edit process. If the post Process JPO does not need to pass data to the form, it can return nothing (void) or an empty HashMap. In this case, the process proceeds with the default behavior of Continue and No message. |