Change Progress of a Task
Changing progress of a Task Aspose.Tasks for Java supports changing a task’s progress in terms of its percentage completion through the Task class’ SetPercentComplete() method. This method takes an integer argument as input for the percentage work completed.
The following piece of code shows how to change the progress of a task.
1// For complete examples and data files, please go to https://github.com/aspose-tasks/Aspose.Tasks-for-Java
2// The path to the documents directory.
3String dataDir = Utils.getDataDir(ChangeProgressOfTask.class);
4
5Project project = new Project();
6System.out.println(project.getCalculationMode());
7
8Task task = project.getRootTask().getChildren().add("Task");
9task.set(Tsk.DURATION, project.getDuration(2));
10task.set(Tsk.PERCENT_COMPLETE, 50);