ALTERYX INSPIRE | Join us this May for for a multi-day virtual analytics + data science experience like no other! Register Now
The Alteryx Community will be temporarily unavailable for a time due to scheduled maintenance on Thursday, April 22nd. Please plan accordingly.

Dev Space

Customize & extend the power of Alteryx. SDKs, APIs, custom tools, and more!
SOLVED

Get AlteryxEngine Status (disabled) using Python SDK

bobpeers
9 - Comet

I have an output SDK tool that should be disabled if the Runtime setting on the workflow are set to disable all outputs.

 

I can see in the docs that the AlteryxEngine has a status type called disabled that seems to contain this information, but how do I access this information in the SDK?

 

Docs for the status type are here, https://help.alteryx.com/current/developer-help/alteryxengine-python-class, I'm just not clear how to access this status using th python sdk.

tlarsen7572
11 - Bolide

Hey Bob,

 

Those statuses are for sending messages back to the engine.  So you would use that status if you want to let the engine know that your tool is disabled.

 

In order to identify whether output tools are disabled, you can use get_init_var:

 

output_disabled = self.alteryx_engine.get_init_var(self.n_tool_id, 'DisableAllOutput')

 

output_disabled will be a string that is either 'True' or 'False'.

 

Btw, this isn't documented in either the Python docs or the C++ header files.  I looked into the XML of the workflow and at the bottom are a bunch of properties.  I used the tag name for disabling output as the init_var and it happily worked.  It doens't work for all of them...

Capture.JPG

bobpeers
9 - Comet

I never thought to check there, many thanks for the help it works perfectly!

 

Unfortunately I find the docs are super thin and I spend a lot of time reverse engineering other workflows to see what's going on 😒