1 2 3 30 Previous Next

SAP Enterprise Portal

445 Posts

Interested in knowing what is going on in SAP Enterprise Portal for SAP NetWeaver 7.4 SPS10 / 7.31 SPS15? Then this is the right blog for you.

 

With the release of SAP NetWeaver 7.4 SPS7 / 7.31 SPS11/12 the Fiori launchpad is running on Enterprise Portal. For every support package new features are added to make the Fiori experience in Enterprise Portal better and better. In SAP NW 7.4 SPS10 we also included new features for the UI Theme Designer.

And now let's jump to the details.


SAP Fiori Launchpad on Enterprise Portal


Relevant for Users


Now - by default - the My Home group is delivered empty and will not appear on the home page. It will only appear on the home page, when users add iViews and pages to the My Home group through the tile catalog:

add_tile_my_home.png

 

Users can search for tiles in the tile catalog:

tile_search_15.png

 

Relevant for Administrators


You can set up predefined groups to be displayed by default on the home page. Before SPS10 there was no possibility for an administrator to define a predefined group with a predefined set of tiles for the users.With SPS10 the administrator can fill the Fioir launchpad already with content and when a user logs on for the first time, he or she will not see anymore an empty launchpad.

An adminstrator configures portal categories to represent predefined groups, according to the category, to which the iView or page is assigned.
To set up tiles to appear in a predefined group, the adminstrator configures the Default App in Home Page property for the relevant iView or page in the properties editor (please click on image for better reading):

app_homepage.png

Users can reset a predefined group they have personalized to restore the default configuration set up by the administrator (click on image for better reading):

reset_group3.png

 

Before SPS10 we only supported navigation modes, which open the apps in a new window with quirks\standards modes. Starting SPS10 we also support a navigation mode, which opens the app in-place. The administrator has to maintain the property value Display in Portal Content Area in the property editor (click on image for better reading)::

display_portal_content_area.png

 

Administrators can add a portal runtime page as a tile. This enables users to launch more than one iView in a tile. All page types are supported.

The use case are mainly scenarios in which customers have a page that contains more than one iViews, which are connected. In this case a page can be defined as a tile and it will open all three iViews together (click on image for better reading)::

page_as_tile.png

 

With the function scope of  NW 7.4 SPS10 it is also possible for Portal content administrators to set up tasks to enable SAP Fiori Launchpad on SAP Enterprise Portal for BI Portal scenarios. For more details, check out this blog by Irena Kull.

 

 

UI Theme Designer


There is enhanced support for the UI theme designer in SAP NetWeaver Portal. You can now do the following:

  • Delete a custom theme
  • Change the name and ID of a custom theme
  • Save a custom theme before publishing it
  • Customize a theme for a portal tile in the home page and see the changes through the Fiori Framework Page preview

theme_designer.png

 

 

For more details check out the SAP documentation and release notes.

 

Bookmark this page to be up-to-date on SAP Fioir launchpad on Portal

 

I hope this summary was helpful for you. We are planning some more features for the next release SAP NetWeaver SPS11. You will have to wait for some weeks and around SAPPHIRE we will update you on the next feature wave for Enterprise Portal.

Welcome to the first edition of this year's SAP Portal news blog. We have lots of news for you in the following topic areas:

  • SAP Fiori / SAP Fiori Launchpad on Enterprise Portal
  • HANA Cloud Portal News
  • Enterprise Portal News
  • Partner News

 

SAP Fiori / SAP Fiori Launchpad on Enterprise Portal

 

SAP Fiori, Demo Cloud Edition

The SAP Fiori, Demo Cloud Edition, is a unique opportunity for you to discover SAP Fiori experience. Explore the new experience, read this blog and watch this demo video:

 

 

How to Renovate your BI Portal with SAP Fiori Launchpad

For SAP NW 7.31 SPS15 (or higher) and SAP NW 7.4 SPS10 (or higher) SAP Portal provides a new visual design, based on SAP Fiori launchpad, which enables a modern, intuitive user experience for integrated reporting scenarios with multi-channel access to reports. This offer is available as part of the standard Portal delivery on premise, as well as in SAP managed cloud (HANA Enterprise Cloud), for customers aiming to simplifying the handling of big data with intuitive analytic dashboards and BW scenarios. Have also a look at this product demo:

 

 

How to Develop, Deploy, Configure and Consume SAP Fiori Apps

The availability of SAP Fiori launchpad running on SAP HANA Cloud Platform was announced in November 2014. This is a big milestone in aligning SAP’s user experience with the Fiori user experience, while focusing on fast, easy and secured implementation, delivered via Cloud deployment. How can you get SAP Fiori launchpad running on SAP HANA Cloud Platform? Read this blog and get the details.

 

SAP Fiori launchpad on Enterprise Portal: Update of SCN page

We updated the SCN page on SAP Fiori launchpad on Enterprise Portal. Among other updates we added a table showing a SAP Fiori launchpad feature comparison in SAP NetWeaver 7.4 releases (+ SAP NW 7.31 releases).

 

User Interface Add-On SPS11 for SAP NetWeaver

Check out the new and changed features of SAP Fiori launchpad in User Interface Add-On SPS11 for SAP NetWeaver.


All about SAP Fiori
You can read all about SAP Fiori in the new SCN community.

 

Cloud Portal News


Release Notes Overview

We have created a new SCN page for Cloud Portal release notes. You can bookmark the page to be updated on our release information.


Development Hands-On Tutorial

Read this development tutorial to learn how to develop business applications for SAP HANA Cloud Portal sites, leveraging on premise and cloud solutions.


Danone movie

Watch in this testimonial how our customer Danone is running SAP HANA Cloud Portal:

 

 

Trial version Update

SAP Fiori launchpad is now available for all HANA Cloud Platform trial users. The launchpad is available as a site in Cloud Portal, and provides a range of services, including navigation, application configuration, and embedded support.

 

Enterprise Portal

 

SAP Maintains its Leadership Position in Gartner’s Magic Quadrant for Horizontal Portals

Gartner recently updated its Magic Quadrant report for Horizontal Portals. In the new report, SAP maintains its status in the Leader Quadrant with a strong rating on the ability to execute and an increase in its completeness of vision.

 

New SAP Portal Roadmap

Check out new edition of SAP Portal roadmap. The document covers the two product lines: SAP Enterprise Portal (deployed on premise or via managed cloud) and SAP HANA Cloud Portal (public cloud, Portal Platform as a Service)


Highlights of SAP Portal in SAP NetWeaver 7.4

This presentation provides an overview on “SAP Enterprise Portal 7.4” and the benefits, key capabilities, deployment options (on premise | managed cloud) and recent innovations such as the integration with SAP Fiori.


