Clarity

Expand all | Collapse all

Automate the creation of new projects from a project template

  • 1.  Automate the creation of new projects from a project template

    Posted May 25, 2016 03:18 PM

    Hi Folks,

     

    Can we create a process that will automate the creation of new project from a project template?

    Please share your suggestions and approach as always you do.

     

    Thanks in advance.

     

    Regards

    Syed



  • 2.  Re: Automate the creation of new projects from a project template

    Broadcom Employee
    Posted May 27, 2016 02:52 PM

    Hi Zilan,

     

    You can give a try to use project write xml in a gel script to create a project automatically through process.

     

    Regards

    Suman Pramanik



  • 3.  Re: Automate the creation of new projects from a project template

    Posted May 27, 2016 03:26 PM

    Hi Suman,

     

    Yes I have done the automation for creating new projects through process. But Now i want to create new projects using existing project templates from Clarity through process.

     

    So can you suggest me how to achieve this..

     

    Thanks in advance.

     

    Regards

    Syed Zilan



  • 4.  Re: Automate the creation of new projects from a project template

    Posted May 27, 2016 03:31 PM

    Put the template data into the xml file.



  • 5.  Re: Automate the creation of new projects from a project template

    Posted May 27, 2016 04:44 PM

    Hi Urmas,

     

    I have used "prj_projects_from_template_write" xml file and able to create new projects using project template.

    I could see the tasks from project template has been loaded into new project but not the new task.

     

    How can i load the new tasks into the project ?

     

    While Xogging in, Can i change the WBS sequence ? If yes, how can i achieve that ?

     

    Thanks in advance!



  • 6.  Re: Automate the creation of new projects from a project template

    Posted May 28, 2016 08:00 PM

    Basically I should think that you write the project twice once create from template and the second time add the task.

    I made a few quick tries trying to do both writes in the same file and also as two files. Did not get the new task added either way.

    So something was wrong.

     

    I am not sure if you can determine the sequence.

    There are the tags

         nextSiblingOf="t5"
         orderID="6"

    I tried to change the WBS order by first reading out a project then changing those and also changing the order of tasks in the xml file, but no change was achieved.

    One thing that disturbs that, is  that the WBS sequence is created on fly when the tasks are loaded and you can sort the task list based on different columns so what you see is not necessarily the WBS sequence



  • 7.  Re: Automate the creation of new projects from a project template

    Posted May 29, 2016 10:45 PM

    Hi Urmas,

     

    I have used the below XML code to create projects from existing templates..

     

        <Project

          fromTemplate      = "aaaTemplate2" --Existing project template project ID

          name              = "aaaFrom2"

          projectID         = "aaaFrom2"

          description       = "aaaFrom2"

          managerResourceID = "kdinsmore"

          start             = "2004-01-01T00:00:00"

          finish            = "2005-01-01T00:00:00"

          stageCode         = "PRJ_NPD_IDEA"

          processCode       = "PRJ_NPD"

          goalCode          = "AVOID_COST"

          priority          = "18"

          progress          = "1"

          format            = "11"

          >

        </Project>

     

    Projects created successfully with templates tasks..

     

    <Tasks>

      

       <Task chargeCodeExtID="XX" evCalcMethod="0" finish="XX" fixed="false" key="false"

                   lockedForScheduling="false" milestone="false" name="XX"

                  nextSiblingOf="XX" openForTimeEntry="true" orderID="2" outlineLevel="1" percComp="0" start="XX" status="0"

                  summary="false" taskID="XX">

           <Baselines/>

                  <Assignments/>

                  <estimateRules/>

                  <CustomInformation>

                    <ColumnValue name="XX">false</ColumnValue>

                    <ColumnValue name="partition_code">XX</ColumnValue>

                  </CustomInformation>

                </Task>

      </Tasks>

     

    New Tasks didn't appear in the project..

     

    Is this a know issue in Clarity PPM ?



  • 8.  Re: Automate the creation of new projects from a project template

    Posted May 29, 2016 03:52 AM


  • 9.  Re: Automate the creation of new projects from a project template

    Posted May 29, 2016 10:54 PM

    Hi NJ,

     

    I checked the provided link but the context is different. I'm able to create the projects using existing templates but not the new tasks..

     

    Please share me more if you have anything specific to this.



  • 10.  Re: Automate the creation of new projects from a project template
    Best Answer

    Posted May 30, 2016 04:37 AM

    OK zilansyed , I've got part of it using

    <NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_project.xsd">

      <Header version="7.5" action="write" objectType="project" externalSource="NIKU"/>

      <Projects>

     

     

        <!-- create a new project from a template -->

     

        <Project

          fromTemplate      = "te_2"

          name              = "zFromtemplate5"

          projectID         = "zFromtemplate5"

          description       = "zFromtemplate5"

          managerResourceID = ""

          start             = "2016-06-01T00:00:00"

          finish            = "2016-12-01T00:00:00"

          priority          = "10"

          progress          = "1"

          format            = "11"

          >

        </Project>

     

        <!-- create a new task to the above project -->

     

        <Project

        finish="2016-12-01T17:00:00"

        name="zFromtemplate5"

        projectID="zFromtemplate5"

        start="2016-06-01T00:00:00" >

          <Resources/>

          <Tasks>

    <Task

            name="XOGed task 1"

            orderID="1"

            outlineLevel="1"

            finish="2016-06-15T09:00:00"

            start="2016-06-10T00:00:00"

            taskID="x1">

              <Assignments/>

              <estimateRules/>

            </Task>

          </Tasks>

          <Allocations/>

          <scenarioDependencies/>

          <InvestmentAssociations>

            <Allocations/>

            <Hierarchies/>

          </InvestmentAssociations>

          <General/>

          <OBSAssocs complete="false"/>

        </Project>

     

      </Projects>

    </NikuDataBus>

     

    So I create a project from a template and the input file goes on with data from the project to be created adding a task to it.

    What was the problem yesterday was that the key task defaults to false if the attribute is not present, but the filter in the task list defaults to true. I assume the task was there, but I did not see it because of the filter :-(

    As you can see I have orderID="1" , but it is ignored and the new task will be added to the end.

     

    If that is the case, then one way to do that would be to read the project, delete all the tasks and re-create them with the order you want. Does not sound like fun and I don't know if that can be done with XOG.



  • 11.  Re: Automate the creation of new projects from a project template

    Posted May 30, 2016 08:03 AM

    urmas

    Thanks for the inputs and will try it from my end, share you the update..



  • 12.  Re: Automate the creation of new projects from a project template

    Posted May 31, 2016 03:16 AM

    urmas

    Now i could able to create new tasks. Thanks for the help.

     

    So do you have any approach for WBS sequence change through process. Please share the info..



  • 13.  Re: Automate the creation of new projects from a project template

    Posted May 30, 2016 05:49 AM

    Seems that in your case you also had the key="false".

    Did you use the default filter for the task list keytask= Yes