Menu

#17 processing a project that is in different states in different environments

v1.0 (example)
pending
Erik H
None
5
2016-02-14
2016-02-12
No

Hi Erik,
I love this project that you have shared. I ran into one issue that I'm not sure how to address on my own.
When I specify a project and multiple environments, the 0.55 version of program seems to get the peoplecode for all of the objects, regardless of the contents of the project. For example.
base environment is dev
dev - project DELETE_ME
app engine peoplecode A
stage - project DELETE_ME
app engine peoplecode A
record peoplecode B
test - project DELETE_ME
app engine peoplecode A
record peoplecode C

I am getting the following peoplecode for each environment.
app engine peoplecode A
record peoplecode B
record peoplecode C

I would like change the workflow so that an entire environment is processed at a time, and then the next environment is processed, to avoid this.

I think that the place to make the change, for the workflow that I would like, is in the overloaded makeAndProcessContainers method, in the Controller class. I think that there is an extra for loop through all of the processors in this makeAndProcessContainers method. This issue also seems to be present in the 0.61 version of the code.

I made the following change and it seems to work.

    /* not sure why the program flow is going through all of the processors again, while already on a processor... */
            //for (ContainerProcessor processor: processors)
            //{
    //JDBCPeopleCodeContainer c = new JDBCPeopleCodeContainer(processor.getJDBCconnection(), processor.getDBowner(), rs, canAccessPSPCMTXT);
    JDBCPeopleCodeContainer c = new JDBCPeopleCodeContainer(processor1.getJDBCconnection(), processor1.getDBowner(), rs, canAccessPSPCMTXT);
                if (c.hasFoundPeopleCode())
                {
        //processor.process(c);
        processor1.process(c);
        //logger.fine("Completed JDBCPeopleCodeContainer for tag " + processor.getTag() );
        logger.fine("Completed JDBCPeopleCodeContainer for tag " + processor1.getTag() );
                }
                else
        //logger.fine("No PeopleCode found in environment "+ processor.getTag() + "; nothing to process");
        logger.fine("No PeopleCode found in environment "+ processor1.getTag() + "; nothing to process");
            //}

Please let me know what you think.
Thanks,
-Alexei

Discussion

  • Erik H

    Erik H - 2016-02-14

    It's a feature...

    I deliberately included that extra loop, so that the same set of peoplecode segments is processed for each of the environments.

    This was my thinking: let's say you submit each of your environments to a different branch in Subversion, and you've started working on a change request that modifies some delivered code. Naturally, you start in your DEV environment. You add your code to a new project and let the tool process it (or, if you use the 'since-last-time' option, the modified segment will be processed automatically). The problem is that the original (Oracle-delivered) code possibly wasn't available in any of the branches in your repository prior to this change; this makes it impossible to do a diff between the original (delivered) code and your customized code..

    That extra loop ensures that the (unmodified) code is submitted to your PROD branch as soon as you've started working on your change request; later on, after you've migrated your changes to PROD, the PROD branch in SVN will allow you to compare your customized peoplecode with the delivered code.

    Having said that, this behavior is no longer all that useful, as there is now another way to get the delivered code into your version history: the 'ancestor' feature.

    All the same, I'd like to keep this way of determining what segments to process.

    I can see that you may like to see a different behavior if you are running the tool by project. A clumsy way to do that is to install the program several times in different directories, with different configurations.

    It shouldn't be too hard to find a better way but I can't modify and test the program now; I don't have access to any PeopleSoft environments (it looks like I'm leaving the PS world altogether).

     

    Last edit: Erik H 2016-02-14
  • Erik H

    Erik H - 2016-02-14
    • status: open --> pending
    • assigned_to: Erik H
     

Log in to post a comment.