Scheduling SAP BI Explorer spaces based on events

Users frequently find their explorer spaces and exploration views displaying outdated information. Indeed this can happen if the source data is not ready when the indexing process is scheduled to start at a fixed time, so a manual re-run is needed when the data is available to ensure data freshness. Unfortunately scheduling explorer spaces is not possible in the current 3.x or 4.x versions of SAP BusinessObjects BI, but a workaround has been recently applied in one of our customers which we detail in this article.

 

Emulating the trigger effect

The idea is to schedule explorer spaces processes very frequently during the day under a SAP BusinessObjects account specifically created for these spaces. This account will have its password changed automatically when the indexing is not desired causing the process to automatically fail.

When the indexing is needed the password will be set automatically to its original value for a short time so it triggers the information update.

The change of account password technically occurs using a Program object which can be added and managed from the CMC (Central Management Console) and it is written in .NET SDK language

What happens behinds the scenes is totally transparent for the users, as they will just see 1 single indexing process executed once a day, at the desired variable time.

 

The process

 At a high level the process involves the following steps:

1) Check platform prerequisites for this method

2) Create an auxiliary BusinessObjects Enterprise account with a password associated to the  “non-working” status of the schedule and sufficient rights to schedule the space

3) Create of a VBS script that changes this password to the one password associated to the  “working” status of the schedule for around 20 minutes, then back to the previous password

4) Schedule a program containing the VBS script in BOE

5) Configure the scheduled explorer space, using the auxiliary account and the password associated to the  “working” status of the schedule, to be run every 10 minutes

 

The process explained

The process will be explained using a real example.

Let’s choose “explorerBPE” as a BO account name, and choose “Inactive01” and “Active01” as passwords. The BO server name is “CMSNAME” and the data readiness is indicated when the event “BPESourceReady” is triggered.

1) The following conditions need to be met for the process to work correctly:

1.1  BOE needs to allow running scripts (CMC > Applications > CMC > Program Object Rights): Run scripts/binaries & Run java programs

1.2  BOE needs to have the following properties  unticked from CMC > Authentication > Enterprise :

i. Cannot reuse the N most recent password(s)

ii. Must wait N minutes(s) to change password

 

2) Create a BusinessObjects Enterprise account “explorerBPE” with the password “Inactive01” and sufficient rights to index the explorer space.

Explorer BPE

 

3) Create a VBS script that changes this password to “Active01” for around 20 minutes, then back to “Inactive01”, find it below. You can copy and paste this text inside a file and rename it with the .vbs extension. The letters in bold can be customized according to your needs.

BPEexplorerChangePassword.vbs

Dim oSess
Dim Users, User
Dim UserInterface
Dim dteWait
Const CMS = "CMSNAME:6400"
Const UserID="explorerBPE"
Const Password = "Inactive01"
Const Aut = "Enterprise"
Set oSessionManager = CreateObject("CrystalEnterprise.SessionMgr")
Set oSess = oSessionManager.Logon(UserID, Password, CMS, Aut)
Set iStore = oSess.Service("", "InfoStore")
Set Users =  iStore.Query("SELECT SI_ID FROM CI_SYSTEMOBJECTS WHERE SI_PROGID='CrystalEnterprise.USER' and SI_NAME ='" +  "explorerBPE" + "'")
Set User = Users.Item (1)
Set UserInterface = User.PluginInterface ("")
UserInterface.ChangePassword "Inactive01","Active01"
iStore.Commit (Users)
dteWait = DateAdd("s", 1200 , Now())
Do Until (Now() > dteWait)
Loop 
UserInterface.ChangePassword "Active01","Inactive01"
iStore.Commit (Users)
oSess.Logoff()

 

4) Schedule the program on BOE, based on a source Trigger

 Upload the .vbs program as a Program Object:

 

.vbs program as a Program Object

 

Schedule to start every day at midnight:

Scheduling recurrence

Configure the schedule to run depending on a BusinessObjects event:

4

 

5) Configure the Explorer space Scheduling to use the “explorerBPE” and “Active01”, to be run every 10 minutes

Configure Explorer Space

 

Now we can test the solution in our space:

Test the solution

 

For an event which happens around 6am every day, the load has succeeded at 6:11am, which is what we wanted to achieve.

 

Benefits

With this method our data actualization in SAP BI Explorer 3.x or 4.x will be more reliable and error proof,  reducing the dependency on manual intervention.

If you have questions about this method, or if you want to share your experience or tips, please feel free to leave a comment.