Automations
The Automations page allows you to design JSON messaging workflows that support a rich set of communication protocols. With a simple set of tools, you can leverage your FME Server to receive and send messages, and run workspaces on demand.
Automations are comprised of three primary components:
- Triggers: Listen for and receive messages from external clients or from within FME Server.
- External Actions: Send messages to external clients or inside FME Server.
- Actions: Process messages between triggers and external actions, either in an FME workspace, or through another tool.
The example below illustrates a simple workflow comprised of a single trigger, action, and external action. A Directory Modified trigger sends messages to a Run Workspace action whenever a specified directory is updated. If the workspace fails to run, a message is sent to a Send Email external action, which sends an e-mail.
Tip: You do not need an external message to run a workspace. You can trigger a workspace to run any time with the Schedule trigger.
Getting Started with Automations
Start a new automations workflow from the Get Started, Automation Builder, or Manage Automations page. (To use an existing automation as a starting point, select it from the Manage Automations page, click Actions > Duplicate, and open the duplicated automation.)
To start, one undefined Trigger and "Next Action" (which can be either an action or external action) are placed on the workflow area. As you continue to define the workflow, additional "Next Action" components are added.
Alternatively, to add additional components, expand . Double-click or click-and-drag from one of the applicable icons.
Tip: You can disable "guided mode" when building a workflow. Select Menu > Hide guides. To enable, select Menu > Show guides.
- Define Components
- Parameters: The settings required for the Trigger to function as desired.
- Output Keys: The JSON key-value pairs to include in the outgoing message. By default, all keys are included. Optionally, you can create your own keys. For more information, see Working with Output Keys in Automations Workflows.
- Parameters: The settings that are required for the action to function as desired.
- Output Keys: The JSON key-value pairs to include in the outgoing message. By default, all keys are included. Optionally, you can create your own keys. For more information, see Working with Output Keys in Automations Workflows.
- Advanced: Run options for workspaces.
- Save, Name, and Tag the Workflow
- Start the Workflow
Define triggers, actions, and external actions, as desired.
Double-click the trigger icon you want to define. Under Trigger Details, expand Select a Trigger Event and make a selection. For information about each trigger, including how to configure, see Automations Triggers.
Configure the following:
For more information, see the documentation for the specified trigger under Automations Triggers.
Double-click the Next Action icon. Under Next Action Details, expand Select an Action and make a selection under Actions. For information about each action, including how to configure, see Automations Actions.
The Automations Builder automatically connects your action to the previous component in the workflow. However, if connections are not specified, click an output port of an upstream component and an input port of the action. Alternatively, click and drag a connection line between ports.
Tip: Create connections to actions before configuring parameters. This way, you'll have access to any incoming parameters, where applicable. For more information, see Working with Parameters in Automations Workflows.
Configure the following, where applicable:
For more information, see the documentation for the specified action under Automations Actions.
Double-click the Next Action icon. Under Next Action Details, expand Select an Action and make a selection under External Actions. For information about each external action, including how to configure, see Automations External Actions.
The Automations Builder automatically connects your external action to the previous component in the workflow. However, if connections are not specified, click an output port of an upstream component and an input port of the external action. Alternatively, click and drag a connection line between ports.
Tip: Create connections to external actions before configuring parameters. This way, you'll have access to any incoming parameters, where applicable. For more information, see Working with Parameters in Automations Workflows.
Under Parameters, configure the remaining settings. For more information, see the documentation for the specified external action under Automations External Actions.
Click the Save icon, or Select Menu > Save As. In the Save As dialog, specify a Name and one or more Tags (optional), and click OK.
Tip: If you have many workflows, use tags to organize them into meaningful categories. When viewing workflows on the Manage Automations page, you can filter on tags.
Workflows do not listen for incoming messages or run until you click Start Automation. Alternatively, you can start or stop workflows on the Manage Automations page.
Note: You cannot edit a workflow unless it is stopped. Click Stop Automation.
Other Tasks - Building Workflows
To Annotate a Workflow
Annotate your workflow with comments. Select a component, right-click and select Add Annotation, or click the Add Annotation icon on the toolbar. To add an annotation that is not connected to a component, right-click on a blank area of the canvas, or unselect all components and click the Add Annotation icon on the toolbar.
To Add Bookmarks to a Workflow
Group related components together in bookmarks. Right-click on the canvas and select Add Bookmark, or click the Add Bookmark icon on the toolbar. Update the text of the bookmark header, drag the bookmark over the components you want to group, and resize as desired. To change the color of the bookmark, right-click and select Change Color.
To remove or cut/paste components in a workflow
In the Automations Builder, select one or more components and press delete on your keyboard. Alternatively, right-click on the components and select Cut (to Paste later) or Delete.
To disable or re-enable components in a workflow
Disabled components do not run as part of a workflow. In the Automations Builder, select one or more components, right-click and select Disable. To re-enable, right-click and select Enable.
To add or remove a tag from a workflow
In the Automations Builder, select Menu > Save As. In the Save As dialog, configure the tags as desired, and click OK.
Managing Automations
To filter the list of workflows with tags
If you have many workflows, use tags to organize them into meaningful categories. When you view workflows on the Manage Automations page, you can filter on these tags.
- To add (or remove) tags: On the Manage Automations page, select Manage Tags. You can also add tags dynamically in the Automations Builder when you create and save an automation.
- To apply a tag as a filter: On the Manage Automations page, expand the Filters bar.
To start or stop a workflow
Workflows do not listen for incoming messages or run until they are started, and they cannot be edited until they are stopped. On the Manage Automations page, select a workflow, and select Actions > Start or Stop.
To open or edit an existing workflow
On the Manage Automations page, click on the workflow you want to open or edit.
Note: You cannot edit a workflow unless it is stopped. Select the workflow and select Actions > Stop. Alternatively, on the Build page of a workflow, click Stop Automation.
To remove a workflow
On the Manage Automations page, select a workflow, and select Actions > Remove.
To share a workflow
On the Manage Automations page, click the Share with Others icon. Or, on the Build page of a workflow, select Menu > Share. Through sharing, you can grant levels of permissions on an item to other users. You can share an item if you own it, or if you are a user with Manage Security permissions, such as an administrator. For more information about sharing and ownership, see Role-Based and User-Based Access Control.
Sharing an automation may require granting additional permissions to other components in the automation, such as access to a repository to run a workspace. If these permissions are not already granted, FME Server attempts to grant them. On the Sharing Options dialog, you can view the additional permissions that are required on the automation.
Working with Automation Logs
Automation logs record all activities performed on workflows.
To view an Automation log, select a workflow on the Manage Automations page and click Actions > View Log File. Alternatively, on the Build page of a workflow, select View Log File from the menu.
On an Automation Log page, you can perform the following:
- Click Clear Log to remove the current contents of the log.
- Click Download Log to download the current contents of the log.
On the Scheduled Cleanups page, you can configure how long, in general, to keep Automation log messages. By default, messages in Automation logs older than two weeks are removed.