Updated Enterprise Portal Sizing Guide

 

An updated sizing guide is available including information on Enterprise Portal running on SAP HANA: Sizing Guide -> Sizing Guidelines -> Database and Technology -> SAP NetWeaver -> SAP Enterprise Portal (SMP user for login necessary).

 

How to Configure Federated Portal Network

A new blog describes the way to configure FPN connections, considering the different possible landscapes.

 

How To prevent PcdInconsistentUpdateException

This blog explains all about PcdInconsistentUpdateException and also helps Enterprise Portal developers, who are already familiar with the Portal Content Directory concept and APIs, how to prevent it.

 

Using the URL-iView in SAP Enterprise Portal

In this blog some of the abilities and limitations of the URL-iView are discussed, it is aimed at developers and users, who have a basic understanding and knowledge of Portal navigation.

 

Setting the iView Language in the Portal

In this blog, you find information how to set the iView (application) language in the Portal, and how the language (locale) is determined by the Portal mechanism.

 

Partner News

 

SAP Portal on Smartwatch

As part of an innovation project at our partner BTEXX they implemented a couple of Smartwatch prototypes based on SAP Portal backend data. It is planned to share the BTEXX experience in a “Portal on Smartwatch” blog series. Read the first part which is "Introduction and Portal Scenarios on Pebble Smartwatch".

pebble_watch1.png

Substitution is a feature of the UWL that allows business users to take over items from other users and to assign items to other users .These cases are defined by certain substitution rules, which can be managed through the Substitution screens.

 

Business scenarios:

 

• Users can assign another user to manage your tasks if you are absent or unavailable.

 

• Users can define a nominee to receive your tasks or fill in for you.

 

• Users can create multiple substitution rules to cover all eventualities.

• Users can also accept tasks of other users (if they have assigned them to you).

 

Create Substitution Rules

 

1) Click and choose Manage Substitution Rules.

UWL_1.jpg

2)In the My Substitution Rules table, choose Create Rule .

UWL_2.jpg

3)Type userid  to select a nominee. Choose Select

UWL_3.jpg

4)Select user and click on next button

UWL_4.jpg

5)User can select radio button at once or on particular date

UWL_5.jpg

6)My substitution rule table will be updated

UWL_6.jpg

 

Above explained procedure is standard functionality of substitution ,but when it comes to the portal 7.4 SP5 we have faced some strange issue.

 

Managing substitutions rules the user picker shows the message “No name found for: *”

UWL_7.jpg

  UWL People picker does not show user details and also users search for substitution rules doesn't work.

 

No search results displayed with error message :"No name found for:(Userid)/*.

 

If you verify log files then you can find following error message

 

Cannot clear ICM server cache by [718ac393010411e3a1fa000000d23c1e] etagIP address


To resolve above people picker issue I have created one role and assigned UME action UWLSearchUnrestricted to the portal role.

UWL_8.jpg

  Above role is assigned to Every user group. Other wise you can assign UME action UWLSearchUnrestricted to desired role.

SAP Web Dispatcher (WD) is the entry point of your users that access your web enabled applications. These can be any HTML service or app you have running on NetWeaver, or other systems like HANA XS. For over a decade WD offers reverse proxy functionality for SAP systems, and while until shortly its main usage area was SAP Portal and Web Dynpro applications, with the rise of Fiori WD is more exposed. Naturally, more and more companies will use it. Of course WD can be integrated into SolMan and therefore can be managed and monitored.

 

While this is nice, analytical requirements for a web application can be quite complex. A standard approach is to use a web analytics application that helps you to find out how your site is used (sessions, entry/exit points, campaigns). While this gives you transparency about the site experience of your end users, it is not really useful when it comes to a more administratively driven approach: what kind of content is passed through WD, impact on configuration parameters: CSS, Javascript, response times, data throughput. Besides, your users must be OK with the tracking code and modern browsers allow users to deactivate tracking cookies and related technology (do not track).

 

WD is the single point of entry to web applications; it contains viable information about their usage. This information can heavily influence the understanding of the app. Think about finding the bottlenecks of the app, the most accessed resources, usage patterns, and so on. The log of the web dispatcher contains all this kind of information. You only have to gather it, store it and analyze it.

 

Basically, WD is a reverse proxy, and in the non-SAP context, Apache is one of the most used reverse proxies. Analyzing HTTP traffic is a common task for web site administrators, and so it is not a big surprise to find a huge list of Apache traffic analyze log tools available. The Swiss army knife among them is logstash. Now, logstash does not really analyze web server logs. It rather parses them and can send them to another tool for storing and analyzing the data. Like elasticsearch.

 

To learn how to configure your own system for WD, logstash, please read the how to document I posted here.


This is the default use case of logstash: Parse logs, extract the information and send it to elasticsearch for storing and retrieval. After the information is stored in elasticsearch, it can be used by Kibana for retrieving information like statistics and analytical data. Think about access statistics or trends.

 

The vantage of the combination of logstash, elasticsearch and Kibana over a web analytic app is that you do not have to install a tracking / analyzing part in your web application. You can also analyze part of your web page normally invisible, like resources. Depending on your WD configuration, you gain insights into how WD works, like how long it takes to retrieve files from the SAP system.

 

Information retrieval

After connecting Kibana to elasticsearch it is easy to surf the data and to create your own dashboard. Drilling down is no problem and while logstash is running in the background adding new data, the dashboard can reflect this instantly. A few sample reports may include:

Total number of files served by WD

kibana1.jpg

Total number of MB transferred

kibana2.jpg

Hits to resouces

kibana3.jpg

You can correlate this data to find out interesting stuff like:

  • Number of requests: a cached resource is served locally by browser, this can decrease drastically the load on WD and backend.
  • Requests for a specific file / site
  • Average response time for CSS or JS files: does it make sense to use WD as a web cache? Think about it: the data may indicate that WD waits to retrieve a file from ICM, multiply it with the numbers of requests it takes for a user to access a resource and you have an idea of time wasted.
  • Data send by serving static files: is your cache configuration correct?
  • What is the largest file requested?
  • Usages: your application is accessible only internally, does the access statistics reflect this?
  • Hitting a lot of 304, 404 or 500? What is causing this?
  • Monitor ICM admin resources to find out possible attack vectors.

Hi,

 

Since HTML5 adoption is really high I heard from several customers that they would like to have an HTML5 based login page.

 

Out of the box the SAP Enterprise Portal doesn't give you the configuration to add the needed doctype attribute in order to allow HTML5 login page.

 

This blog will help you to add the doctype attribute to the document, so lets get started..

 

* The procedure described will work for all versions higher than the version stated in this SAP note 1713259

 

 

