About the Design Considerations for Code-Based Wizards

When designing a code-base wizard for Aptify, keep in mind the following important guidelines defined in the following sub-topics:

Implement the IAptifyAction Interface

All code-based wizards developed for Aptify must implement the Aptify.Framework.Application.IAptifyAction interface. See Writing an Entity Action Wizard and the Aptify Software Development Kit (SDK) for more information on this interface.


Determine Whether You Need Third-Party Controls

Unlike the other code-based configurations described in this guide (such as an entity object or a layout control), creating a wizard involves writing code and designing an appropriate graphical user interface. Depending on the UI elements you add to the wizard, you may need one or more third-party controls to implement Aptify controls within a Visual Studio UI Design environment.

  • If you intend to use Aptify Windows controls, such as Link Box, in a wizard, your development environment needs Infragistics NetAdvantage 2008 Volume 1installed.
  • If you intend to use an Aptify Entity List View grid in a wizard, your development environment needs ComponentOne Studio installed.

See Third-Party Software Requirements for more information.

Your development environment needs Infragistics NetAdvantage 2008 Volume 1 to load the UI Design interface in Visual Studio for either of the wizard included with the sample application. (Both the wizards use the AptifyLinkBox control, which in turn leverages Infragistics controls.)

Note that even if you do not have Infragistics NetAdvantage 2008 Volume 1, while you cannot review the wizard's UI design, you can still review the underlying code for the project.


Identify the Data Source for the Wizard

Most wizards fall into one of two categories: Data Entry or Batch Processing.

A Data Entry wizard performs a single record operation based on input provided by a user. These types of wizards are primarily created to assist a user with a particular task, such as canceling an order or checking out a vehicle. Both of the wizards included with the sample application are data entry wizards.

Since this types of wizard operates on a single record, it does not require a view to provide a data source and can be launched from any of the locations supported by an entity action, including from an entity browser (the display window that appears when a service is selected), a list view's toolbar, a prompt view's toolbar, a temporary view's toolbar, and a dashboard button. You can specify where a wizard icon can appear in the Entity Actions record (see Adding a Code-Based Wizard to Aptify for details).

A Batch Processing wizard performs an operation on a set of records of the same type (such as Persons records). Typically, this type of wizard is tied to an entity list view, and the wizard processes the records returned by that source view. For any wizard that requires an entity list view to provide its source, that wizard cannot be launched from an entity browser and a developer needs to specify a source view when linking the wizard to a dashboard button. See Supporting Prompt Views for information on how to configure your wizard so it can run from prompt views.


Consider Using an Entity Bulk Operation for Batch Processes

In some cases, you may be able to implement an Entity Bulk Operation instead of writing a new batch processing wizard. An Entity Bulk Operation is suitable for simple operations that update one or more fields in a set of records (such as updating a status field). Also, Aptify provides a standard process component so you can easily automate the execution of your Entity Bulk Operation via a Process Flow.

See Administering Entity Bulk Operations for information creating Entity Bulk Operations.


Supporting Prompt Views

If you want a batch processing wizard to operate on a set of records returned by a prompt view with the current user input, then your wizard's DoAction function should include the following code to support results from a prompt view:

If m_oApp.Command.Parameters.IndexOf("ViewSQL") < 0 Then
   sViewSQL = m_oApp.View(lViewID).ViewSQL
Else
   sViewSQL = m_oApp.Command.Parameters.Item("ViewSQL").ToString()
End If 

 

Note that in the above code sample, m_oApp is a reference to the current instance of the Application Object.


Separate UI from Logic for Wizards

For wizards that perform a function that is suitable for automated execution, Aptify recommends that you consider separating the wizard's user interface from its logic.

By implementing the Aptify.Framework.BusinessLogic.ProcessPipeline.IProcessComponent interface, a developer could create a Process Component for the wizard's object class. This process component could then be used within process flows to automate the execution of the wizard's logic.

Note that in this case, the wizard's UI class would call the wizard's object when appropriate to perform the wizard's function.

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.