Clarity

  • 1.  What XOG XML file should I be using if I want to read/write allocation data from/to the resource?

    Posted Jan 10, 2017 05:11 PM

    Looking into automating some of our resource set up tasks and as a part of our inactivation process - we terminate any going - forward allocations by updating the allocation finish date vai the UI.

     

    Would like to automate this via XOG if possible.  Does not appear to be available in the resource read/write xml?

     

    any thoughts appreciated!



  • 2.  Re: What XOG XML file should I be using if I want to read/write allocation data from/to the resource?

    Posted Jan 10, 2017 07:28 PM

    Have you looked at the sample prj_projects_read.xml which includes Allocations and Tasks?  Pull down some sample data using this script, and you should be able to work out what you need to XOG back for the required updates.



  • 3.  Re: What XOG XML file should I be using if I want to read/write allocation data from/to the resource?

    Posted Jan 11, 2017 12:05 PM

    Thanks for taking the time to reply!  I actually did try this.  I set all the arguments to false with the exception of include_resources and include_allocations - and set my query filter resourceID equal to my resource ID.

     

    The expected result set would be the allocations to the projects I'm assigned to (42 projects)

     

    The actual result set is over 6,000 projects - various resources.

     

    So either this is not the XOG file I should use or I'm not using the filters correctly



  • 4.  Re: What XOG XML file should I be using if I want to read/write allocation data from/to the resource?

    Posted Jan 11, 2017 12:16 PM

    Not sure what only filtering by a resource would do on a prj_projects_read.xml read ; I could imagine that its reading every project and just giving the allocations for that one resource?? Would expect to have to filter by some aspect of a project though ; so you could get the list of allocated projects for a resource from a database read and then feed that into the prj_projects_read.xml logic (we can use OR criteria in the filters).



  • 5.  Re: What XOG XML file should I be using if I want to read/write allocation data from/to the resource?

    Posted Jan 11, 2017 12:26 PM

    Did this exact thing a while back in a termination procedure i.e. 

    Once termination date hit:

    1. close for time entry on all projects (so if they come back, they can't book time without being re-opened)
    2. set allocation end to termination date and remove future allocations
    3. remove all access rights (so if they come back in a different role they don't get previous rights)
    4. set to inactive
    5. email manager that we've shutdown the resource account (they get a pre warning 2 weeks before)

    + other things the business needed

     

    Again look at the write(or read) example "prj_projects_alloc_act_etc_write" you need to build this up for each project with resources impacted. (rather than by resource)



  • 6.  Re: What XOG XML file should I be using if I want to read/write allocation data from/to the resource?

    Posted Jan 11, 2017 02:41 PM

    Thanks Andrew.

     

    I looked at the prj_projects_alloc_act_etc_read, filtering on 6 projects and one resource in my XOG filter.  It retrieved 5 of the 6 projects I requested, but it still brought back allocation data for all of the resources in each project, instead of just the resource I filtered on.

     

    So I guess if we were going to put this into practice, we would need to

     

    1)  Probably retrive the list of projects the resource is allocated to via DB call

    2)  Invoke a XOG read using the result set on 1)

    3)  Traverse the file created in 2 and delete all resource data except the resource we are filtering on

    4)  Update the allocation Data for the resource remaining

    5)  XOG write the data back.

     

    Not a pretty solution, but if there is a compelling business case to terminate going-forward allocations, and we want to automate, we'll find a way to make it work.

     

    Thanks again for the input.



  • 7.  Re: What XOG XML file should I be using if I want to read/write allocation data from/to the resource?

    Posted Jan 11, 2017 03:58 AM

    take a look at prj_projects_alloc_act_etc_write example

    Note that when you write in an allocation it overwrites the existing, so you'll need to replace the existing allocation curve.