1)        Under the content catalog, copy from Portal Applications -> com.sap.portal.runtime.logon -> certlogon and paste as PCD object in a folder under "Portal Content".

12-03-2015 13-31-58.png12-03-2015 13-33-22.png12-03-2015 13-38-23.png

 

 

 

2)      Edit the permissions of the newly created iView add the Group Everyone with both Admin read and "End User" checked.

 

12-03-2015 13-54-47.png

 

3)      Edit the iView using the support PCD Inspector tool and add to it a String property with id " com.sap.portal.prt.html5.compliant" and value "true"

 

12-03-2015 13-57-14.png12-03-2015 13-56-38.png

 

 

4)      Apply SAP steps 2a, 2b, 2c from note "1713259 - PRT support for HTML5 doctype" Setting the PRT html5.compliant property to "iViewDependent "

 

12-03-2015 14-02-17.png

 

 

5)      Follow http://help.sap.com/saphelp_nw73/helpdata/en/1a/3afd4e641b8f42ac07bb77fe30375b/frameset.htm

create your own authscheme.xml file in the custom file replace the entries

" <frontendtarget>com.sap.portal.runtime.logon.certlogon</frontendtarget>" with "<frontendtarget>pcd:portal_content/<your folder>/certlogon</frontendtarget>".

 

 

6)      Restart the whole cluster for the authscheme.xml configuration to take effect.

 

 

And that's it, your'e done.

 

Now your logon page will have the HTML5 doctype declaration in a standalone scenario.

 

Cheers,

Saar

2015 will probably be the year of wearables. As part of an innovation project at BTEXX we tried to unmistify the magic behind it and implemented a couple of Smartwatch prototypes based on SAP Portal backend data, because you do not need to wait for S/4HANA to build a fancy SAP Smartwatch App …

 

We are happy to share our experience in a “Portal on Smartwatch” blog series. Which we would like to divide in 3 parts:

  • Part 1: Introduction and Portal Scenarios on Pebble Smartwatch
  • Part 2: Portal Scenarios on Android Wear
  • Part 3: One more thing: Portal Scenarios on the Apple Watch

 

Introduction to Wearables

 

Current research studies, e.g. from Forrester, have shown that end users and enterprises are interested in wearables and are planning to use them or are willing to invest in business cases based on them. Forrester has published the following 5 predictions of wearables:

  • The people want it
  • The business wants it even more
  • Companies are inventing new business and service models around wearables
  • Wearables involve surprises
  • The target can be an all-body network

Source: CIO/Forrester (German Site) or an alternative English blog about the topic

 

Pebble Smartwatch

 

If you are following the smartwatch market, you have probably heard of Pebble. Pebble was successfully funded via the crowd-funding platform Kickstarter in 2012 and till now they have sold over 1 Mio. Smartwatches. Currently they are funding their new edition “Pebble Time”, which will be again the biggest campaign on Kickstarter. On the first day of the campaign they have raised over 5 Mio. dollar alone… 

 

For our development we used the “Pebble Steel” which works as companion watch for Apple iPhones or Android Phones. The watch has a 144 x 168 pixel black and white e-ink display and you can implement the following kind of watch apps:

  • Watchfaces: Modern or classic watchface enriched via smart information, e.g. from an SAP System
  • Notifications: Push notifications, primarily the Pebble is displaying notifications from the connected smartphone
  • Watch Apps: Custom smart watch app implementations based on the Pebble SDK

 

What I loved during the development/prototyping was the cloud based development environment, without a local setup I was able to develop my first watchface in a couple of minutes and was able to deploy and test the development on the watch. A good start for Pebble developers is the Pebble Developer Site, which offers good tutorials and API documentation.

 

But now let’s have a look what scenarios/prototypes we have implemented for the Pebble.

 

Portal Scenario 1: UWL Watchface

 

Simple UWL (Universal Worklist) watchface implementation, which shows next to the time (it’s still a watch) the total number of open tasks (e.g. 8 tasks) and details of the latest task, in this case a HR time correction request (Clock-in) of Dieter Martens…

 

uwl_watch_en.PNG

 

Update (08.03.2015) based on the new Pebble SDK 3.0 (Pebble Time, Platform: Basalt)

 

The screens show the migrated watchface to the new SDK 3.0, which supports colors, and two screens of the BTEXX mobilePortal companion app to show the workflow/interaction:

 

PebbleTime_Watchface_with_mobilePortal.PNG

Update (17.03.2015): Picture of the watchface on the unpublished Pebble Time

Thanks to the Pebble development team I got an picture how our watchface would look on a real (unpublished) Pebble Time. Good to know that the watchface works also on the real watch

Pebble_Time_Live.PNG

Portal Scenario 2: BTEXX mobilePortal on Pebble

 

This menu based smartwatch application displays the latest news, tasks and services…

 

mobilePortal_1_en.PNG

The UWL tasks can even be approved/rejected via the watch…

 

mobilePortal_2_en.PNG

 

Architecture

 

pebble_architecture.PNG

 

The native watch apps are implemented in C (Layout and Business Logic) and Javascript (Connectivity to the Internet/REST Services) and are running directly on the watch on top of the Pebble SDK.

Via bluetooth coupling between the watch and the smartphone the Pebble SDK on the watch can connect via the Pebble Companion App on the smartphone to our REST API of the BTEXX mobilePortal to access e.g. Universal Worklist entries, etc…

 

I hope you found the provided information valuable! I am looking forward to your feedback or questions!

 

Stay tuned for the Portal Scenarios on Android Wear and on the Apple Watch… hopefully we will find time to write the blogs in the next weeks...

 

Best regards,

Michael

 

About BTEXX

Based on the connection between user perspective, SAP technology and process know-how, BTEXX implements user-friendly solutions that make companies more efficient and users happy.

This blog is for portal content administrators who would like to learn about the setup tasks required to enable SAP Fiori Launchpad (FLP) on SAP Enterprise Portal for BI Portal scenario.

 

BI end users can run the SAP BI reports leveraging the portal configuration in a modern, multi-channel, personalized FLP user experience, after the steps below are performed by the portal administrator (for more information about the end-user experience, click here).

 

Additionally, the UI theme designer allows you to develop your company’s own themes by modifying one of the
theme templates provided by SAP.

 

Prerequisites:

Use of NW 7.31 SP15 or higher*); NW 7.4 SP10 or higher*).

*) The Fiori Launchpad  on EP functionality with reduced scope is available from NW 7.31 SP12 and NW 7.4 SP7.

 

 

Overview of Steps:

 

  1. Enabling the SAP Fiori Launchpad on Portal
  2. Reusing the existing portal content (roles, pages and iViews) to provide mobile and desktop access to the BI reports via FLP on EP. Every existing iView or page, containing several iViews, will appear on a launcher as a tile. You change/add the following :
    • Role/folder properties
    • iView properties
  3. (Optional) Using the UI theme designer for new theming and branding.


