Lesson 7: Building with IBM Engineering Workflow Management Engineering Workflow ManagementBuild
This section examines the Engineering Workflow Management (EWM) Build user interface from the perspective of a developer who is a consumer of what EWM build provides. However, you must perform some setup that might normally be done by your build administrator or release engineer. To make the EWM Build produce what your project requires can involve quite a bit of customization and adoption of build scripts to meet your project requirements. Fortunately, EWM Build makes it easy to get it running so you can see how it operates as if it were working for your team.
About this task
- Define a schedule: A particular build operates on a schedule you define. Recall from the section on EWM source control that a team shares their development work in one or more team streams.
- Check for changes: When it is time to run a build for a team, EWM Build checks to see if there are any changes in the content of the team's streams and accepts the changes, known as change sets, into its own build workspace so it has a current copy of the stream(s).
- Fetch repository content and run build: The build then fetches the build workspace content to the file system where your build scripts perform the build.
- Publish artifacts to repository: Build artifacts are published into the EWM repository for access by users.
- Send notification that a build is complete: The status of all builds is reported in real time and you are automatically notified when builds complete.
- Define a build script (we'll let your Eclipse Jazz client do most of the work here)
- Define a build definition that identifies your build script
- Define a build engine to run the defined build
- Start the build engine that will respond to build requests, run builds, and publish results
Setting up an Eclipse workspace for the build team member
In this tutorial, the build team member that you created in an earlier lesson is the dedicated build user. Set up and configure a new Eclipse workspace for the build team member.
About this task
Procedure
- Switch to a new Eclipse workspace.
- Create a repository connection.
- Connect to the Prelude project area.
Results

Creating a dedicated repository workspace
You can create a dedicated repository workspace for use by the Jazz build definition for your project. During a build, the Jazz Build Engine, which is connected to the Jazz repository using a preassigned user identifier, uses this build workspace to identify the content to be built. First, it accepts any incoming changes from the team's stream and then loads the build workspace contents into the local file system for processing.
About this task
Procedure
- In the Team Artifacts view, right-click ; then click .
- In the New Repository Workspace wizard, on the Select a Stream page, click the Flow with a stream radio button and in the pane below, and select Prelude Stream (Prelude).
- Click Next.
- On the New Repository Workspace page, type the build workspace name Prelude Build Workspace and click Next.
- On the Select repository page, ensure that Use current repository is selected and click Next.
- On the Read Access Permission page, ensure that Public is selected and click Next.
- On the Components to Add page, confirm that the stream's component is selected and ensure that the Load repository workspace after creation check box is selected.
- Click Finish.
- On the Load Repository Workspace page, ensure that Find and load Eclipse projects is selected and click Next.
- On the Load Eclipse Projects page, ensure that the Hello World
project that you created in an earlier lesson is selected and click Finish.
The new repository workspace displays below the My Source Control folder.The workspace component has also loaded. Switch to the Package Explorer view, to view the Hello World project that you created earlier.
Creating a build script
To create a build script:
Before you begin
Procedure
- In the Package Explorer view, right-click a project; then click Export.
- In the Export wizard, on the Select page, under General, select Ant Buildfiles and click Next.
- On the Export page, ensure that your project and all check boxes are selected and click Finish.
Results

Creating a build definition and build engine
You can create a Jazz build definition for your project. The build definition is configured to use the new build workspace, so when the build runs it can accept any changes from the team stream before the start of the build.
About this task
Procedure
Results

Delivering the build script
Before we start the build engine to run our builds, recall that the build script (build.xml) in your Hello Prelude project has not been delivered to the stream. Without it, the Jazz Build Engine will not have the necessary instructions to run the build. Deliver the change.
Procedure
Results
Starting the build engine
Start the build engine to get ready to run a build.
Before you begin
About this task
Procedure
Results

Touring the Engineering Workflow Management Build User Interface
Learn about the build tasks you can do with EWM Build.
The Jazz client allows you to do the following build tasks:
- Request that a build run
- Monitor the status of builds
- Query available builds
- Inspect completed builds, identify, and retrieve the artifacts produced
Examine each of these tasks.
Requesting a build
You can request a build from the Team Artifacts view. You can also change build properties or request a personal build that does not affect the build definition status and that runs on a workspace that you specify.
About this task
Procedure
Results

If the build did not run correctly, examine the log file published in the build result.
Viewing build results
Let's open the build result and see what happened.
Procedure
- If you were quick you could have clicked on the build in the alert window above.
- Another way is to go the Team Artifacts view, expand your Prelude
project area and the Builds section. You will see your build definition. Open
the build result using menu action Open Latest Build Details.
The build result editor opens.
Results
You have completed the following tasks:
- You submitted a build request. It could have been initiated automatically on a predefined schedule.
- The request was received by the Jazz Build Engine along with the build definition.
- Using a build workspace configured in the build definition (Prelude Build
Workspace), the Jazz Build Engine
performed an accept operation to update the build workspace from the stream.
In the first build, this brought the newly created build script (
build.xml
) to the build workspace, which is essential to run a build. - The updated contents of the build workspace were loaded into the file system, using the directory named fetched in the build definition.
- The build script specified in the build definition is called. Our script compiled the
HelloWorld
project and created Java class files. A more sophisticated script might have created a jar file and published it back to Jazz. - When the script completes, the build log and any other published results are stored in the Jazz repository.
- The team is notified that the build has finished.
Build result editor
There a few things to point out about what the build result editor can offer:
- The status of the build: completed or not; successful or not.
- Start time, completion time, and duration.
- Any work items or source control changes associated with the build. In the example, below you
can see that one work item was included. If you were to open it, you would see that it is the work
item associated with the delivery of the
HelloWorld
build script. Notice in the Links section that there is a reference to the change sets that were included in the work item and the build containing these changes. In Jazz there is bidirectional traceability between work items, change sets, and builds. - You can create a work item or associate an existing work item with this build. This is particularly useful if the build failed.
- Build history. Selecting this displays the history detail in the Builds view (you need to request another build to see a history).
- The editor is extensible to include additional pages that your team might need.
Examining the build log
Examine the build log to see if our new build script worked.
Procedure
Monitoring the status of builds
Build status can be obtained passively or actively. Passive build information is provided in two ways: In the Team Dashboard view Build section and build alerts that briefly display on your screen.
As builds complete, in the Team Dashboard view, the Build section is updated with the status of completed builds for the team(s) you participate in.
For a selected build in this view, you can see the results of the build or request a new build.
To customize how often the status is updated:
- In the Team Dashboard view, from the Build section, click Menu; then click Update Refresh Interval. In the Build Section Refresh Interval Dialog box, type the refresh interval in seconds and click OK.
Finding available builds
You can see what builds are available, the status of running builds, and builds queued to run in the Builds view, which is accessible using the menu Show Build Results from the Builds folder in the Team Artifacts view.

The contents of the view can be sorted by selecting a column. There are several interesting menu actions. You can compare a build to the stream from which it was built or create a new stream from a build (helpful for creating a new code base from a proven code base).

You can also view build results by defining a build widget in your web-based Jazz dashboard:

The Jazz development team has been customizing its build process for awhile. Jazz's build results editor has additional tabs labeled Compilation, JUnit, and Downloads, and External Links. Here is a screen capture from a Jazz build so you can see what the potential is.

Lesson checkpoint
In this lesson, you learned the basics of the Engineering Workflow Management Build functionality.