cancel
Showing results for 
Search instead for 
Did you mean: 

Executing application.dobackgroundprocessing() more than once

Former Member
0 Kudos

Hi Gurus,

Is there a way to execute the command application.dobackgroundprocessing() more than once.  Say for example during initialization of the dashboard, application.dobackgroundprocessing() gets executed.  Inside the application I want to run the application.dobackgroundprocessing() again to process something else.  Here is how it goes:

During Initializaton COUNT == 1

During an event inside the application, COUNT == 2

In background process scripting page

if(COUNT == 1){

  Do some stuff

}

elseif (COUNT == 2){

Do some stuff

}


I am not on 1.5 so parallel processing is not an option.


Thank you all for your help


Raj

Accepted Solutions (1)

Accepted Solutions (1)

MustafaBensan
Active Contributor
0 Kudos

Hi Raj,

Yes, you can execute doBackgroundProcessing() more than once.  Refer to the chaining example in section 3. Initialize data sources in "background processing" section of the blog Optimize the Performance of your SAP BusinessObjects Design Studio Solutions - Tips and Tricks.

Regards,

Mustafa.

former_member194504
Active Contributor
0 Kudos

Hi Raj,

If i correctly understood your question, you need to execute Backgroundprocessing multiple times.

So in that case consider you have a Backgroundprocessing() on startup and when some button click event happens in dashboard.


What you can do is, declare a global variable with initial value 0. And in background processing


//startup background processing

if(globalvariable==0){

//do this

}

//next time on click background processing

if(globalvariable==1){

//do this

}

so when startup first loop executes. And when some button click happens you can have a code like this in onclick of button


gloabalvariable=1;

application.dobackgroundprocessing();

for this, second case of backgroundprocessing will execute.

Hope this is you expected. If not , can you explain more clearly to give you some more suggestion.

Thank you,
Nithyanandam

Answers (2)

Answers (2)

Former Member
0 Kudos

hi Raj,

You can call background processing inside application number of times. You can check your flag, say here as "count" before calling background processing inside background processing itself! so it works like a loop!

Sivakami

Former Member
0 Kudos

Hi Raj

The answer is yes.

You can use the event background processing multiple times. And the if else condition you provided as example will work. 

Where to use Background processing-

To optimize your application performance you can use this event to load datasources inorder to decrease the startup time.

If you wish to do a repetitive operation instead of using background processing option use a button and call its Onclick event wherever needed.

If you are in DS 1.4 you can also use global script functions to perform various operations.

Just to clear your doubt ,this has nothing to do with parallel processing ,Read here for more information parallel processing,

Thanks