Detailed Steps:

 

  1. Enable SAP Fiori Launchpad on Portal (detailed steps). Note:
    • The categories will reflect the tile grouping in the tile catalog
    • Each iView can be assigned to one category (see the iView properties table below)
    • End user’s home page will be empty when opened for the first time unless you mark an iView as default

   2. If a role contains iViews directly, the following role properties must be set:

    • Select the Entry Point checkbox
    • Set Mobile Perspective to “Launcher”

LauncherParam.png


  3. If the role configuration contains iViews separated in folders as shown below:

RoleFolder.png

 

The following folder properties should be set:

    • Select the Entry Point checkbox
    • Set Mobile Perspective to “Launcher”


  4.  The most important iView properties are listed below. For other relevant properties see Example 1 and here.


- Object ID of Device Group Example: TabletAndroid;TabletWin8;com.sap.portal.dg.desktop

This property, together with the Mobile Perspective property of a role or a folder controls an iView’s mobile enablement:

    • If a report has to run on a mobile device, Object ID of Device Group must contain at least one mobile object in addition to the “Mobile Perspective” setting (see Example 2)
    • If a report BI technology is not supported on mobile devices, it can be excluded by setting Object ID of Device Group to desktop devices only

- Default App in Home Page will always show the tile on user’s home page.

 

  5. To provide company theming and branding use SAP Fiori Launchpad Theming  (see example 4).


Example 1:


You want to enable an existing BEx report on FLP on EP with the following requirements:

 

  • The report is available only on desktop
  • The report is opened in Portal Content Area

 

BEx iView properties should be updated as below:

BexProperty1.PNG

 

Note: in the iView property Application Parameters you have to concatenate to a default value “sap-ie = EmulateIE8” a string “&theme = sap_tradeshow”.


BexProperty2.PNG

BexProperty3.PNG

Example 2:


You want to show the same data as in Example 1 on a mobile device. To do this, you create a new
Design Studio report and an iView with the following properties:

DSProperty1.PNG

DSProperty2.PNG

Example 3:

 

You transform your traditional portal  like on the picture below

OldPortal.PNG

  Into FLP:

HomePageCloud.PNG

 

Tile catalog for the above home page looks like this:


TileCatalogCloudDemo.PNG

The category names correspond to the top navigation bar of a classic Portal experience. The groups might be smaller than categories and represent the lower hierarchy levels. You can run a report clicking on any tile or using a quick launch:


QP.PNG


The report displayed in Portal Content Area looks as below:

QuarteRevenueBuildIn.PNG

 

Example 4:

 

After using theme designer your home page might look like this:


themeWithoutCSS.PNG

 

Checking Your Work

 

After completing the procedure above, check the results by following these steps:

1. Open the FLP on EP link http://<domain>:<port>/irj/portal/flp on desktop. The tiles available for desktop and marked as “Default App in Home Page” are displayed in the Home page under the default groups (identical to the categories in tile catalog). Further personalization will be done by end-users as following:

    • Go to Tile Catalog. All the tiles appear under provided categories
    • Most of the often used tiles are usually added to Home page. For this choose a tile, click on it, create a group, and assign a tile to it.

  2.  Click the tile to open the corresponding BI report.

3. Open FLP on EP link http://<domain>:<port>/irj/portal/flp on mobile device. Verify that only mobile-enabled tiles are visible.

 

 

About Portal-BI Integration:

 

  1. BEx /WAD – EP Integration.
  2. Design Studio – EP integration  MANDATORY:To enable your application users to launch the analysis application iViews in the portal, you must configure the security zone NetWeaver.DesignStudio.
  3. BObj – EP integration, How-to install PIK for BI integration

 

To learn more about  FLP:

 

This blog is for customers using SAP Enterprise Portal for a BI Portal scenario.

 

 

Today SAP provides a new visual design for the portal, based on the SAP Fiori launchpad (FLP), which enables a modern, multi-channel, role-based user experience.

 

For end users, the launchpad offers:

  •   A central, personalizable, access point for launching the established reporting tools as well as new innovative analytics solutions
  • A modern, intuitive user experience for integrated reporting scenarios with multi-channel access to reports

 

For portal administrators Fiori Launchpad offers:

  • Gradual renovation of reporting technologies, leveraging the investment in existing BW / portal configurations
  • More information for business users with better UI/UX
  • Multi-channel control.

 

This offer is available as part of the standard Portal delivery on Premise (see pre-requisite below), as well as in SAP managed cloud (HANA Enterprise Cloud), for customers aiming to simplifying the handling of BIG DATA with intuitive analytic dashboards and BW scenarios.

 

Your standard portal experience with L-shape:

OldPortal.PNG

Might look like this:


themeWithoutCSS.PNG

 

Or like this on mobile devices:

 

mobDevices.png

 

Each tile provides access to a single report or a dashboard, whereas the tile grouping together with search capabilities replaces the navigation hierarchy.


The displayed FLP content may differ from device to device, and this brings another FLP advantage: the ability  to maintain one central BI portal content and adjust it to a specific mobile device.

 

This is especially useful for BI technologies with limited mobile capabilities: for example BEx reports do not run on mobile devices . Such reports can be easily displayed on desktop and filtered out for mobile devices on the configuration level. In addition, the BI admin can choose to show mobile enabled Design Studio reports that will be available only via mobile devices.

 

Prerequisites:

  • NW 7.31 SP15 or higher*); NW 7.4 SP10 or higher*) is used
  • SAP Fiori Launchpad on Portal (details) is enabled

 

*) The Fiori Launchpad  on EP functionality with reduced scope is available from NW 7.31 SP12 and NW 7.4 SP7.


Step-by-step transition:

 

The steps required to transform your standard portal into a modern user experience for different BI technologies are described here. A short movie shows you an overview of the process and its results.

 

To learn more about  FLP:

 

Starting SAP NetWeaver 7.3, in order to facilitate the sharing of portal content between two or more portals that reside in a federated portal network (FPN), you need to create an FPN connection.

 

An FPN connection pairs one portal to another. The portals in an FPN connection can share content in one direction or both (in case both portals are 7.3 and above). Since you can share content between two portals in both directions, a portal in an FPN connection can be a producer and a consumer, at the same time.

 

In the FPN Connection wizard, trust (one way or two way), connection creation and registration, are all being made with the same wizard.

 

Be aware that there are different ways for implementing content consumption between portals. So, before you start creating and configuring FPN connections, review the CONTENT SHARING WITH SAP NETWEAVER PORTAL document and chose the recommended option considering your use case.


