- macOS 10.5+
A workflow consists of one or more actions (discrete tasks), which together can perform complex automation tasks. Your application can use workflows to package its own features and to take advantage of features provided by other applications. You create actions with Xcode, while you create workflows with the Automator application.
You can load and run a workflow with minimal overhead by using the
AMWorkflow class method
run(at:. However, in situations where you need greater control, such as the ability to start and stop the workflow, you can use an instance of the
AMWorkflow class instead. In that case, you’ll have to create and initialize both a workflow and a workflow controller object.
In either case, the workflow is run in a separate process so that any actions it contains are executed in a separate memory space. That helps to insulate your application from crashes, memory leaks, or exceptions that might occur from running the actions in the workflow.