Skip to content

Commit 60e2291

Browse files
Updated task baselines exmaples
1 parent 7296273 commit 60e2291

File tree

4 files changed

+163
-123
lines changed

4 files changed

+163
-123
lines changed

content/english/java/task-baselines/_index.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,8 @@ url: /java/task-baselines/
1010

1111
## Task Baselines Tutorials
1212
### [Baseline Task Scheduling in Aspose.Tasks](./baseline-task-scheduling/)
13-
### [Creating a Task Baseline in Aspose.Tasks](./create-task-baseline/)
14-
### [Task Baseline Duration Management in Aspose.Tasks](./task-baseline-duration/)
13+
Learn how to schedule task baselines effectively with Aspose.Tasks for Java. Streamline your project management processes effortlessly.
14+
### [Create MS Project Task Baseline in Aspose.Tasks](./create-task-baseline/)
15+
Learn how to create a Microsoft Project task baseline in Java using Aspose.Tasks, a powerful library for managing project data effortlessly.
16+
### [Task Baseline Duration Management in Aspose.Tasks](./task-baseline-duration/)
17+
Learn how to efficiently manage task baselines in MS Project using Aspose.Tasks for Java. This tutorial guides you step-by-step through the process.

content/english/java/task-baselines/baseline-task-scheduling/_index.md