In this blog, I will describe the way to configure FPN connection, considering the different possible landscapes.

 

 

Basic Internal Network


When having only basic internal network, use the consumer and producer internal network information. Meaning the direct host and port of the instance, with fully qualified domain.

Scenario A.PNG

Scenario1.1.PNG

scenario1.2.PNG

 

When using secure protocol:

  1. From the "Protocol" dropdown list select "HTTPS"
  2. From the "RMI-P4 Connection Method and Protocol" dropdown list select the corresponding "secure" string (e.g. "Connection string or single server (secure)")
  3. Choose the corresponding ports. By default: HTTPS: port + 1 (e.g. 50201); P4: port + 6 (e.g. 50206). Check the System Information for thecorrect ports

 

 

Cluster Internal Network

 

In a cluster environment, where you have a load balancer or a web dispatcher in front of the consumer / producer system, you can use the load balancer or web dispatcher information for the settings.

 

Scenario B.PNG

If you would like to load balance p4 communication that can be done only by using the message server information. Check the System Information for the message server host and port.

message server.PNG

scenario2.1.PNG

scenario2.2.PNG

 

 

External Network – Reverse Proxy


In an external network, where you have reverse proxy, you should configure also the "External Network Settings" using the reverse proxy information.

 

Scenario C.PNG
scenario3.1.PNG


Why is this needed?

Because the domains of the external and internal can be different. In those cases, trying to use the internal host and port of the consumer will create a cookie with the internal domain (e.g. local.domain) but redirect links will be with the external domain (e.g. proxy.domain) and therefore the access to the producer will fail. Once you have configured external network settings end users can only access FPN content at runtime if they use the external network host and port. If they will use the internal host and port to access the consumer the FPN content will not work

 

 

 

If you choose to use FPN functionality you might find the following SAP Notes helpful:

  1. SAP Note 880482 - FPN: Federated Portal Network Central Note
  2. SAP Note 1295662 - Interoperabilitybetween 2 portals in FPN environment

275908_director_s_gl.jpg

Beginning of last year, we started the SAP Portal and HANA Cloud Portal gamification campaign on SCN. The challenge included 2 tracks: (1) You should pick a movie from our YouTube playlists, create a blog review by explaining the value of the movie for your business or your present project  (2) You could record your own movie showcasing your implementation, a new portal design, or any other content that would deliver value to our ecosystem.


All in all we received 27 blogs contributions for the SAP Portal movie challenge and 31 contributions for the HANA Cloud Portal movie challenge. We thank all blog authors for taking part in this initiative.


In the last 3 weeks we asked you in several polls to vote for your favorite blog and to identify the best blogs for the SAP Enterprise Portal movie critic challenge and the HANA Cloud Portal movie critic challenge. Now the winners are identified and will be announced in this blog. They will receive special finalist and winner badges and additional SCN points. Please note that there are no finalist badges for the movie producers, all participants of the producer challenge will receive a winner badge.

 

SAP Enterprise Portal Movie Challenge 2014

 

The Movie Critic Finalist Badge goes to:

 

Yuvraj Singh author of the blog SAP Portal Portfolio

 

Jill Diesman author of the blog "Hack into things, control satellites?  This is exactly what we need for the office."

 

The Movie Critic Winner Badge goes to:

 

KANNAN NAIR author of the blog SAP Fiori and SAP NetWeaver Portal, mobile edition

 

The Movie Producer Winner Badge goes to:

 

Peter Warren author of the blog SAP NetWeaver Portal Movie Producer: Variable Speed Timer Control for Business Objects Dashboard

 

SAP HANA Cloud Portal Movie Challenge 2014

 

The Movie Critic Finalist Badge goes to:

 

Pradeep Baitha author of the blog SAP HANA Cloud Portal - Overview Video

 

Pravin S. author of the blog  Overview Video

 

The Movie Critic Winner Badge goes to:

 

Rupali Ray author of the blog HANA Cloud Portal - An Analysis

 

The Movie Producer Winner Badge goes to:

 

Amir Blich author of the blog Welcome To The 2014 Portal Movie Challenge

 

Robert Russell author of the blog SAP HANA Cloud Portal Movie Producer: It’s an SCN World


In this movie all winners of the challenge are presented:

 

 

Congratulations to all finalists and winners. Your badges and SCN points will be uploaded to SCN in the next time. Special thanks to Caroleigh Deneen for supporting the upload of the rewards.

 

Last not least, I would like to present here the contribution for the HANA Cloud Portal year-end challenge 2014. It was produced by the SAP team from Accenture, Latvia. As the Accenture team members in Latvia have no SCN users so far, we cannot assign them any SCN badges and points, we would like to award you via this blog also as winner of the HANA Cloud Portal movie challenge. Thanks for the big effort, you put into this production:

 

Sometimes by mistake you deploy some SDAs which are part of SCAs belonging to portal usage types(EP & EPC), but your netweaver java does not have usage types EP and EPC. Later on when you download stack.xml to upgrade your netweaver java to higher version, then stack.xml contains list of some SCAs because of unnecessary SDAs deployed on your system by mistake. When you start SUM tool, then upgrade fails with error message:

 

The following problem has occurred during step execution: com.sap.sdt.util.diag.DiagException: Error while executing Task with input file CopyParsLibsForMigration.xml and task COPY_PORTAL_LIBS.

Could not finish Copy operation with parameters fromFile: '/usr/sap/<SID>/SYS/global/pcd/pcdStartup.properties' toDir: '/usr/sap/<SID>/SUM/sdt/tmp/portalContent'. Check whether the current user has sufficient permission to execute this operation.

Cannot copy /usr/sap/<SID>/SYS/global/pcd/pcdStartup.properties to directory /usr/sap/<SID>/SUM/sdt/tmp/portalContent.

Input output exception has occurred: fileName: /usr/sap/<SID>/SYS/global/pcd/pcdStartup.properties.

java.io.FileNotFoundException: fileName: /usr/sap/<SID>/SYS/global/pcd/pcdStartup.properties

It happens due to a deployment of an SCAs which belongs to a usage type which does not exist on netweaver java. Here portal is not usage type of netweaver java system and SUM tool triggers pcd migration, but pcd does not exist in the system and it fails. So, in such scenarios if you are sure that portal(EP, EPC) is not usage type in your netweaver java, then please perform the steps:

 

Either undeploy the SDAs which were deployed by mistake and generate the stack.xml file again or you can skip portal migration in SUM as:

 

The value for portal migration could be found at SharedInputCatalog.xml under SUM/data direcotry.

On your system the property most probably looks like:

 

<Property value="true" setBy="ComponentHandlingService" key="IsPortalMigrationNeeded">

