Page 1 of 1

Planning Analytics - Run TI Process Passing URL

Posted: Thu Dec 15, 2016 6:04 pm
by tianoklein
Hello Folks,
As we can see, the Planning Analytics can't run a TI process natively (only using a sheet in perspectives).
Anyone knows if have a way to run a process using a URL? Any advice to run a TI process via portal?

I tried to use the link below, but no sucess.
https://www.ibm.com/developerworks/comm ... 08f8fc2eff

Thanks!

Re: Planning Analytics - Run TI Process Passing URL

Posted: Fri Dec 16, 2016 7:47 pm
by BrianL
What errors are you getting when following those instructions?

It's important to note that just using a URL like that in a browser link won't work. The browser will make a GET request while the API requires a POST request with a body.

Re: Planning Analytics - Run TI Process Passing URL

Posted: Mon Dec 19, 2016 2:42 pm
by tianoklein
Hello BrianL,
I create a html file and nothing happen. :(


Code: Select all

<html>
<body>
<form action="https://_HOST_:_PORT_/tm1/api/v1/Processes('testP')/tm1.Execute"  method="post">
<button type="submit">Submit</button><br>
</form>
</body>
</html>

Re: Planning Analytics - Run TI Process Passing URL

Posted: Mon Dec 19, 2016 2:55 pm
by BrianL
The HTML form POST action does not allow arbitrary body text or even JSON formatted body text. That's why your example isn't working. Javascript is probably your best bet. Try googling 'javascript POST JSON'.

Re: Planning Analytics - Run TI Process Passing URL

Posted: Mon Dec 19, 2016 4:52 pm
by tianoklein
Hi BrianL,
I'm no good making javascripts /JSON scripts :cry:
Am I going to the right way?

Code: Select all

<html>
<body>
<script>
var text = '{"name":"Processes","kind":"EntitySet","url":"https://_host_:_port_/tm1/api/v1/Processes('test')/tm1.Execute"}';
var obj = JSON.parse(text);
</script>

<form action="obj" method="POST">
<button type="submit">Submit</button><br>
</form>
</body>
</html>

Re: Planning Analytics - Run TI Process Passing URL

Posted: Mon Dec 19, 2016 5:04 pm
by dr.nybble
Try using jquery with the $.post method.

Check the example at the bottom:

https://api.jquery.com/jquery.post/