Can any one let me know if we can add subtasks randomly in an existing workplan using webservice?
Eg, I have task like
I need to modify this like
sublevel1task2----I want to add this using webservice..is it possible?
Thanks & regards,
Go to Solution.
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.
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,
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.
I have added a proper bottomAnchor for the task which needs to be inserted and that solved the issue.
I am too facing the same Issue. Can you please guide me how did you configured the bottom anchor for the same.
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);