Can't set scheduled effort through PPM webservices

Hi,

 

I'm trying to create a task, through PPM webservices API, and I'm not being able to set scheduled effort for the new created task. The task is successfully created, but the scheduled effort is calculated automatically. I used the method setScheduledEffort, but no success. The scheduled effort remains the duration set value * 8 (working hours). So, in the case where my duration is 3, the task scheduled effort is automatically set to 24. 

 

Can someone help me with this issue?

 

Thanks

Parents
  • Hi,

     

    What about setting both duration and effort like the example in the programmer's guide:

     

    // create and add task scheduling bean to task.
    ScheduleInfo sif = task1.addNewSchedulingBean();
    sif.setScheduledDuration(4);
    sif.setScheduledEffort(34);
    sif.setScheduledStart(taskScheduleStart);
    sif.setScheduledFinish(taskScheduleFinish);
    sif.setConstraintType(ConstraintType.AS_SOON_AS_POSSIBLE);

     

    Does that work for you?

     

    Regards,

     

    Nikola

  • Hi,

     

    I tried this code. In this case, the scheduled effort ends up with a value of 48. Duration * 8. Is there a way to enable, through webservices, the manual control over the task schedule?

     

    Thanks,

Reply Children
  • Hi,

     

    Can you attach your code here?

     

    Thanks,


    Nikola

  • Hi,

     

    I'm using the following code:

     

    ImportWorkPlanTasksDocument impWPDoc = ImportWorkPlanTasksDocument.Factory.newInstance();
    ImportWorkPlanTasks impWP = impWPDoc.addNewImportWorkPlanTasks();
    WorkPlanInputType wpit = impWP.addNewWorkPlanInput();

    wpit.setProjectName(projectName);


    TaskType task1 = impWP.addNewTasks();
    ScheduleInfo sif = task1.addNewSchedulingBean();
    TaskActualType tat = task1.addNewActuals();

    task1.setOutlineLevel(1);

    task1.setTaskSequence(2);

    task1.setTaskName("Tarefa 1");

    sif.setScheduledEffort(20);

    sif.setScheduledDuration(3);

    tat.setActualEffort(30);

    Calendar taskScheduleStart = Calendar.getInstance();
    int YEAR; String int; int DAY; int HOUR; int MINUTE;

    YEAR = 2012
    MONTH = 08
    DAY = 12
    HOUR = 00
    MINUTE = 00

    taskScheduleStart.set (YEAR, MONTH, DAY, HOUR, MINUTE);
    sif.setScheduledStart(taskScheduleStart);
    sif.setScheduledFinish(taskScheduleStart);

    Calendar taskRealStart = Calendar.getInstance();
    int IRTYEAR; int IRTMONTH; int IRTDAY; int IRTHOUR; int IRTMINUTE;

    IRTYEAR = 2012
    IRTMONTH = 08
    IRTDAY = 13
    IRTHOUR = 00
    IRTMINUTE = 00

     

    taskRealStart.set(IRTYEAR, IRTMONTH, IRTDAY, IRTHOUR, IRTMINUTE);
    tat.setActualStart(taskRealStart);


    ProjectServiceStub stub = new ProjectServiceStub(CTX, PROJECT_SERVICE_URL);

    WSSecurityUtil.setHttpBasicAuthHeader(stub,PPMC_DOMAIN,PPMC_USER,PPMC_USER_PWD);

    AddTaskResultType[] addedTasks = impResponseDoc.getImportWorkPlanTasksResponse().getReturnArray();

     

    Thanks,