So changing the above property to "false" and restarting the SUM tool will skip pcd migration.

In this article, I'm going to review some of the abilities and limitations of the URL-iView when used in combination with the Portal.

This e-blog post is aimed at developers and users who have a basic understanding and knowledge of Portal navigation.

 

 

Introduction:

URL-iView is somewhat different from other iViews: its sole purpose is performing a redirect to the specified URL.
At first glance – an easy operation, but due to the way in which the portal handles navigation and iView integration, some problems may arise. I will explain the technical details and the solutions which are provided in order to overcome them.

 

A guide for creating URL-iViews is in SAP note 1936087 - How to create a URL iView on NW EP?.

 

 

Typical user scenarios:

 

  • The user wants to display external content or a part of another website inside their portal.
  • The user wants to open the external content in a pop-up window.

 

 

URL-iView behind the scenes:

 

Firstly, we need to understand how the portal embeds iViews inside itself. In general, URL-isolated iViews are rendered in an iframe,
which is located in the content area of the portal. This is done by a mechanism which sets the "src" attribute of the iframe element to be the direct launch URL of the required iView.

When requesting the URL-iView via the direct launch URL, the server response includes the "redirect" header with the "target-url" of that URL-iView as a value. That header instructs the browser to perform a redirection to the "target-url".

 

The crucial point is that the browser redirects only the iframe which contains the request for the URL-iView and not the whole window.

 

 

So, what could go wrong?

 

Since the URL-iView must be URL-isolated, its content is rendered in an IFrame. This approach may cause the following problems:

 

  • Many websites are designed to prevent the possibility of being rendered in other websites. This approach stems from both security and proprietary concerns. From a security perspective, the ability to present a website or a portion of it inside another website opens a gateway to all kinds of threats such as click-jacking.Since the standard way of embedding foreign URL content is through the iframe element, a website to be configured to prevent the display of its content in an iframe. Website developers can also use the "X-Frame-Options:DENY" response header to prevent attempts to load a page in an iframe from other websites.

 

  • Scripts of the target website may perform some actions based on the fact that they are defined in the topmost document. If this kind of script is running in an iframe it might break or be blocked by the browser security policy since it is in violation of the Same Origin restrictions.

 

For more information: SAP note 1636132 - JavaScript Errors When Calling a Custom or Third-Party Web Site in a Portal URL iVIew.

Solution:

 

We have seen that rendering external content in an iframe might be problematic; therefore the only safe way (for most scenarios) to do it is by opening the desired "target-url" in a separate window.

 

The practical solution is to make the portal launch the direct launch URL of the URL-iView in a new window. In that way, the new window won't have any iframes. When getting the response from the server, it will instantly redirect itself to the "target-url" as if the target URL was typed by the user in the browser address bar.

 

There are two main methods you can use to navigate to a URL-iView (and to iViews in general).  To Prevent issues when running
the URL-iView, the configuration you'll need will vary slightly, according to the method you choose:

 

  1. Navigation by TLN, DTN, Bread crumbs, Related Links:

 

To achieve the portal equivalent of window.open method, set the "Launch in New Window" property of an iView to "Display in Separate Window" (Navigation Mode = 1).

 

By doing so (and after applying all the relevant SAP notes), you configure the portal to launch the URL-iView in a new window whose target is the direct launch URL of the requested URL-iView.

 

The current SAP notes which explain how to troubleshoot this feature are:

1721745 - Navigation to URL iview in navigation mode 1 causes errors

2050956 - URL-iView fails when it is opened from "related links".

2061547 - URL-iView opened incorrectly from second level TLN
          2055539 - Breadcrumb links do not open in a new window

 

    2.  Navigation using the Portal Navigation API:

 

    1. If you have links to URL-iViews which use a Navigation API such as EPCM.doNavigate and you want to launch a URL-iView as described in this section, then do the following:
      • Set the value of the "mode" parameter to 1.
      • Set the "target" parameter as the direct-launch-URL of the requested iView.

 

              For example, the following call is specified:

              EPCM.doNavigate([direct-launch-URL], 1);

                  The direct-launch-URL can be constructed from the iView PCD location:

 

Let's say that the PCD location of your iView is "pcd:portal_content/some_role/myURLiView".

First, you replace each ":" with "!3a" and each "/" with "!2f". Now you get:

 

pcd!3aportal_content!2f some_role!2f myURLiView

 

You add the prefix:

 

/irj/servlet/prt/portal/prtroot/

So that the final result is the direct-launch-URL:

 

/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fsome_role!2fmyURLiView

 

By setting mode=1, you configure the portal to open a new window, and by setting the target to the direct launch URL, you ensure that the new window redirects properly as needed.

 

          b. Navigation using the Navigation Tag Library:

 

If you are using the Navigation Tag Library to create links via JSP, then bear in mind the following:

When creating a link using the navNodeAnchor tag, set the navigationMethod to "byURL" and not "byEPCM", and, of
course, set the navigationMode to 1. This will ensure that the direct launch URL of the URL-iView will be used in the navigation to the new window.

So the code should look like this:

                    <nav:navNode navTarget="ROLES://portal_content/some_role/myURLiView">

                    <nav:navNodeAnchor navigationMethod="byURL" navigationMode="1"/>

</nav:navNode>

In this blog, I will explain how to set the iView (application) language in the portal, and how the language (locale) is determined by the portal mechanism.

The blog is based on the official SAP documentation: Lookup of Resource Bundle.

The iView language (locale) is determined in the following order (sorted by priority):



    1. Forced Request Language

 

             A parameter that can be configured in the iView properties. The locale is configured from a

             provided list of locales.

             This parameter forces the iView to be displayed in the selected locale.

             This parameter affects only the locale of the iView itself.


A user can also modify the Forced Request Language parameter, provided they have the right permissions, by using the portal iView  personalization.  If the user has made changes to this parameter and has launched the iView, the iView locale will be determined by the user's  configuration of the Forced Request Language parameter and not by the value of the parameter in the iView properties.

For more information, see:

 

     SAP NW 7.0x Personalizing iViews

 

     SAP NW 7.1 and up - Personalizing iViews

 

 

The following block is relevant only for AI (Application Integration) iViews:

In the event that the required locale is not on the Java Runtime Environment-supported list of locales, to add additional locales, see Start iViews with  a Dynamically Computed Language.

A known issue is that an iView is displayed in the wrong locale just for a specific user. For this issue, the following SAPnote may help:

1590901 - Enterprise Portal - Unexpected Behaviour Affecting One User Only


 

     2. Portal mandatory locale


The locale is determined by the following portal runtime configuration properties:

      • request.mandatorylanguage
      • request.mandatorycountry

 

These properties do not exist by default!

