Using the HAT Software Factory
The HAT Software Factory (HAT SF) provides tools create a CCF Studio hosting solution including Automations using the WF Designer. This section demonstrates how to use the HAT SF Visual Studio plug-in, Hosted Application Project, and application inspector to configure applications and create bindings.
To create a new automation project:
- Start Visual Studio.
- Click File > New Project.
- In the New Project dialog box, select the Guidance Packages > CCF Application Hosting Solution as the Project Type.
- Enter a name and location for the project and click OK.
A new solution is created, which contains the folders Applications and Automations.
The Applications folder contains hosted applications of the solution and the Automations folder contains the Automation projects.
Note: |
|---|
| Ensure that you do not rename the default folders Applications, Controls, and Automations. HAT cannot read the project components if the folders are renamed. |
- Right click on the Applications folder to view the Applications context menu.
The menu has the following items:
- Add Application displays the Add Application wizard that creates the application hosting DDA.
- Deploy to Server allows you to deploy application configurations for one or more of your applications to the CCF Server.
- Import from Server allows you to import application configurations for one or more of your application from the CCF server.
- Select Add Application to view the Add Application wizard.
The wizard displays the following options:
- HTML (Web Application) to host a web application.
- Java (External Application) to host a Java SWT, AWT, or Swing application.
- Windows (External Application) to host a Win32, .Net application or other application supporting MSAA.
- Generic to host any other application type that does not classify in any of the other three categories.
Note:In this example, we will create two applications – a HTML (Web Application) to host live.com and a Windows (External Application) to host Notepad. You must enter the application URL (or application path) in the next window to create the application. The Applications node lists all the applications created.
- After creating the applications, you must next configure the applications using the context-menu for the applications. Right-click on the application to view the Application Context menu.
Option
Description
Inspect UI
To initiate the Application Inspector to inspect the application controls. For more information, see Application Inspector.
Inspect UI As..
To launch the Application Inspector with different credentials.
Add Controls
To manually add control bindings.
Deploy to server
To deploy the application configuration to the CCF server.
Show XML
Displays the application’s Init string including the DDA bindings.
Properties
Displays the application properties
Note: |
|---|
| When using Inspect UI As.. for Windows applications with different access rights, the Application Inspector may sometimes not inspect the controls. In such cases, ensure that Visual Studio and the target application run with the same privileges and that you use “Inspect UI” option instead of Inspect UI As... While inspecting application with the Inspect UI As.. function, if the application uses the Set Parent method of hosting, the application bindings may have errors. While using the Set Parent method, you must select Use FindWindow in the Alternate Top-Level window section and specify the Caption and Class for the application window. |
- Select Properties to show the hosting properties for the selected application.
The following table describes the application hosting properties for the different application types. The properties are directly mapped to the properties in the CCF Admin Console, for more information see the Managing Hosted Controls section of the CCF 2009 SP1 Deployment Guide.
|
Property |
Description | |
|---|---|---|
|
Adapter Settings | ||
|
AdapterMode |
Describes the type of adapter used (HAT uses AutomationAdapter). | |
|
DataDrivenAdapterType |
DDA assembly name in the format – class,assembly. Example: Microsoft.Ccf.HostedApplicationToolkit.DataDrivenAdapter.WinDataDrivenAdapter, Microsoft.Ccf.HostedApplicationToolkit.DataDrivenAdapter | |
|
LegacyAdpaterType |
If the AdapterMode is not set, you can specify the legacy adapter. | |
|
General Settings | ||
|
Display Group |
The display group in the Integrated Desktop (ID) where the application will be hosted. The property is ignored if the “Host inside” is set to False for an External Application (optional). | |
|
Dynamic |
If set to true the application can be loaded dynamically. The default is False. | |
|
DynamicCanClose |
If set to true the application can be closed dynamically. The default is False. | |
|
DynamicShowInToolbar |
If set to true the application is displayed in the ID’s Dynamic Applications menu. The default is False. | |
|
Global |
If set to true the application is run globally, and is independent from the session context. The default is False. | |
|
MinimumSize |
Minimum size of the application window in ID. The default is 0, 0. While hosting applications with windows that are not resizable, ensure that you set the set the minimum size property of the application. | |
|
OptimumSize |
The display size of the application in the ID. The default is 0, 0. | |
|
WorkflowDependent |
If set to true the application need to load for workflows to process. The default is False. | |
|
External Application settings | ||
|
AcquisitionTimeOut |
Timeout period for the top-window handle to be found. | |
|
AlternateTopLevelWindowCaption |
Caption specified will be used to find the top-level window. | |
|
AlternateTopLevelWindowClass |
Class specified will be used to find the top-level window. | |
|
HostInside |
If set to true, the application is hosted inside the ID. The default is True. | |
|
InteropAssemblyArguments |
Arguments used during application initiation | |
|
InteropAssemblyUrl |
The path of the executable | |
|
InteropAssemblyWorkingDirectory |
The working directory for the executable | |
|
NoMessagePump |
If set to true, the application does not have any windows messaging queue. | |
|
applicationShowMenu |
If set to true, displays the system menu for the application. | |
|
Hosted Web Application properties | ||
|
HomePageUrl |
The URL of the web application. | |
|
UseNewBrowserProcess |
If set to true, the application is initiated in new Internet Explorer (IE) process. | |
|
UseToolbar |
If set to true, displays the IE toolbar. | |
Note: |
|---|
| You must re-inspect the controls in the application, if you change the HostInside settings for HostInside. This is done because, occasionally, the accessibility tree is affected by the hosting method and hence requires different bindings for a control. |