Sunday, February 19, 2017

Related Content/Event Mapping for Components not registered in the Portal

Related Content Framework and the latest Event Mapping Framework allow us to add services to components (and other content reference types) that are registered in the Portal Menu Structure - Structure and Content. What if we want to add related content or event mapping services to a component that is not registered in the Portal?

Question Courtesy: Lewis Thompson
Event Mapping Framework - Hello World and Quirks | Comment


E.g.:

Component 1
- Hyperlink > Transfers to Component 2
- Hyperlink > Transfers to Component 3


We can see in the above scenario, only Component 1 is registered in the Portal. From Component 1, we use FieldChange peoplecode events to transfer to Component 2 and Component 3.

Component 1:


Transfer to Component 2 - FieldChange PeopleCode:


Transfer to Component 3 - FieldChange PeopleCode:


What if we want to add a related content or event mapping service to such components (Component 2 or Component 3) that are not part of the Portal menu structure?

David Bain from Oracle recently presented an overview of PeopleTools 8.56 (which is not GA yet) via Quest (access recording here). @24:23 he talks about expanding support for Event Mapping Framework via a related content API. It is possible that an API to related content would be very handy for such scenarios! But we will have to wait and see!

In the interim, here are the steps to workaround the scenario detailed above.

Adding Related Content Service:

Register the Component to a Hidden Folder in the Portal | Structure and Content:

PeopleTools > Portal > Structure and Content



Assign Related Content to hidden Content Reference:

PeopleTools > Portal > Related Content Service > Define Related Content Service


PeopleTools > Portal > Related Content Service > Manage Related Content Service > Content References (Tab) > Assign Related Content to an Application Page (Link) > Include hidden Crefs (Option)



Adding Event Mapping Service:

Register the Component to a Hidden Folder in the Portal | Structure and Content:

PeopleTools > Portal > Structure and Content




Assign Event Mapping Service to hidden Content Reference:

PeopleTools > Portal > Related Content Service > Define Related Content Service


Application Class Implementation:


PeopleTools > Portal > Related Content Service > Manage Related Content Service > Event Mapping (Tab) > Map the event of the Application pages (Link) > Include hidden Crefs (Option)



Results:


10 comments:

  1. Hi Sasank, thanks for all the helpful posts. I have a question - my code in the App Package gets invoked and works fine when invoked from classic page but does not get invoked when called from a Fluid page which calls the Component Interface over the component which is used in the mapping. Any ideas.

    Thanks
    Prasad Koneru

    ReplyDelete
    Replies
    1. Hi Prasad - I am not sure if Event Mapping was supported in Component Interfaces until recently.

      You may want to check you PeopleTools version and perhaps confirm with Oracle Support on further direction.

      Refer:
      http://www.greyheller.com/blog/event-mapping-peopletools-8-56/

      Delete
  2. Thanks for the quick reply Sasank.

    ReplyDelete
  3. Hi Sasank
    Would this work on GenerateComponentContentURL method also or only with Transfer?
    I am working on a Master Detail framework application and was wondering if event mapping can be triggered from there

    ReplyDelete
    Replies
    1. Apologies for the late response.

      Yes. In theory it should work.

      Are you finding results that might indicate otherwise? If you can please describe the scenaro in detail, we can provide additional input/ideas.

      Delete
    2. Hi Sasank,

      I tested this with GenerateComponentContentURL and this does not work. I had another question to you regarding Javascript in a another blog post of yours, i feel that these two are related issues. I do have a ticket open on the Javascript issue. Lets see what they come back with

      Nitin

      Delete
  4. Hi Sasank... we have requirement of providing security to the defined related content service can you help me with this

    ReplyDelete
    Replies
    1. I don't follow your requirement in terms of what security you are referring to. Please clarify and/or provide additional details.

      Delete
  5. hi sasank,

    we have requirement to provide security to the service ID we use in related content reference can you provide some information on this

    ReplyDelete
  6. Hi Sasank. I had exactly same requirement to trigger an event mapping when we Hire a person (the same issue mentioned in the beginning). So basically, I created a new Related Content Service for Workforce Administration > Personal Information > Organizational Relationship > New empl instance(hidden) [since this component gets called when we add a new person], and added my custom app package there and it worked !

    Thanks for guiding us to that.

    ReplyDelete