Lines changed: 51 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,45 +2,64 @@
22
title: Baseline Task Scheduling in Aspose.Tasks
33
linktitle: Baseline Task Scheduling in Aspose.Tasks
44
second_title: Aspose.Tasks Java API
5-
description:
5+
description: Learn how to schedule task baselines effectively with Aspose.Tasks for Java. Streamline your project management processes effortlessly.
66
type: docs
77
weight: 10
88
url: /java/task-baselines/baseline-task-scheduling/
99
---
10-
11-
## Complete Source Code
10+
## Introduction
11+
Managing task baselines is a crucial aspect of project management, enabling you to compare planned versus actual progress accurately. In this tutorial, we'll explore how to perform baseline task scheduling using Aspose.Tasks for Java. By following these steps, you'll be equipped to streamline your project management processes efficiently.
12+
## Prerequisites
13+
Before we begin, ensure you have the following prerequisites in place:
14+
### Java Development Environment
15+
Make sure you have Java Development Kit (JDK) installed on your system. You can download and install JDK from the [website](https://www.oracle.com/java/technologies/javase-jdk11-downloads.html).
16+
### Aspose.Tasks for Java Library
17+
Download the Aspose.Tasks for Java library from the [download page](https://releases.aspose.com/tasks/java/) and include it in your Java project.
18+
## Import Packages
19+
Start by importing the necessary packages into your Java project:
1220
```java
13-
/*
14-
* Copyright 2001-2022 Aspose Pty Ltd. All Rights Reserved.
15-
*
16-
* This file is part of Aspose.Tasks. The source code in this file
17-
* is only intended as a supplement to the documentation, and is provided
18-
* "as is", without warranty of any kind, either expressed or implied.
19-
*/
20-
21-
22-
2321
import com.aspose.tasks.BaselineType;
2422
import com.aspose.tasks.Project;
2523
import com.aspose.tasks.Task;
2624
import com.aspose.tasks.TaskBaseline;
27-
28-
public class BaselineTaskScheduling {
29-
public static void main(String[] args) {
30-
Project project = new Project();
31-
// Creating TaskBaseline:
32-
Task task = project.getRootTask().getChildren().add("Task");
33-
project.setBaseline(BaselineType.Baseline);
34-
35-
TaskBaseline baseline = task.getBaselines().get(0);
36-
System.out.println(baseline.getDuration().toString());
37-
System.out.println("Baseline Start: " + baseline.getStart());
38-
System.out.println("Baseline Finish: " + baseline.getFinish());
39-
}
40-
}
41-
42-
43-
44-
45-
4625
```
26+
Now, let's break down the provided example into multiple steps:
27+
## Step 1: Create a New Project Instance
28+
```java
29+
Project project = new Project();
30+
```
31+
## Step 2: Define a Task and Set Baseline
32+
```java
33+
Task task = project.getRootTask().getChildren().add("Task");
34+
project.setBaseline(BaselineType.Baseline);
35+
```
36+
## Step 3: Access Baseline Information
37+
```java
38+
TaskBaseline baseline = task.getBaselines().get(0);
39+
```
40+
## Step 4: Display Baseline Duration
41+
```java
42+
System.out.println(baseline.getDuration().toString());
43+
```
44+
## Step 5: Display Baseline Start Date
45+
```java
46+
System.out.println("Baseline Start: " + baseline.getStart());
47+
```
48+
## Step 6: Display Baseline Finish Date
49+
```java
50+
System.out.println("Baseline Finish: " + baseline.getFinish());
51+
```
52+
By following these steps, you can effectively utilize Aspose.Tasks for Java to manage task baselines within your projects.
53+
## Conclusion
54+
In conclusion, mastering baseline task scheduling is essential for accurate project management. With Aspose.Tasks for Java, you can effortlessly handle task baselines and ensure alignment between planned and actual progress, leading to successful project outcomes.
55+
## FAQ's
56+
### Can Aspose.Tasks for Java handle complex project structures?
57+
Yes, Aspose.Tasks for Java offers robust capabilities to manage projects of varying complexities efficiently.
58+
### Is Aspose.Tasks for Java compatible with other Java libraries?
59+
Absolutely, Aspose.Tasks for Java seamlessly integrates with other Java libraries, enhancing your project management capabilities.
60+
### Can I customize task baselines using Aspose.Tasks for Java?
61+
Certainly, Aspose.Tasks for Java provides extensive functionalities to customize and manage task baselines according to your project requirements.
62+
### Is there a trial version available for Aspose.Tasks for Java?
63+
Yes, you can access a free trial of Aspose.Tasks for Java from the [release page](https://releases.aspose.com/).
64+
### Where can I find support for Aspose.Tasks for Java?
65+
For any queries or assistance, you can visit the Aspose.Tasks forum [here](https://forum.aspose.com/c/tasks/15).
Lines changed: 46 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,61 @@
11
---
2-
title: Creating a Task Baseline in Aspose.Tasks
2+
title: Create MS Project Task Baseline in Aspose.Tasks
33
linktitle: Creating a Task Baseline in Aspose.Tasks
44
second_title: Aspose.Tasks Java API
5-
description:
5+
description: Learn how to create a Microsoft Project task baseline in Java using Aspose.Tasks, a powerful library for managing project data effortlessly.
66
type: docs
77
weight: 11
88
url: /java/task-baselines/create-task-baseline/
99
---
10-
11-
## Complete Source Code
10+
## Introduction
11+
In this tutorial, we'll delve into the process of creating a Microsoft Project task baseline using Aspose.Tasks for Java. Aspose.Tasks is a powerful Java library that enables developers to work with Microsoft Project files without requiring Microsoft Project to be installed. With Aspose.Tasks, you can effortlessly manipulate project data, including tasks, resources, and calendars, to streamline project management tasks.
12+
## Prerequisites
13+
Before we begin, ensure you have the following prerequisites:
14+
1. Java Development Kit (JDK): Aspose.Tasks for Java requires JDK installed on your system. You can download and install JDK from the official Oracle website.
15+
2. Aspose.Tasks for Java Library: Download the Aspose.Tasks for Java library from the [download link](https://releases.aspose.com/tasks/java/) provided.
16+
17+
## Import Packages
18+
To start working with Aspose.Tasks in your Java project, import the necessary packages:
1219
```java
13-
/*
14-
* Copyright 2001-2022 Aspose Pty Ltd. All Rights Reserved.
15-
*
16-
* This file is part of Aspose.Tasks. The source code in this file
17-
* is only intended as a supplement to the documentation, and is provided
18-
* "as is", without warranty of any kind, either expressed or implied.
19-
*/
20-
21-
22-
2320
import com.aspose.tasks.BaselineType;
2421
import com.aspose.tasks.Project;
2522
import com.aspose.tasks.Task;
26-
27-
2823
import java.util.ArrayList;
2924
import java.util.List;
25+
```
3026

31-
public class CreatingATaskBaseline {
32-
public static void main(String[] args) {
33-
Project project = new Project();
34-
35-
// Creating TaskBaseline:
36-
Task task = project.getRootTask().getChildren().add("Task");
37-
// set baseline for specified tasks
38-
List<Task> myList = new ArrayList<Task>();
39-
project.setBaseline(BaselineType.Baseline, (Iterable<Task>) myList);
40-
// or set baseline for the entire project
41-
project.setBaseline(BaselineType.Baseline);
42-
}
43-
}
44-
45-
46-
47-
48-
27+
## Step 1: Create a Project Object
28+
```java
29+
Project project = new Project();
30+
```
31+
First, create a new `Project` object. This object represents the Microsoft Project file you'll be working with.
32+
## Step 2: Add a Task to the Project
33+
```java
34+
Task task = project.getRootTask().getChildren().add("Task");
35+
```
36+
Using the `getRootTask()` method, access the root task of the project and then add a new task to it using the `add()` method. Provide a name for the task within the parentheses.
37+
## Step 3: Set Baseline for Specified Tasks
38+
```java
39+
List<Task> myList = new ArrayList<Task>();
40+
project.setBaseline(BaselineType.Baseline, (Iterable<Task>) myList);
41+
```
42+
To set a baseline for specific tasks, create a list of tasks (`myList` in this case) and populate it with the tasks for which you want to set the baseline. Then, use the `setBaseline()` method, specifying the baseline type and the list of tasks.
43+
## Step 4: Set Baseline for the Entire Project
44+
```java
45+
project.setBaseline(BaselineType.Baseline);
4946
```
47+
Alternatively, you can set a baseline for the entire project by simply calling the `setBaseline()` method with the baseline type specified.
48+
49+
## Conclusion
50+
In this tutorial, we've explored how to create a Microsoft Project task baseline using Aspose.Tasks for Java. By following the steps outlined above, you can efficiently manage project data and streamline project management tasks with ease.
51+
## FAQ's
52+
### Can I use Aspose.Tasks for Java without Microsoft Project installed?
53+
Yes, Aspose.Tasks for Java allows you to work with Microsoft Project files without requiring Microsoft Project to be installed on your system.
54+
### Is Aspose.Tasks for Java compatible with different versions of Microsoft Project?
55+
Yes, Aspose.Tasks for Java supports various versions of Microsoft Project, ensuring compatibility across different environments.
56+
### Can I manipulate project resources using Aspose.Tasks for Java?
57+
Absolutely, Aspose.Tasks for Java provides robust features for manipulating project resources, including adding, updating, and removing resources as needed.
58+
### Does Aspose.Tasks for Java support setting task dependencies?
59+
Yes, you can set task dependencies effortlessly using Aspose.Tasks for Java, enabling you to establish the sequence of tasks within your project.
60+
### Is technical support available for Aspose.Tasks for Java?
61+
Yes, you can access technical support for Aspose.Tasks for Java via the [support forum](https://forum.aspose.com/c/tasks/15), where you can ask questions and seek assistance from the community and Aspose support staff.

content/english/java/task-baselines/task-baseline-duration/_index.md

Lines changed: 61 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -2,71 +2,77 @@
22
title: Task Baseline Duration Management in Aspose.Tasks
33
linktitle: Task Baseline Duration Management in Aspose.Tasks
44
second_title: Aspose.Tasks Java API
5-
description:
5+
description: Learn how to efficiently manage task baselines in MS Project using Aspose.Tasks for Java. This tutorial guides you step-by-step through the process.
66
type: docs
77
weight: 12
88
url: /java/task-baselines/task-baseline-duration/
99
---
10-
11-
## Complete Source Code
10+
## Introduction
11+
Managing task baselines in MS Project is crucial for project planning and tracking. In this tutorial, we'll explore how to effectively manage task baseline durations using Aspose.Tasks for Java.
12+
## Prerequisites
13+
Before we begin, ensure you have the following:
14+
1. Java Development Environment: Make sure you have Java Development Kit (JDK) installed on your system.
15+
2. Aspose.Tasks Library: Download and install the Aspose.Tasks for Java library from [here](https://releases.aspose.com/tasks/java/).
16+
17+
## Import Packages
18+
First, import the necessary packages for your Java project:
1219
```java
13-
/*
14-
* Copyright 2001-2022 Aspose Pty Ltd. All Rights Reserved.
15-
*
16-
* This file is part of Aspose.Tasks. The source code in this file
17-
* is only intended as a supplement to the documentation, and is provided
18-
* "as is", without warranty of any kind, either expressed or implied.
19-
*/
20-
21-
22-
2320
import com.aspose.tasks.BaselineType;
2421
import com.aspose.tasks.Project;
2522
import com.aspose.tasks.Task;
2623
import com.aspose.tasks.TaskBaseline;
2724
import com.aspose.tasks.TimeUnitType;
2825
import com.aspose.tasks.TimephasedData;
29-
30-
31-
public class TaskBaselineDuration {
32-
public static void main(String[] args) {
33-
long OneSec = 10000000; // microsecond * 10
34-
long OneMin = 60 * OneSec;
35-
long OneHour = 60 * OneMin;
36-
37-
Project project = new Project();
38-
39-
// Creating TaskBaseline:
40-
Task task = project.getRootTask().getChildren().add("Task");
41-
project.setBaseline(BaselineType.Baseline);
42-
43-
// Display task baseline duration
44-
TaskBaseline baseline = task.getBaselines().toList().get(0);
45-
System.out.println(baseline.getDuration().toDouble() / OneHour + " Hours");
46-
System.out.println("Baseline Start: " + baseline.getStart());
47-
System.out.println("Baseline duration: " + baseline.getDuration());
48-
System.out.println("Baseline duration format: " + TimeUnitType.toString(TimeUnitType.class, baseline.getDuration().getTimeUnit()));
49-
System.out.println("Is it estimated duration?: " + baseline.getEstimatedDuration());
50-
System.out.println("Baseline Finish: " + baseline.getFinish());
51-
52-
// value indicating whether this is an Interim Baseline
53-
System.out.println("Interim: " + baseline.getInterim());
54-
System.out.println("Fixed Cost: " + baseline.getFixedCost());
55-
56-
// print timephased data of task baseline
57-
System.out.println("Number of timephased items: " + baseline.getTimephasedData().size());
58-
for(TimephasedData data : baseline.getTimephasedData())
59-
{
60-
System.out.println(" Uid: " + data.getUid());
61-
System.out.println(" Start: " + data.getStart());
62-
System.out.println(" Finish: " + data.getFinish());
63-
}
64-
65-
}
26+
```
27+
## Step 1: Create a Project Instance
28+
Initialize a new project instance using the following code:
29+
```java
30+
Project project = new Project();
31+
```
32+
## Step 2: Create a Task Baseline
33+
Create a new task and set its baseline using the following code:
34+
```java
35+
Task task = project.getRootTask().getChildren().add("Task");
36+
project.setBaseline(BaselineType.Baseline);
37+
```
38+
## Step 3: Display Task Baseline Information
39+
Retrieve and display task baseline information such as duration, start date, finish date, and more:
40+
```java
41+
TaskBaseline baseline = task.getBaselines().toList().get(0);
42+
System.out.println("Baseline Start: " + baseline.getStart());
43+
System.out.println("Baseline Duration: " + baseline.getDuration());
44+
System.out.println("Baseline Duration Format: " + TimeUnitType.toString(TimeUnitType.class, baseline.getDuration().getTimeUnit()));
45+
System.out.println("Is it an Estimated Duration?: " + baseline.getEstimatedDuration());
46+
System.out.println("Baseline Finish: " + baseline.getFinish());
47+
```
48+
## Step 4: Check Interim Baseline and Fixed Cost
49+
Check if the baseline is an interim baseline and retrieve any fixed costs associated with it:
50+
```java
51+
System.out.println("Interim: " + baseline.getInterim());
52+
System.out.println("Fixed Cost: " + baseline.getFixedCost());
53+
```
54+
## Step 5: Print Timephased Data
55+
Print timephased data associated with the task baseline:
56+
```java
57+
System.out.println("Number of Timephased Items: " + baseline.getTimephasedData().size());
58+
for (TimephasedData data : baseline.getTimephasedData()) {
59+
System.out.println(" UID: " + data.getUid());
60+
System.out.println(" Start: " + data.getStart());
61+
System.out.println(" Finish: " + data.getFinish());
6662
}
67-
68-
69-
70-
71-
7263
```
64+
By following these steps, you can effectively manage task baseline durations in MS Project using Aspose.Tasks for Java.
65+
66+
## Conclusion
67+
Managing task baselines is essential for project management, allowing you to track deviations from the planned schedule. With Aspose.Tasks for Java, this process becomes streamlined and efficient, enabling better project control and delivery.
68+
## FAQ's
69+
### What is a task baseline in MS Project?
70+
A task baseline in MS Project is a snapshot of the initial planned schedule for a task, including its start date, finish date, and duration.
71+
### Why is managing task baselines important?
72+
Managing task baselines helps in comparing the planned schedule with the actual progress of the project, facilitating better tracking and decision-making.
73+
### Can I modify a task baseline once it's set?
74+
Yes, you can modify task baselines in MS Project to reflect changes in the project plan. However, it's essential to document any deviations from the original baseline.
75+
### Does Aspose.Tasks support other project management functionalities?
76+
Yes, Aspose.Tasks offers a wide range of features for project management, including task scheduling, resource allocation, and Gantt chart generation.
77+
### Where can I find support for Aspose.Tasks?
78+
You can find support for Aspose.Tasks on the [Aspose.Tasks forum](https://forum.aspose.com/c/tasks/15), where you can ask questions and interact with other users.

0 commit comments

Comments
 (0)