cancel
Showing results for 
Search instead for 
Did you mean: 

DS: simultaneous execution of scripts and other objects

former_member92779
Discoverer
0 Kudos

We have a job which executes many workflows in parallel. This works as expected.

Each of these workflows calls a workflow, say WFscript, which executes a script.

That was the only way of making the script re-usable.

Now, when executing the jobs, we see that all instances of WFscript start simultaneously. That is still as expected.

However, the instances of the script don't run simultaneously, but one at a time.

It is as if the instances of the script are aware of each other.

First, one instance of the script in one instance of WFscript runs, then the next instance of the script in the next instance of WFscript runs. All script instances one at a time.

It doesn't matter which logic the script contains.

We couldn't think of any reason why the instances of the script would wait for each other, or even be aware of each other.

According to SAP Support, there is no documentation on which instances of objects will or will not execute simultaneously.

So, we're interested in any experiences with simultaneous execution of script instances (or any other objects). Which objects should be able to have instances of them executed simultaneously?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello

I have had the situation where calling multiple instances of the same workflow in parallel in the same job actually executed the workflows in series.  Calling separate workflows in parallel does work as expected.  My solution was to replicate the workflow.

Note that calling multiple instances of the same dataflow in parallel does work as expected.

Michael

former_member187605
Active Contributor
0 Kudos

I agree. The script itself will run in parallel. Try this simple test. Write a 3-line script:

     print(workflow_name( )||' started');

     sleep (20000);

     print(workflow_name( )||' ended');

Embed this script in 2 or more parallel workflows. Run your jobs. Then check the trace output.

It's the workflow that doesn't. When DS encounters mulitple occurences of the same workflow in a job, it will execute them in sequence..


former_member92779
Discoverer
0 Kudos

For a simple test job with

-WF_Test containing two WFs: WF_one and WF_two,

-each of these calling WF_Parallel, which contains the script.

...we see this in the logs:

Job <JOB_test_parallel> is started.

Work flow <WF_Test> is started.

Work flow <WF_one> is started.

Work flow <WF_two> is started.

Work flow <WF_Parallel> is started.

Work flow <WF_Parallel> is started.

Script prints: Start parallel flowscript

Script prints: End parallel flowscript

Work flow <WF_Parallel> is completed successfully.

Script prints: Start parallel flowscript

Work flow <WF_one> is completed successfully.

Script prints: End parallel flowscript

Work flow <WF_Parallel> is completed successfully.

Work flow <WF_two> is completed successfully.

Work flow <WF_Test> is completed successfully.

Job <JOB_test_parallel> is completed successfully.

So, it seems that both instances of WF_parallel start simultaneously, but both instances of the script which is called by WF_parallel wait for each other to complete.

former_member187605
Active Contributor
0 Kudos

Or the semantic difference between starting simultaneously and executing simultaneously