Determine whether a TI process exists
-
- MVP
- Posts: 3222
- Joined: Mon Dec 29, 2008 6:26 pm
- OLAP Product: TM1, Jedox
- Version: PAL 2.1.5
- Excel Version: Microsoft 365
- Location: Brussels, Belgium
- Contact:
Determine whether a TI process exists
Hello all,
Quick question. In Turbo Integrator, we have CubeExists(), DimensionExists(), ViewExists(), SubsetExists().
Why not ProcessExists()? Although Dimix() will do as well, why not have a direct function?
Wim
Quick question. In Turbo Integrator, we have CubeExists(), DimensionExists(), ViewExists(), SubsetExists().
Why not ProcessExists()? Although Dimix() will do as well, why not have a direct function?
Wim
Best regards,
Wim Gielis
IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Wim Gielis
IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
-
- Site Admin
- Posts: 6643
- Joined: Sun May 11, 2008 2:30 am
- OLAP Product: TM1
- Version: PA2.0.9.18 Classic NO PAW!
- Excel Version: 2013 and Office 365
- Location: Sydney, Australia
- Contact:
Re: Determine whether a TI process exists
That's a very good point; and also ProcessExists is the one which is actually needed more than most of the others since a process is the only TM1 object that I can think of which can be in one of three, not two, states. (Does not exist, exists but has compile errors, exists without compile errors. With every other type of object it either is or it ain't.) If you are trying to call another process, you certainly want to know which one of those three it is.Wim Gielis wrote: Quick question. In Turbo Integrator, we have CubeExists(), DimensionExists(), ViewExists(), SubsetExists().
Why not ProcessExists()? Although Dimix() will do as well, why not have a direct function?
Yes, IMHO that one should certainly be introduced as a function which can return one of three, not two, values.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-
- MVP
- Posts: 600
- Joined: Wed Aug 17, 2011 1:19 pm
- OLAP Product: TM1
- Version: 9.5.2 10.1 10.2
- Excel Version: 2003 2007
- Location: York, UK
Re: Determine whether a TI process exists
Cube rules have the same set of characteristics and states. Similar functions for rules would probably be useful too. What would really do it for me though would be ProcessLoadFromFile. That would be sweet.
-
- Site Admin
- Posts: 6643
- Joined: Sun May 11, 2008 2:30 am
- OLAP Product: TM1
- Version: PA2.0.9.18 Classic NO PAW!
- Excel Version: 2013 and Office 365
- Location: Sydney, Australia
- Contact:
Re: Determine whether a TI process exists
Quite so. I qualify my previous statement accordingly.Duncan P wrote:Cube rules have the same set of characteristics and states.
It would indeed; it would be a dead easy way to do hot promotion. I suspect that Iboglix might argue, and not without some justification, that there would be a risk of loading corrupt code with such a function had the .pro file been manually monkeyed with rather than being created by the Editorsaurus or Muddler in a dev environment, but really that's no different to the current situation where .pro files can be put in a data directory to be loaded on restart. Overall I think that the advantages of your idea hugely outweigh any potential risks.Duncan P wrote: Similar functions for rules would probably be useful too. What would really do it for me though would be ProcessLoadFromFile. That would be sweet.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-
- Community Contributor
- Posts: 217
- Joined: Thu Aug 15, 2013 9:05 am
- OLAP Product: TM1
- Version: 10.2.1.1
- Excel Version: 14.0.6129.5000
Re: Determine whether a TI process exists
Hello Wim.
I know this is an old thread but I have a possible solution to your question.
You can find out if a process exists in a given server, by searching through the flat files of that server.
You use the WildCardFileSearch function and direct it at the data files of the relevant server.
My code below is a quick demo:
the vName variable is given a process name, you then pass that variable through the WildCardFileSearch function, then you run the process.
You do not need an ASCIIOUTPUT, you can use the return value any way you like.
I know this is an old thread but I have a possible solution to your question.
You can find out if a process exists in a given server, by searching through the flat files of that server.
You use the WildCardFileSearch function and direct it at the data files of the relevant server.
My code below is a quick demo:
Code: Select all
vName = 'NameOfDesiredProcess';
Z = Relevant Drive
vWild =WildCardFileSearch('Z:\RelevantService\DataFilesOfService\' | vName |'.pro','');
ASCIIOUTPUT('Z:\YourChosenFile\vWild.txt',vWild);
You do not need an ASCIIOUTPUT, you can use the return value any way you like.
-
- MVP
- Posts: 1827
- Joined: Mon Dec 05, 2011 11:51 am
- OLAP Product: Cognos TM1
- Version: PA2.0 and most of the old ones
- Excel Version: All of em
- Location: Manchester, United Kingdom
- Contact:
Re: Determine whether a TI process exists
Trevor,TrevorGoss wrote:Hello Wim.
I know this is an old thread but I have a possible solution to your question.
You can find out if a process exists in a given server, by searching through the flat files of that server.
You use the WildCardFileSearch function and direct it at the data files of the relevant server.
My code below is a quick demo:the vName variable is given a process name, you then pass that variable through the WildCardFileSearch function, then you run the process.Code: Select all
vName = 'NameOfDesiredProcess'; Z = Relevant Drive vWild =WildCardFileSearch('Z:\RelevantService\DataFilesOfService\' | vName |'.pro',''); ASCIIOUTPUT('Z:\YourChosenFile\vWild.txt',vWild);
You do not need an ASCIIOUTPUT, you can use the return value any way you like.
As wim eluded to in his first post the easiest way to do this is a dimix on the }processes dimension, your code would also work but if I was to query the data directory I would use fileexists () as opposed to the wildcard function.
The point was just why on earth they put in CubeExists or DimensionExists and not ProcessExists functions.
Declan Rodger
-
- Community Contributor
- Posts: 217
- Joined: Thu Aug 15, 2013 9:05 am
- OLAP Product: TM1
- Version: 10.2.1.1
- Excel Version: 14.0.6129.5000
Re: Determine whether a TI process exists
Declanr,
I agree, we have 3 different ways of doing it here, so a function called ProcessExists should be straight forward.
Thanks for your response.
I agree, we have 3 different ways of doing it here, so a function called ProcessExists should be straight forward.
Thanks for your response.
-
- MVP
- Posts: 3222
- Joined: Mon Dec 29, 2008 6:26 pm
- OLAP Product: TM1, Jedox
- Version: PAL 2.1.5
- Excel Version: Microsoft 365
- Location: Brussels, Belgium
- Contact:
Re: Determine whether a TI process exists
Follow up:
has been added recently to the TI functions.
Thank you IBM.
Code: Select all
ProcessExists
Thank you IBM.
Best regards,
Wim Gielis
IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Wim Gielis
IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
-
- Posts: 132
- Joined: Thu Oct 23, 2014 10:15 pm
- OLAP Product: tm1, cognos bi
- Version: 10.2
- Excel Version: 2010
Re: Determine whether a TI process exists
It would be nice if they also added a TI Function to delete a TI Process (such as ProcessDestroy or ProcessDelete). I have some TI Processes that their names start with } (like control objects) and they cannot be deleted from Server Explorer so the only way is to delete the .pro file from Data folderWim Gielis wrote: ↑Mon Feb 26, 2018 11:37 am Follow up:has been added recently to the TI functions.Code: Select all
ProcessExists
Thank you IBM.
-
- MVP
- Posts: 3222
- Joined: Mon Dec 29, 2008 6:26 pm
- OLAP Product: TM1, Jedox
- Version: PAL 2.1.5
- Excel Version: Microsoft 365
- Location: Brussels, Belgium
- Contact:
Re: Determine whether a TI process exists
Did you check AsciiDelete ? You will still have to bounce the server but at least deleting the pro file can be done with a process.tm123 wrote: ↑Wed May 02, 2018 1:32 pmIt would be nice if they also added a TI Function to delete a TI Process (such as ProcessDestroy or ProcessDelete). I have some TI Processes that their names start with } (like control objects) and they cannot be deleted from Server Explorer so the only way is to delete the .pro file from Data folderWim Gielis wrote: ↑Mon Feb 26, 2018 11:37 am Follow up:has been added recently to the TI functions.Code: Select all
ProcessExists
Thank you IBM.
Best regards,
Wim Gielis
IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Wim Gielis
IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
-
- MVP
- Posts: 3222
- Joined: Mon Dec 29, 2008 6:26 pm
- OLAP Product: TM1, Jedox
- Version: PAL 2.1.5
- Excel Version: Microsoft 365
- Location: Brussels, Belgium
- Contact:
Re: Determine whether a TI process exists
Or use the TM1 REST API to delete a process.
Best regards,
Wim Gielis
IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Wim Gielis
IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly