How should I trigger the custom execution pin on script node

Isaac Sim Version

[v] 4.0.0

Operating System

[v] Windows 11

GPU Information

  • Model: RTX 4070ti

I have created a custom execution attribute in the script node and want to trigger it using an if-else statement.
How should I trigger the custom execution pin on the script node?

///////////////My code as below//////////////////

from omni.graph.action_core import get_interface

def setup(db: og.Database):
state = db.per_instance_state
state.index = 0
pass

def cleanup(db: og.Database):
pass

def compute(db: og.Database):
state = db.per_instance_state
if state.index < 10:
get_interface().set_execution_enabled(“outputs:trigger”)
else:
get_interface().set_execution_enabled(“outputs:execOut”)
state.index += 1
return True
//////////////////////////

However, when I execute this code, the cmd reports an error as follows.
[Error] [omni.graph.core.plugin] /World/ActionGraph/script_node: [/World/ActionGraph] 2 activated outputs, only 1 is permitted per compute. [outputs:execOut,outputs:trigger]
image

Thank you so much for the help.

Not sitting in front of the computer now but I’m sure you can use a bool output and use another node to trigger when true. You could use the first script node to output two bools then use two other script nodes firing a trigger on each

Also the top exc out will always fire from the exc in as I understand it.

You can’t trigger a node using a bool. You need execIn of type uint (execution)