They should be added and configured in the Portal Runtime Properties.

These settings affect the whole portal framework locale.

To configure the Portal Runtime properties:

 

     SAP NW 7.0x -   Setting Mandatory Language For Portal

     (this should be done for all server nodes of the cluster)


 

     SAP NW 7.1 and up - Configuring the Portal Runtime Properties

     (this should be done for all server nodes of the cluster)



 

      3. User locale


This locale is defined in the profile of the current user. The user locale can be modified from the Identity Management application.

This setting affects the whole portal framework locale.

       To access Identity Management:

 

            SAP NW 7.0x Identity Management


     SAP NW 7.1 and up - Identity Management


When in the Identity Management application, search and select the desired user,

Then, under the General Information Tab, modify the "Language" property to the desired locale according to the list of available languages.


General Information language - user locale.png

 

A user can also modify the portal language ,if they have the right permissions, using the portal personalization.

For more information see Personalizing Your Portal.

 

If the desired locale is not available from the locale selection list, the following SAPnote will help with configuring additional locales that are supported by the Java Runtime Environment:

1013521 - Configuration of supported languages within the portal



 

    4. Request locale


The request locale is defined by the browser language settings.

This setting affects the whole portal framework locale.

For example, in IE:


             Navigate to Tools --> Internet options --> General --> Languages

Select "Add…" and specify the desired locale.


IE set language example - Reqeust locale.png



 

Since, in most cases, the browser does send a locale, the next two sections are considered to be a code fallback if the locale is not configured and sent from the browser:


 

   5. Portal default locale


The locale is determined by the following portal runtime configuration properties:

      • request.defaultlanguage
      • request.defaultcountry

 

These settings should be configured in the Portal Runtime Properties and affect the whole portal framework locale.

To configure the Portal Runtime properties:

 

SAP NW 7.0x

             Example for en_us locale that will display the portal content in English:

               1. Log on to the Portal Server

               2. Navigate to the following path in the SAP installation directory:

                    \\usr\sap\<SID>\JC<InstanceNumber>\j2ee\cluster\server0\apps\sap.com\irj\

                         servlet_jsp\irj\root\WEB-INF\portal\system\properties

               3. Open the file 'prtDefault.properties'

               4. Modify the parameters to the desired locale:


        • request.defaultlanguage=en
        • request.defaultcountry=us

 

               5. Save the file and restart the server for changes to take effect.

 

SAP NW 7.1 and up - Configuring the Portal Runtime Properties



 

    6. System default locale


             This is the Java default locale defined by the system, either by the operating system or by

             the JVM. This setting affects the whole portal framework locale.


274555_red_carpetl.jpg

 

Beginning of last year, we started our first SAP Portal and HANA Cloud Portal gamification campaign on SCN. We asked the Portal community on SCN to play the role of a movie jury member, review existing product movies on our YouTube channel and blog about it. In addition we also offered you to play the role of a movie producer to produce your own SAP Portal or HANA Cloud Portal movie story and share your product expertise.

 

All in all we received 27 blogs contributions for the SAP Portal movie challenge and 31 contributions for the HANA Cloud Portal movie challenge. We thank all blog authors for taking part in this initiative. The two challenges were closed on December 31, 2014, and it is not possible to add further contributions.


Now it is voting time!

We are now asking you - the Portal community on SCN - to vote in two polls in order to pick the best blogs for the 2 challenges.

 

Help Use to Find the Winner of the SAP Enterprise Portal Movie Challenge

 

In the last 2 weeks we identified the 3 finalists for the SAP Enterprise Portal movie critic challenge.

Here are the 3 candidates going into the last voting round:

 

SAP Portfolio by Yuvraj Singh

 

SAP Fiori and SAP NetWeaver Portal, mobile edition by KANNAN NAIR

 

"Hack into things, control satellites?  This is exactly what we need for the office." by Jill Diesman

 

 

Please vote in this poll for your favorite blog:
http://scn.sap.com/polls/2286

 

 

Help us to Find the Winner of the SAP HANA Cloud Portal Movie Challenge

 

In the last 2 weeks we identified the 3 finalists for the SAP HANA Cloud Portal movie critic challenge.

Here are the 3 candidates going into the last voting round:

 

SAP HANA Cloud Portal - Overview Video by Pradeep Baitha

 

HANA Cloud Portal - An Analysis by Rupali Ray

 

Overview Video by pravin s.

 

Please vote in this poll for your favorite blog:

http://scn.sap.com/polls/2287

 

Note: You will be able to vote in the 2 polls until January 26, the polls will be closed on that day.

 

And a personal remark from my side: I have observed in the pre-voting round that some blog authors have a bigger network behind them with friends and colleagues voting for their blog. You can continue asking your network to vote for you, because this is a normal behavior - if it is not going over a level, which is not fair anymore against the other candidates. You should also aim to be awarded for the best blog in 2014, because there is a tendency for the blog to be liked by the whole community. Thanks for your understanding and let's the best blog win!

Have you ever encountered a “PcdInconsistentUpdateException”? Would you like to know why it is thrown? How can it be resolved? or even better - how can it be prevented?

This blog explains all about it, and also helps Enterprise Portal developers,who are already familiar with the Portal Content Directory concept and APIs, when implementing code.

 

Starting from NetWeaver Portal 7.1, some of the Portal content Directory (PCD) architecture was changed, with the addition of support for JTA transactions.

The granularity of the handled PCD objects within a transaction is a PCD Unit. For example changing 2 different Pages that reside within the same Role, are actually working on the same Role Unit.

How does the flow work?

While working with a transaction, each Unit that is being modified is held as a cached copy in the transaction.

Before committing the changes, there is a check that the Unit was not modified by anyone else during that time, and an updated version already exists in the DB.

This can happen either from another thread on the same server node or from another server node.

If there is a newer version in the DB, the following exception is thrown: “PcdInconsistentUpdateException”, preventing from inconsistencies in the DB, and the new change is not committed.

 

When implementing code, even if there is no explicit usage of transactions from application level, every change in the PCD is automatically wrapped with a transaction.


If you encounter such an exception in the default trace file, you can check what application is responsible for the exception by looking at the stack trace of the exception. If this application is provided by SAP, search for SAP notes, as a fix might be already available.


More information can be found in the following SAP Knowledge Base Article:

1752506 - PcdInconsistentUpdateException in the DefaultTrace - What it Means and How to Troubleshoot it


Despite the new architecture, there are still cases in which PCD inconsistencies occur in versions NW7.1 and above.

In order to detect and remove PCD inconsistencies in those versions, please refer to SAP note:

1473054 - Checking database consistency for the PCD for CE 7.1 & above


