Tm1-ui-process - run function on completion


Is it possible to run a javascript function when the process executed via tm1-ui-process directive ends?


Hi @aeremenko,

Since you are running a JavaScript function after that, you can run it via $tm1Ui service instead, and call a number of functions afterwards.

And just in case, here is an example:

$tm1Ui.processExecute('dev', 'Bedrock.Dim.Create', 'pDimension', 'My New Dimension').then(function(data){
	console.debug('Run (Bedrock.Dim.Create) %o', data);
		// process successfully ran
		// process failed

Any particular reason for running a function via tm1-ui-process vs exposing a button and running via $tm1Ui.processExecute()?



It was an existing application. So I would have to rewrite all existing buttons, plus handle response behavior.
In this case, I managed to do this with $watch to check when the processes ends.


Hi @aeremenko,

I see. Anyways, just send a ticket for this and we will check and assess from there.