Tuesday, December 20, 2016

Event Mapping Framework - Migration

A reader asked a question in one my posts on Event Mapping Framework.

Question: Do you know how I can include the "Configure Event Mapping" settings in an App Designer project so I can migrate it from dev to test to prod environments?

The answer is very simple. Since the Event Mapping Framework is simply an extension of the 'Related Content Service' functionality, the procedure to migrate the configuration is also the same as migrating 'Related Content'.

For those who are new to Related Content and/or Event Mapping Framework, here are the steps that will help with the migration.

Step 1: Insert 'Related Content Definition' into the Project


This will take care of migrating the 'Related Content Definition' and associated Application Class. Note: We must highlight 'Application Packages' under the 'Related Definitions' before inserting the Related Content Service ID into the project.


Step 2: Insert 'Related Content Service' into the Project


Insert the 'Related Content Service' by entering the 'Portal Object Name' of the associated 'Content Reference'. This will take care of migrating the 'Event Mapping' Configuration.



Step 3: Save and Migrate the Project

Simply save and migrate the project from the source to the target environment.

10 comments:

  1. Thank you Sasank
    We are getting on to PT 8.56.01 with Image #23 (we are on HCM 9.2 with PT 8.54.xx). We would like to show the MySystem profile/user profile page instead of Fluid home page for our Self Service users (if the profile is NOT completed). I am able to do it with your solution of Event Mapping for PT_LANDINGPAGE -POstProcess - It presents the MySystem profile/User profile page but all icons normally have including home are missing and I can not even paste the URL to go home (which I am expecting it to be Fluid Home - the one if I do not add this additional code with event mapping)
    I wonder if you have any other process seq other than PostProcess - so that it can display Home and automatically can execute my code to go to MySyystem Profile page with out user input. I appreciate your comments and input - Regards, AB Krishna/586-489-9048

    ReplyDelete
    Replies
    1. Can you share your custom code that you are using in the PostProcess?

      I wonder if you are redirecting the users to the 'psc' servlet? You can check this by reviewing the URL after you redirect the user to the 'My System Profile' page. Check if the URL contains /psc/ or /psp. If it contains /psc/ then change it to /psp/ since it is a Classic page and will require the portal servlet (psp) to display the header.

      Delete
  2. For my testing , I did for limited users This code is put in App Package

    import PT_RCF:*;

    class UserProfile extends PT_RCF:ServiceInterface
    method execute();
    end-class;

    method execute
    /+ Extends/implements PT_RCF:ServiceInterface.execute +/

    Local File &fileLog2;
    Local string &url, &currURL;

    If (%OperatorId = "12345" Or
    %OperatorId = "13837" Or
    %OperatorId = "44457" Or
    %OperatorId = "HCRUSA_KU0020" Or
    %OperatorId = "60003") Then
    /* 08.28.17..abk: begin redirect to system profile */
    Local string &queryString;
    &queryString = &queryString | "E1_USER_SELF_SERV"; /*changed from the above delivered to custom */
    &url = GenerateComponentContentURL(%Portal, %Node, MenuName.MAINTAIN_SECURITY, %Market, Component.E1_USER_SELF_SERV, Page.USER_SELF_SERVICE, "U");
    &url = &url | "&SOURCE=" | &queryString;
    rem &fileLog2.WriteLine("generrated url to redirect from HOME=" | &url);
    %Response.RedirectURL(&url);

    End-If;

    end-method;


    ReplyDelete
  3. Thanks for sharing the code. The issue (as I mentioned in my previous comment) is with the GenerateComponentContentURL method which will use the /psc/ servlet and result in no header.

    Replace GenerateComponentContentURL function with GenerateComponentPortalURL which will use the /psp/ servlet and generate the header as a result.

    PeopleBooks:
    http://docs.oracle.com/cd/E66686_01/pt855pbr1/eng/pt/tpcl/langref_PeopleCodeBuilt-inFunctionsAndLanguageConstructs_G.html#ud0787a1b-06d3-4e4e-9067-798a51b83951
    http://docs.oracle.com/cd/E66686_01/pt855pbr1/eng/pt/tpcl/langref_PeopleCodeBuilt-inFunctionsAndLanguageConstructs_G.html#u316aefc6-2d34-41d5-b189-eea364130bef

    ReplyDelete
  4. I really appreciate it Sasank
    I am not 100% done, but the page it show-up has all fluid home page links
    I never thought it has so much impact with the "GenerateComponentPortalURL"
    Thank you - AB Krishna

    ReplyDelete
  5. This comment has been removed by the author.

    ReplyDelete
  6. Detailed explanation, Thanks very much for the posting.

    ReplyDelete
  7. Thanks, Sasank, for the posting on migrating event mapping configuration. I ran the sysaudit report and got exceptions in the Related Content Definition Audit section, (RELCONTENT-04) Find orphaned Service Configurations (missing menu entries). I followed your posted steps for migration so I am not sure what I am missing in my project. Would you know what is causing the exception?
    Thank you.

    ReplyDelete
    Replies
    1. I have not run into this problem.

      I found the following information on My Oracle Support which may be related to your problem:
      https://support.oracle.com/epmos/faces/BugMatrix?id=25317866

      Delete