In older Enterprise Portal versions (such as NW7.0) where there was no prevention at the PCD layer, there is also a tool that can be used to clear those inconsistencies. It is documented in SAP note:

1086644 - Checking database consistency for the PCD


The notes described must be used only by Portal experts, as they describe actions that should be executed on the PCD tables. Those actions may corrupt the portal if performed in a wrong way.


Below you can find code snippets that demonstrate how to prevent the aforementioned issues.


There are two main mechanisms that should be used:


1. Locking - you should lock the object before you start changing it, in order to help protecting the current object from concurrent changes. The locking is done on a Unit object. When one application has acquired a lock, another application will fail to do so when trying to change the object at the same time; the same happens if the same application runs in parallel. If the application failed perform locking, it should handle it accordingly. (for example - if it has User Interface, then displaying a message to the screen might be a good option).


There are two types of Lock Handlers:

PCD layer (com.sapportals.portal.pcd.gl): ILockHandle ( <--  link to the javadoc documentation)

PCM layer (com.sap.portal.pcm.admin): ILockHandle ( <-- link to the javadoc documentation)


The ILockHandle that should be used in accordance with the operations performed - If you are using PCM or Semantics APIs in the administration environment, then the PCM lock handler should be used, whereas the PCD lock handler is usually used when objects do not exist in the PCD yet (descriptor objects that need to be bound to the PCD), or other PCD API usages (like enqueue lock usages for PCD changes).


2. Transaction - using the transaction mechanism, you can make sure that the change is committed only if all the modifications were done successfully. Using transaction mechanism also causes changes that are constructed from a few modifications to become atomic, meaning that if one of the modifications failed, all the previous modifications are not committed (i.e. rollback is performed). Hence it keeps the objects in the PCD in a consistent state.


The following transaction manager class should be used:

TxManager <-- Click on the link to read the full explanation about the transaction manager, and the different methods that it provides.

You will find the rest of the relevant APIs/classes in the same package com.sap.transaction.* .

* read about the correct usage, e.g. the differences between required() and requiresNew()

 

 

 

Example:

 

import java.util.Hashtable;

 

import javax.naming.Context;

import javax.naming.InitialContext;

import javax.naming.NamingException;

 

import com.sap.portal.directory.Constants;

import com.sap.portal.pcm.admin.IAdminBase;

import com.sap.portal.pcm.admin.ILockHandle;

import com.sap.portal.pcm.admin.PcmConstants;

import com.sap.portal.pcm.admin.ILockHandle.LockInfo;

import com.sap.security.api.IUser;

import com.sap.tc.logging.Location;

import com.sap.tc.logging.Severity;

import com.sap.transaction.TransactionTicket;

import com.sap.transaction.TxDemarcationException;

import com.sap.transaction.TxException;

import com.sap.transaction.TxManager;

import com.sap.transaction.TxRollbackException;

import com.sapportals.portal.pcd.gl.IPcdContext;

import com.sapportals.portal.prt.util.Guid;

 

 

public void performPcdOperation (IUser user, String pcdPath) throws NamingException {


Location location = Location.getLocation(<class name>.class);


IAdminBase adminBaseObj = null;

TransactionTicket txTicket = null;

ILockHandle lockHandle = null;

String lockId = null;

String userId = user.getUniqueID();

 

try {

     Hashtable<String, Object> env = new Hashtable<String, Object>();

     env.put(Context.INITIAL_CONTEXT_FACTORY, IPcdContext.PCD_INITIAL_CONTEXT_FACTORY);

     env.put(Context.SECURITY_PRINCIPAL, user);

     env.put(Constants.REQUESTED_ASPECT, PcmConstants.ASPECT_ADMINISTRATION);

 

 

     InitialContext initCtx = new InitialContext(env);

     adminBaseObj = (IAdminBase) initCtx.lookup(pcdPath);

 

    //In this example, generates unique lock ID using com.sapportals.portal.prt.util.Guid

     //It can also be an identifier such as session ID. Useful when wanting to distinguish between sessions

     //or to check whether it is the same lock - in case we want to use the already generated one

     //(if all is considered inside one flow)

     lockId = (new Guid()).toString();

 

     lockHandle = (ILockHandle)adminBaseObj.getImplementation(IAdminBase.LOCK_HANDLE);

     if (lockHandle == null) {

          location.errorT("lockHandle is not available!!! This is a problem!");

          return;

     }

 

     LockInfo lockInfo = lockHandle.getLockInfo();

 

    //if NULL, then the object is not locked

     if (lockInfo == null) {

 

          boolean isLocked = lockHandle.setLock(userId, lockId, "Lock for binding remote objects to role");

 

          //returns true if the lock could be acquired or if the object was already locked for the same user and lockId;

          //false if the object cannot be locked, because it is already locked for a different user or lockId.

          if (isLocked) {

               txTicket = TxManager.required();

 

               // Perform the desired changes. For example:

               updateAllChangesUnderTheLockedUnitObj(adminBaseObj);

 

               TxManager.commitLevel(txTicket);

          }

 

 

     } else {

          location.errorT("lockHandle already locked!");

     }

 

 

} catch (TxRollbackException e) {

     location.traceThrowableT(Severity.ERROR, "Transaction error during execution", e);

} catch (TxException e) {

     location.traceThrowableT(Severity.ERROR, "Transaction error during execution", e);

} catch (NamingException e) {

     try {

          TxManager.setRollbackOnly();

     } catch (TxException e1) {

          location.traceThrowableT(Severity.ERROR, "Transaction error during execution of setRollbackOnly()", e1);

     }

     throw e;

} finally {

     if (txTicket != null) {

          try {

               TxManager.leaveLevel(txTicket);

          } catch (TxDemarcationException e) {

               location.traceThrowableT(Severity.ERROR, "Transaction error during leaveLevel() execution", e);

          } catch (TxRollbackException e) {

               location.traceThrowableT(Severity.ERROR, "Transaction error during leaveLevel() execution", e);

          } catch (TxException e) {

               location.traceThrowableT(Severity.ERROR, "Transaction error during leaveLevel() execution", e);

          }

     }    

     if (lockHandle != null) {

          lockHandle.releaseLock(userId, lockId);

     }

}

 

} //End of method


 

 

Some things to bear in mind when implementing using the above APIs:

1. Avoid from performing transactions on operations that cause inconsistencies between the DB and the memory like clearing caches and PCD publishChanges (as they are still not committed….).

2. When changing personalized content / content in the UCD, instead of locking you should find why there is parallel writing, as the same user is not supposed to run in parallel - might be a bad application design (like putting all the personalized data inside one big unit).

3. Consider whether it is better to first lock or first start with the transaction (can change according to application logic or importance).

Actions

Filter Blog

By author:
By date:
By tag: