TM1ProcessChoresUsing

Post Reply
bagovino
Posts: 26
Joined: Fri Oct 09, 2009 5:54 pm
OLAP Product: TM1
Version: 9.5.1
Excel Version: 2007

TM1ProcessChoresUsing

Post by bagovino »

This is probably a long shot since not a lot of people use the API, but I figured I'd ask in case someone actually knows the answer to this.

I'm trying to see what Chores a given Process is a step in and I came across the TM1ProcessChoresUsing() property function in the API. It looked to me as if it could be used to get a list of Chore handles that use a particular process, but if I try using that property with ObjectPropertyGet for any Process it just returns an error, ObjectPropertyNotFound if I remember correctly. I've tried using it with a Chore handle instead of a Process handle and I get the same results. As a work around I just loop over every Chore on a server and look at the array that stores the Process names for each of its steps, but I was hoping for something a little more... elegant. Has anyone ever used TM1ProcessChoresUsing() with success?

Thanks.
lotsaram
MVP
Posts: 3702
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: TM1ProcessChoresUsing

Post by lotsaram »

A file system search is pretty effective and pretty fast.
.cho files are simple text files and contain the names of the component processes.
bagovino
Posts: 26
Joined: Fri Oct 09, 2009 5:54 pm
OLAP Product: TM1
Version: 9.5.1
Excel Version: 2007

Re: TM1ProcessChoresUsing

Post by bagovino »

Thanks for the suggestion, but directly accessing the chore files on the disk is not applicable to what my application does. It actually doesn't have any access to the file system on the server running TM1.
David Usherwood
Site Admin
Posts: 1458
Joined: Wed May 28, 2008 9:09 am

Re: TM1ProcessChoresUsing

Post by David Usherwood »

But TM1 does :)
So write a TI to read the .cho files.
Or, of course, spend much longer digging into the badly documented and obscure API. Your call.
bagovino
Posts: 26
Joined: Fri Oct 09, 2009 5:54 pm
OLAP Product: TM1
Version: 9.5.1
Excel Version: 2007

Re: TM1ProcessChoresUsing

Post by bagovino »

It's a program that replicates processes from one instance to another without having to bounce the instance. I'd rather it not go around creating and deleting objects (any more than necessary) on the destination instance.

The program itself works fine already, and looping over the chores and looking at their steps in the API doesn't take long; I was just hoping there might be a cleaner way of seeing which chores I have to worry about through the API.
lotsaram
MVP
Posts: 3702
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: TM1ProcessChoresUsing

Post by lotsaram »

bagovino wrote:It's a program that replicates processes from one instance to another without having to bounce the instance. I'd rather it not go around creating and deleting objects (any more than necessary) on the destination instance.

The program itself works fine already, and looping over the chores and looking at their steps in the API doesn't take long; I was just hoping there might be a cleaner way of seeing which chores I have to worry about through the API.
I'm interested as this would be useful. But isn't there a product that does this already?
bagovino
Posts: 26
Joined: Fri Oct 09, 2009 5:54 pm
OLAP Product: TM1
Version: 9.5.1
Excel Version: 2007

Re: TM1ProcessChoresUsing

Post by bagovino »

I think there is, but being the curious and do-it-myself guy that I am I decided to see if I could figure it out how make my own. :)
Post Reply