Jump to content

Running Automation Services Locally with IronScripts


Kibong Kang
Go to solution Solved by Fredrik Rosell,

Recommended Posts

I would like to execute the functions within the automation service or the automation service itself, using IronPython scripting.

Currently, the automation service XML files that constitute several jobs are stored in the library. To run the automation service locally, I open the automation service through the existing automation service task builder.

I want to create a button within the text area that, when clicked, triggers the execution of the automation service. Is there any way to achieve this?

Link to comment
Share on other sites

  • Solution

Hello,

I recommend that you explain your exact use case in a bit more detail, and maybe you will get some good suggestions from the community.

A few initial comments though:

The ability to run Automation Services Jobs locally in the Job Builder is basically for testing while developing a job. I don't think there is any solution for your use case (as I understand it) that involves the Job Builder.   

Maybe one possible solution to explore could be to use the Automation Services REST API. That gives you the ability to e.g. execute existing jobs stored in the library or just provide the jobxml as an argument.

References:

Manual: https://docs.tibco.com/pub/spotfire_server/12.5.0/doc/api/TIB_sfire_server_REST_API_Reference/as.html

Community article: REST API to Execute TIBCO Spotfire® Automation Services Jobs

https://community.spotfire.com/s/article/rest-api-execute-tibco-spotfirer-automation-services-jobs

Community article: IronPython Script to call a REST (POST) web service over HTTPS with Authentication

https://community.spotfire.com/s/article/ironpython-script-call-rest-post-web-service-over-https-authentication

Link to comment
Share on other sites

I'm not sure if I understood the exact thing because what you're saying is difficult for me.

I have the text of the contents of the xml file created by the automation service builder, can I see the same effect with ItonPython as I did locally?

Or does it mean that it can be executed through the task information that can be obtained through xml?

I will let you know if you need any additional information more for sure.

But I don't know what you need, so I'd appreciate it if you could let me know.

Link to comment
Share on other sites

Hello Kibong!

>I have the text of the contents of the xml file created by the automation service builder, can I see the same effect with ItonPython as I did locally?

You would need some way to trigger the execution of it - I described one possible solution (using the Automation Services REST API) in my previous response. There is no more streamlined/designed method for executing that job from within IronPython in a Text Area.  

>Or does it mean that it can be executed through the task information that can be obtained through xml?

To execute that xml file (the job (definition)), you would normally set it up as an Automation Services job in your Spotfire, or (this was the only method available in the past) use the Client Job Sender to execute it. You can read more about that here: 

Job execution and scheduling

https://docs.tibco.com/pub/spotfire_server/12.5.0/doc/html/TIB_sfire_autsvcs_UserGuide/autoservices/topics/job_execution_and_scheduling.html?scroll=concept_33CD87440F744A438A0EC94CBEFEAD1E

As mentioned in my previous reply, using the REST API, you also have the option to just provide that jobxml directly as an argument (see section 4.1.2. Start an Automation Services job from XML - https://docs.tibco.com/pub/spotfire_server/12.5.0/doc/api/TIB_sfire_server_REST_API_Reference/as.html?_ga=2.239512387.1926899013.1688706991-776196050.1636355826), i.e. it doesn't have to be a saved job in the Library.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...