Mac Developer Library

Developer

Automator Framework Reference AMWorkflowController Class Reference

Options
Deployment Target:

On This Page
Language:

AMWorkflowController

The AMWorkflowController class lets you manage an Automator workflow in your application. You use the AMWorkflow class to instantiate a workflow and an instance of AMWorkflowView to display it. More...

Inheritance


Conforms To


Import Statement


import Automator @import Automator;

Availability


Available in OS X v10.5 and later.
  • workflow workflow Property

    Returns the receiver's workflow.

    Declaration

    Swift

    var workflow: AMWorkflow!

    Objective-C

    @property(strong) AMWorkflow *workflow

    Discussion

    Use setWorkflow: to set the receiver’s workflow.

    Import Statement

    import Automator

    Availability

    Available in OS X v10.5 and later.

  • Returns the receiver's workflow view.

    Declaration

    Swift

    var workflowView: AMWorkflowView!

    Objective-C

    @property(strong) AMWorkflowView *workflowView

    Discussion

    Use setWorkflowView: to set the receiver’s workflow.

    Import Statement

    import Automator

    Availability

    Available in OS X v10.5 and later.

  • delegate delegate Property

    Returns the receiver's delegate.

    Declaration

    Swift

    unowned(unsafe) var delegate: AnyObject!

    Objective-C

    @property(assign) id delegate

    Discussion

    Use setDelegate: to set the receiver’s delegate object. This object will receive updates on the progress and state of the workflow controller.

    Import Statement

    import Automator

    Availability

    Available in OS X v10.5 and later.

  • Pauses a workflow that is running.

    Declaration

    Swift

    @IBAction func pause(_ sender: AnyObject!)

    Objective-C

    - (IBAction)pause:(id)sender

    Parameters

    sender

    Object that initiated the pause action.

    Import Statement

    import Automator

    Availability

    Available in OS X v10.7 and later.

  • Stops a workflow, clears any action results, and resets the workflow back to an un-run state.

    Declaration

    Swift

    @IBAction func reset(_ sender: AnyObject!)

    Objective-C

    - (IBAction)reset:(id)sender

    Parameters

    sender

    Object that initiated the reset action.

    Import Statement

    import Automator

    Availability

    Available in OS X v10.7 and later.

  • Runs the associated workflow, after first clearing any results stored by its actions during any previous run.

    Declaration

    Swift

    @IBAction func run(_ sender: AnyObject!)

    Objective-C

    - (IBAction)run:(id)sender

    Parameters

    sender

    Object that initiated the run action.

    Import Statement

    import Automator

    Availability

    Available in OS X v10.5 and later.

  • In a paused workflow, runs the next action in the workflow and then pauses again.

    Declaration

    Swift

    @IBAction func step(_ sender: AnyObject!)

    Objective-C

    - (IBAction)step:(id)sender

    Parameters

    sender

    Object that initiated the step action.

    Discussion

    Stepping allows a workflow to be executed one action at a time. This is useful for ensuring that the workflow is doing what it’s supposed to do, as the results of each individual action can be inspected before moving on to the next.

    Import Statement

    import Automator

    Availability

    Available in OS X v10.7 and later.

  • Stops the associated workflow.

    Declaration

    Swift

    @IBAction func stop(_ sender: AnyObject!)

    Objective-C

    - (IBAction)stop:(id)sender

    Parameters

    sender

    Object that initiated the stop action.

    Import Statement

    import Automator

    Availability

    Available in OS X v10.5 and later.

  • Invoked when the workflow is about to run.

    Objective-C

    - (void)workflowControllerWillRun:(AMWorkflowController *)controller

    Import Statement

    import Automator

    Availability

    Available in OS X v10.5 and later.

  • Invoked after the workflow is run.

    Objective-C

    - (void)workflowControllerDidRun:(AMWorkflowController *)controller

    Import Statement

    import Automator

    Availability

    Available in OS X v10.5 and later.

  • Invoked when the workflow is about to stop.

    Objective-C

    - (void)workflowControllerWillStop:(AMWorkflowController *)controller

    Import Statement

    import Automator

    Availability

    Available in OS X v10.5 and later.

  • Invoked after the workflow stops.

    Objective-C

    - (void)workflowControllerDidStop:(AMWorkflowController *)controller

    Import Statement

    import Automator

    Availability

    Available in OS X v10.5 and later.

  • canRun canRun Property

    Returns a Boolean value that indicates whether the receiver's workflow is able to run.

    Declaration

    Swift

    var canRun: Bool { get }

    Objective-C

    @property(readonly) BOOL canRun

    Discussion

    You might use this method to determine when to enable a “Run” button or other UI element you use to run the workflow.

    Import Statement

    import Automator

    Availability

    Available in OS X v10.5 and later.

    See Also

    running

  • paused paused Property

    A Boolean value that indicates whether the receiver's workflow is currently paused. (read-only)

    Declaration

    Swift

    var paused: Bool { get }

    Objective-C

    @property(getter=isPaused, readonly) BOOL paused

    Import Statement

    import Automator

    Availability

    Available in OS X v10.10 and later.

    See Also

    canRun

  • running running Property

    A Boolean value that indicates whether the receiver's workflow is currently running. (read-only)

    Declaration

    Swift

    var running: Bool { get }

    Objective-C

    @property(getter=isRunning, readonly) BOOL running

    Discussion

    YEStrue if the controller’s workflow is currently running; NOfalse otherwise. Use isRunning: to determine whether the receiver's workflow is currently running.

    Import Statement

    import Automator

    Availability

    Available in OS X v10.10 and later.

    See Also

    canRun