Run Process - How to Determine When All Completed.

JohnO
Posts: 96
Joined: Mon Jul 29, 2019 5:02 am
OLAP Product: Planning Analytics
Version: 2.0.9.x
Excel Version: Office 365 16

Re: Run Process - How to Determine When All Completed.

Post by JohnO »

PavoGa wrote: Tue Jun 20, 2023 5:55 pm Wasn't there a post the other day about some additional variables available for use with RunProcess? I searched but have not found it.
You may be referring to my earlier post in this thread. The NEW PA engine (What was to be Server 12) has some useful new functions to handle communication between the called process and the calling process.
User avatar
PavoGa
MVP
Posts: 617
Joined: Thu Apr 18, 2013 6:59 pm
OLAP Product: TM1
Version: 10.2.2 FP7, PA2.0.9.1
Excel Version: 2013 PAW
Location: Charleston, Tennessee

Re: Run Process - How to Determine When All Completed.

Post by PavoGa »

JohnO wrote: Wed Jun 21, 2023 11:00 pm
PavoGa wrote: Tue Jun 20, 2023 5:55 pm Wasn't there a post the other day about some additional variables available for use with RunProcess? I searched but have not found it.
You may be referring to my earlier post in this thread. The NEW PA engine (What was to be Server 12) has some useful new functions to handle communication between the called process and the calling process.
That is it. :D

Bookmarked now. Thanks!
Ty
Cleveland, TN
dan.kelleher
Community Contributor
Posts: 127
Joined: Wed Oct 14, 2009 7:46 am
OLAP Product: TM1
Version: 9.4
Excel Version: 11
Location: London

Re: Run Process - How to Determine When All Completed.

Post by dan.kelleher »

PavoGa wrote: Tue Jun 20, 2023 5:55 pm File semaphores is what I use currently to control a parent process. I believe I read about using adding/removing attributes or elements and tested it a few years back, but never used in production. The file semaphores seem to work well enough.

Wasn't there a post the other day about some additional variables available for use with RunProcess? I searched but have not found it.
https://www.ibm.com/docs/en/planning-an ... nprocess-1
https://www.ibm.com/docs/en/planning-an ... tjobstatus

Example
ID1 = RunProcess(`async_process_1`);
#*** Do something else in the main TI

#*** Check async_process_1 execution status
Ret = GetJobStatus(ID1);

If(Ret = ProcessExecutionInProgress());
WaitForAllJobs(ID1);
EndIf;

Ret = GetJobStatus(ID1);

If(Ret = ProcessExitNormal());
#*** async_process_1 finished execution and completed successfully, proceed with its results.
EndIf;

If(Ret = ProcessExitSeriousError());
#*** async_process_1 finished execution but failed with error, perform error handling.
EndIf;

In this example, after launching async_process_1, the ID1 can be used to check its execution status of the process. The return value of the GetJobStatus can be compared with process return codes, such as ProcessExitNormal and ProcessExitSeriousError that return the value of ExecuteProcess.
ascheevel
Community Contributor
Posts: 288
Joined: Fri Feb 15, 2013 5:49 pm
OLAP Product: TM1
Version: PA 2.0.9.1
Excel Version: 365
Location: Minneapolis, USA

Re: Run Process - How to Determine When All Completed.

Post by ascheevel »


Might not be obvious to some folks, but the functions/features Dan is referring to are only available currently in V12 or Planning Analytics New Engine.
ardi
Community Contributor
Posts: 152
Joined: Tue Apr 02, 2013 1:41 pm
OLAP Product: tm1, cognos bi
Version: from TM1 9.4 to PA 2.0.9.6
Excel Version: 2010
Location: Toronto, ON

Re: Run Process - How to Determine When All Completed.

Post by ardi »

In my experience, the easiest way is to use RushTI ( a Cubewise python/TM1Py utility). I have used all kind of different approaches in the past, and I always had issues. Even with Flag-files approach, you end up having files being locked from OS and other type of issues.

RushTI is easy to use and it provides all the flexibility you need to manage the parallel execution, you can even implement process dependencies easily.
Ardian Alikaj
Post Reply