Part 6. Acquiring application patterns into Rational Application Developer
Just as publishing an application pattern created in Rational Application Developer to Workload Deployer establishes a link between the pattern in your workspace and the pattern on Workload Deployer, so does acquiring an application pattern created in Workload Deployer into Rational Application Developer. Publication and acquisition also have the effect of synchronizing the application pattern between Rational Application Developer and Workload Deployer. The pivotal difference is in the direction of the synchronization.
- When you publish or republish an application pattern from Rational Application Developer to Workload Deployer, the application pattern model and its artifacts are updated with content from the Rational Application Developer workspace.
- When you acquire or reacquire an application pattern into Rational
Application Developer from Workload Deployer, the application
pattern model in Rational Application Developer is updated with
content from Workload Deployer.
Note: Unlike for publication, Rational Application Developer does not support the acquisition of component artifacts. It only supports the acquisition of the application pattern model.
In this part of the tutorial, you acquire the application you created in Part 5. Creating application patterns in Workload Deployer into Rational Application Developer.
- In Rational Application Developer, in the Servers view, right-click on the Workload Deployer server and select Acquire Cloud Application to open the Acquire Cloud Application wizard.
- Click Perform query.
A progress dialog appears for a few moments while Rational Application Developer retrieves from Workload Deployer the list of virtual application patterns you are permitted to read. The application you created in the previous part of the tutorial, AjaxHelloWeb, appears near the top of the list of Cloud Applications.
- Select AjaxHelloWeb : application from the list
as shown in Figure 21.
Figure 21. Querying application patterns
- Click Next.
- Under "Select a project", select the Cloud apps project.
- In the File name field, replace
appmodel.jsonwith the name
- Click Next.
- Observe that a Web Application component of type WAR appears is in
the table of associations, but without an associated project
location as shown in Figure 22. Ordinarily, this is a good
opportunity to associate workspace projects to components.
However, for the purposes of this tutorial, leave the component
without an associated project for now.
Figure 22. An unassociated component
- Click Finish.
- In the Servers view, observe that the AjaxHelloWeb application has appeared as a new child of the Workload Deployer server.
The Rational Application Developer tools for Workload Deployer include a validator that detects a small number of significant warning and error conditions. Near the end of the previous set of steps, you did not associate a project to the Web Application component. As an example, one of the conditions the validator detects is the presence of components of types recognized by Rational Application Developer that do not have associated projects.
- In Rational Application Developer, select the Problems view.
- Expand Warnings as shown in Figure 23.
Figure 23. The Problems view
- Near the top of the list of warnings, you see a warning for the
AjaxHelloWeb.json resource that reads:
Component Web Application does not have an association.
Explanation: Rational Application Developer is calling to your attention that you have a component without an associated project. In practice, this may indicate a problem, or it may not. For example, if one of your colleagues is responsible for providing the associated project, then it is likely you neither have nor need the project in your workspace and you can ignore the warning.
- In the Enterprise Explorer view, under Cloud apps > applicationModels, right-click on AjaxHelloWeb.json and select Associate Application Model to open the Associate Application Model dialog.
- In the table of associations, select component Web Application. Notice the associated project location field is still blank.
- Click Edit to open the Edit Association dialog.
- The dialog should show you the three Web projects in your
workspace as shown in Figure 24. Select project
Figure 24. Associating a project
- Click OK to return to the Associate Application
Model dialog. Notice the associated project location field now
shows the associated project location,
- Click OK to apply the association and close the dialog.
- In the Problems view, confirm that the validation warning has vanished.
- By associating a project with a component, you have effectively changed the application pattern and should publish the change to Workload Deployer so that Rational Application Developer and Workload Deployer are in sync. In the Servers view, right-click on the Workload Deployer server and select Publish.
Rational Application Developer dispatches a background job to export
and publish the updated virtual application pattern to Workload
Deployer. After a few moments, the publication job completes normally,
and the state and status of the AjaxHelloWeb virtual application
pattern change to