Interface InternalFormProcessor
public interface InternalFormProcessor
This interface will allow for the parsing and processing of forms stored in
the collaboration center.
The documents will be read in from the collaboration center and sent to the
correct InternalFormProcessor class. The implementation of this class will
have to add either the task id or process model id as a hidden parameters
(for attended nodes and process start forms respectively) and then modify
the submit action (action in HTML, and the action of the submit button in PDF)
to point to the correct URL.
-
Method Summary
Modifier and TypeMethodDescriptionbuildParameterMap
(javax.servlet.http.HttpServletRequest q_, FormElementBinding[] bindings_, ActivityClassParameter[] acps_) Creates a map whose keys are ACP keys (ACP~i) and whose values are the values that match the request parameters whose names are bound the corresponding ACP names.buildParameterMap
(javax.servlet.http.HttpServletRequest q_, FormElementBinding[] bindings_, ProcessVariable[] pvs_) Creates a map whose keys are process parameter keys (PP~x) and whose values are the values that match the request parameters whose names are bound the corresponding process variable names.com.appiancorp.web.framework.kernel.main.IActionForward
getAttendedNodeConfirmationResponse
(javax.servlet.http.HttpServletRequest q_, String url_) Gets the forward after the task was started successfullycom.appiancorp.web.framework.kernel.main.IActionForward
getProcessStartConfirmationResponse
(javax.servlet.http.HttpServletRequest q_, Long processId_, Long processModelId_) Gets the forward after the process was started successfullyretrieveInputs
(byte[] form_) Deprecated.retrieveInputs
(InputStream form_) Gets the list of inputs on the form using an InputStream as the source.byte[]
transformNodeForm
(byte[] originalForm_, String submitAction_, Map<String, String> extraParameters_, Map<String, Object> defaultValues_) The transformNodeForm method will be used for both process start and attended node forms.
-
Method Details
-
transformNodeForm
byte[] transformNodeForm(byte[] originalForm_, String submitAction_, Map<String, String> extraParameters_, Map<String, Object> defaultValues_) The transformNodeForm method will be used for both process start and attended node forms. When modifying the attended node forms, the extraParameters_ will have a key with String value of $taskId, and its value will be the current task id. For process start forms, again one parameter will be passed in, containing the key $processModelId and the value of the process model id for the process to be started. All extra parameters passed in must be created as hidden inputs on the original form.- Parameters:
originalForm_
- the parsed data of the collaboration document corresponding to theInternalForm
submitAction_
- the class name of the action to which the form should be submittedextraParameters_
- map of parameter keys with values, that might be injected by the framework as necessary. For example,taskId
for node start forms, andprocessModelId
for process start forms.- Returns:
- the transformed form with the process specific or node specific information
-
retrieveInputs
Deprecated.Use retrieveInputs(InputStream
) version instead (deprecated in 6.2).Gets the list of inputs on the form.- Parameters:
form_
- the form- Returns:
- a list of input names on the form
- Throws:
IOException
-
retrieveInputs
Gets the list of inputs on the form using an InputStream as the source. This allows for better performance when handling large files.- Parameters:
form_
- the form- Returns:
- a list of input names on the form
- Throws:
IOException
-
buildParameterMap
Map buildParameterMap(javax.servlet.http.HttpServletRequest q_, FormElementBinding[] bindings_, ActivityClassParameter[] acps_) Creates a map whose keys are ACP keys (ACP~i) and whose values are the values that match the request parameters whose names are bound the corresponding ACP names. Does not support ACPs that are beans and bean arrays.- Parameters:
q_
- an HTTP request, containing request parameters whose names map to theformInput
property of thebindings_
bindings_
- a binding of request names to acp namesacps_
- the ACPs for the activity being executed- Returns:
- a map that binds ACP keys to submitted values
-
buildParameterMap
Map buildParameterMap(javax.servlet.http.HttpServletRequest q_, FormElementBinding[] bindings_, ProcessVariable[] pvs_) Creates a map whose keys are process parameter keys (PP~x) and whose values are the values that match the request parameters whose names are bound the corresponding process variable names.- Parameters:
q_
- an HTTP request, containing request parameters whose names map to theformInput
property of thebindings_
bindings_
- a binding of request names to pv namespvs_
- process variable (parameters)- Returns:
- a map that binds process parameter keys to submitted values
-
getAttendedNodeConfirmationResponse
com.appiancorp.web.framework.kernel.main.IActionForward getAttendedNodeConfirmationResponse(javax.servlet.http.HttpServletRequest q_, String url_) Gets the forward after the task was started successfully- Parameters:
q_
- the request- Returns:
- the forward after the task start has been confirmed
-
getProcessStartConfirmationResponse
com.appiancorp.web.framework.kernel.main.IActionForward getProcessStartConfirmationResponse(javax.servlet.http.HttpServletRequest q_, Long processId_, Long processModelId_) Gets the forward after the process was started successfully- Parameters:
q_
- the request- Returns:
- the forward after the process start has been confirmed
-
InputStream
) version instead (deprecated in 6.2).