I am using MPXJ Java Api to create,read Microsoft Project Planner files in Java..I found out a specific problem while executing the code..The code executes the file is created ...My question is will this API calculate the Duration,EndDate etc automatically based on the child tasks???>..because when i open the file in Project Planner i can see the End Date and Duration of Task1 . But when i print that before writing to that file it is shown as null..Any suggestion ??
Thanks,.
ProjectFile file = new ProjectFile();
Task task1 = file.addTask();
task1.setName("Summary Task");
Task task2 = task1.addTask();
task2.setName("First Sub Task");
task2.setDuration(Duration.getInstance(10.5, TimeUnit.DAYS));
task2.setStart(df.parse("01/01/2003"));
System.out.println(task1.getFinish()); //printing null
ProjectWriter writer = getWriter("sample.mpx");
writer.write(file, "sample.mpx");