0% found this document useful (0 votes)
2 views

Form Processor

Uploaded by

khushbu.vijay50
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Form Processor

Uploaded by

khushbu.vijay50
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

Wizard Processing-

https://support.ptc.com/help/wnc/r12.0.0.0/en/index.html#page/
Windchill_Help_Center/WCCG_UICust_ConstructWizards_WizardProcess.html

If your wizard uses one of the built-in button sets, when a user clicks the Finish,
Apply, Save, or Check In button to submit the form, a javascript function is called
that invokes the processRequest() method of the ActionController. The WizardServlet
loads the HTTP form data and other wizard context information, such as where the
wizard was launched, into a NmCommandBean. It then passes the NmCommandBean to the
FormDispatcher class. The FormDispatcher calls the FormProcessorController.
The FormProcessorController partitions the form data into ObjectBeans. One
ObjectBean is created for each target object of the wizard. It contains all the
form data specific to that object and any form data that is common to all objects.
The FormProcessorController then passes the ObjectBeans to classes called
ObjectFormProcessors that perform the tasks appropriate to the wizard --- for
example, creating a new object in the database, updating an object in the database,
or checking in an object ObjectFormProcessors, in turn, can call classes called
ObjectFormProcessorDelegates to perform one or more subtasks.

preprocess- During this phase the setup for the database operation is done. For
example:
◦ for an object creation wizard, instances of the object(s) are created and their
attributes set from values in the form data
◦ for an object edit wizard, the object(s) are retrieved from the database and
their attributes are modified per the values in the form data
dooperation- Start a database transaction block
* Do the database operation. For example:
◦ for an object creation wizard, the object(s) would be stored in the database
◦ for an object edit wizard, the object(s) would be updated in the database
postprocess- Do database or other tasks that need to be done after the main
database operation but within the same transaction block so that the database
operation will be rolled back if these task fail. These tasks typically require
that the target object(s) be persisted beforehand. For example:
◦ share the object(s) to another container
◦ submit the object(s) to a workflow
posttransactionprocess- Do tasks that need to be done after the transaction block
is closed so that the entire database transaction will not be rolled back if the
tasks fail. For example:
◦ check out an object
Additional database operations may be performed in this phase if desired.
setresultextaction- If any method returns a status of FormProcessingStatus.FAILURE,
the controller will call the setResultNextAction() method of the
ObjectFormProcessor that failed so it can set information needed for the HTML
response page

The creation of ObjectBeans is handled by the FormProcessorController.

It is also possible for your ObjectFormProcessor's preProcess(), doOperation(),


postProcess(), and postTransactionProcess() methods to throw exceptions. In that
case, control will be returned to the ActionController which will set the variables
of the FormResult as follows:
• status - FormProcessingStatus.FAILURE
• exceptions - the thrown Exception
This will cause the response page to display the exception message in an alert
window and then close the wizard window.

You might also like