Project and Portfolio Management Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Question on Adding workplan tasks using webservice

SOLVED
Go to solution
Highlighted
Navaneethan_A
Super Collector

Question on Adding workplan tasks using webservice

Can any one let me know if we can add subtasks randomly in an existing workplan using webservice?

 

Eg, I have task like

 

level1 task1

      sublevel1task1

level2task2

      sublevel2task2

 

I need to modify this like

 

level1 task1

      sublevel1task1

      sublevel1task2----I want to add this using webservice..is it possible?

level2task2

      sublevel2task2

 

 

 

Thanks & regards,

Navaneethan

6 REPLIES
AlexSavencu
Honored Contributor

Re: Question on Adding workplan tasks using webservice

Hi,

 

yes, it is possible. You have to embed logic in your code to identify the sequence of the task which will become parent and then insert your task.

 

The HP Web Services Programmers Guide has quite enough information and examples, so please check it.

 

cheers

alex

 

 


--remember to kudos people who helped solve your problem
Navaneethan_A
Super Collector

Re: Question on Adding workplan tasks using webservice

Hi Alex,

 

Thank you very much for your response.

 

I have checked the examples already. But it allows me to add tasks in the following scenario:

 

Eg: for a level 2 task, if I am adding multiple level 3 tasks sequentially it adds without any issue.

 

->if i add a new level 3 task for a level 2 task which is already having few level 3 tasks, then i am getting below error though i am giving the correct sequence. 

 

 

"The supplied top and bottom anchors are not sequential"

 

Any suggestions will be greatly helpful.

 

Thanks & Regards,

Navaneethan

Navaneethan_A
Super Collector

Re: Question on Adding workplan tasks using webservice

Hi Alex,

 

To be more clear I have given the below scenario

 

Seq 0 -> level1task

Seq 1 ->                level2task

Seq 2 ->                                level3task

Seq 3 ->                                level3task2----- >>>>> I am not able to insert a task below this

Seq 4 ->                level2task2

Seq 5 ->                                level3task3-----> I am able to add task below this(at the end)

 

Please suggest if that is possible.

 

Thanks & regards,

Navaneethan

Navaneethan_A
Super Collector
Solution

Re: Question on Adding workplan tasks using webservice

Hi,

 

I have added a proper bottomAnchor for the task which needs to be inserted and that solved the issue.

 

Thanks & Regards,

Navaneethan

DipK
Occasional Contributor

Re: Question on Adding workplan tasks using webservice

Hi Navaneethan,

 

I am too facing the same Issue. Can you please guide me how did you configured the bottom anchor for the same.

 

Thanks & Regards,

Dip

 

Navaneethan_A
Super Collector

Re: Question on Adding workplan tasks using webservice

Hi Dip,

 

I have included the top and bottom anchors as given.Please make sure you are providing the correct sequence and outline level for both the top and bottom anchors.

 

final TaskAnchors anchors = addTWP.addNewAnchors();
final AnchorType topAnchor = anchors.addNewTopAnchor();
topAnchor.setOutLineLevel(2);
topAnchor.setTaskSequeceNumber(9);
    
final AnchorType bottomAnchor = anchors.addNewBottomAnchor();        
bottomAnchor.setOutLineLevel(3);
bottomAnchor.setTaskSequeceNumber(10);

 

Thanks & regards,

Navaneethan

//Add this to "OnDomLoad" event