Manipulating the Observation Process of Global Callbacks

For both Project Schematic and Workbench actions, you can manipulate the observation process of global callbacks.

Accessing Information

For task-related callbacks, from the task, you can access name information, template information, properties, and the task's underlying container via the property InternalObject.

Querying

For queries, you can alter the action's return value in the post-execution callback.

Aborting an Action

To abort an action, you can throw an exception from the pre-execution callback.

Filtering Components

To process only the callback for a specific task or template, you must filter the components by performing a check inside the callback implementation based on the supplied arguments.

For example, for Project Schematic actions, you can access the task names or containers to decide whether or not to take action. If the action must apply only to all Fluent Setup components, you would create an update callback that contains the following code:

def myPostUpdateCallback(task):
    container = task.InternalObject
    if container != None and container.Type.Equals('Ansys.Fluent.Addin:SetupContainer'):
        #perform your post-update action on the fluent setup container
Stopping Observations:

When you unload all extensions that register global callbacks, ACT stops observing the specified actions. This sets Workbench back to its prior state and can be used as a fix if either Project Schematic or Workbench observations cause unexpected behavior.