I'm trying to create new task using xog in wbs. For your reference ive WBS Structure defined as follows
Now I'm trying to create Task3 at same level of task1 and task2. I know i may need to use tag "Parent" and "nextSiblingof" to use PREXTERNALID(DB) of PRTASK table. Unfortunately none of my prtask values have value for PREXTERNALID. It's null. So i cant provide the reference for my new task to drop exactly under activity.
Is there any way I can make the new task created under this exact WBS node without using PREXTERNALID?
The short answer is "no", you can't XOG tasks that don't have a value in that Task ID field.
The way I've accomplished this before (I don't advocate this, and it's definitely not supported by CA) is to remove the Task ID field from any UI screens, then a SQL Update on each Task to copy the PRID from PRTASK back to the PREXTERNALID field. You can then XOG away quite happily. The other thing you'll need to do is make sure any new Tasks that get created have a process of some sort to copy the PRID back to PREXTERNALID.
I am not quite sure if that is quite correct.
You say none of my prtask values have value for PREXTERNALID
I think the way it goes is that for XOGing if one task has External ID then all tasks XOGed must have External ID and if none has External ID then External ID is not needed in XOGing (on the outset that none in the input file has). This seems to work at least in 15.3So if I have a proejct like this
and write a new task without external ID with
<NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_read.xsd"><Header action="write" externalSource="NIKU" objectType="project" version="184.108.40.206"/> <Projects> <Project name="zWBS" projectID="PR2001" > <Tasks>
<Task name="Task 3" orderID="5" outlineLevel="3" summary="false"> <estimateRules/> </Task> </Tasks> <Allocations/> <scenarioDependencies/> <InvestmentAssociations> <Allocations/> <Hierarchies/> </InvestmentAssociations> <General /> <OBSAssocs complete="false"/> </Project> </Projects>
Which I think is somewhat like you wanted.
However, since Niku 6.0.4 there is a catch: You can only append tasks - that is no insert.
So if I have input file
<Task name="Task Inserted" orderID="3" outlineLevel="3" summary="false"> <estimateRules/> </Task> </Tasks> <Allocations/> <scenarioDependencies/> <InvestmentAssociations> <Allocations/> <Hierarchies/> </InvestmentAssociations> <General /> <OBSAssocs complete="false"/> </Project> </Projects>
Note the task name and orderID
That will give me
So XOG did not pay any attention to the orderID..
Note that this was in 15.3 and for the lowest level WBS item.
I think you could test how far you get.
Wow, thanks for that Martti - I suspect that may be new with v14 or v15? We attempted this with a v13 migration and couldn't make it work so we had to follow the SQL Update method I outline in my OR.
Thanks for once again expanding my Knowledge Store!
Just tested in 15.3:
Even if the other tasks have external ID I could XOG in (append) a new task without ID.
There must be more to it. Just tried in 13.3 and could XOG in a task without ID regardless of the existing task having and ID or not.
Yes, there must have been something else going on (we were migrating to 13.1, but I'm guessing there are no major changes in XOG from 13.1 - 13.3).
This thread would seem to render this idea obsolete? Task XOG should not use non-mandatory field