Automations

Automations allow you to design JSON messaging workflows that support a rich set of communication protocols. With a simple set of tools, you can leverage yourFME Flowto receive and send messages, and runworkspaces on demand. This powerful combination allows you to control complex data flow patterns in your enterprise.

Automations are comprised of three primary components:

  • Triggers: Listen for and receive messages from external clients or from withinFME Flow.
  • 年代upported protocols

  • External Actions: Send messages to external clients or insideFME Flow.
  • 年代upported protocols

  • Actions: Process messages between triggers and external actions, either in an FMEworkspace, or through another tool.
  • 年代upported Actions

Tip  "> TipYou do not need an external message to run aworkspace. You can schedule aworkspaceto run at specific times in the future with the年代cheduletrigger, or on demand with theManual Trigger.

的example below illustrates a simple workflow comprised of a trigger that receives an email, an action to run aworkspace, and an array of external actions that sends emails depending on theworkspaceresults. AnEmail Received (IMAP)trigger sends messages to aRunWorkspaceaction whenever an email from a specified IMAP server host is received. Theworkspacevalidates features in a file attached to the email, and reads features that pass validation into a database. The automation proceeds with separate年代end an Emailexternal actions based on the results of the validation in theRunWorkspaceaction. One email sends details about features that passed validation and were read into the database, including details on feature type attributes. Another email sends details about features that failed validation. As well, two additional emails are sent depending on whether theworkspacecompleted successfully or not. Finally, metadata about anyEmail Receivedtriggers that fail to fetch emails is logged.

Mouse-over to view:

Getting Started with Automations

年代tart a new Automations workflow from the Get Started, Create Automation, or Manage Automations page. (To use an existing automation as a starting point, select it from the Manage Automations page, clickActions>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  "> TipYou can disable "guided mode" when building a workflow. SelectMenu>Hide guides. To enable, selectMenu>年代how guides.
  1. Define Components
  2. Define triggers, actions, and external actions, as desired.

  3. 年代ave, Name, and Tag the Workflow
  4. Click the Save icon, or SelectMenu>年代ave As. In the Save As dialog, specify aNameand one or moreTags(optional), and clickOK.

    Tip  "> TipIf 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.
  5. 年代tart the Workflow
  6. Workflows do not listen for incoming messages or run until you click年代tart Automation. Alternatively, you can start or stop workflows on the Manage Automations page.

    Note  "> Note你不能编辑工作流,除非它停止。亚搏在线Click停止Automation.

Other Tasks - Building Workflows

To run a workflow on demand

You can create a workflow that does not respond to any incoming message or schedule, but runs on demand, and allows you the option to pass in sample JSON data. This type of workflow uses aManual Triggerin place of one of the other trigger options. Manual triggers are useful when you want to test a workflow before you create one that receives real, incoming messages.

To enable looping in workflows

When looping is enabled, you can draw connections from downstream output ports back to the input ports of upstream components. Looping is a useful mechanism for creating process manager patterns in your workflows. For more information, seeLooping Data between Workspaces. On the canvas, loops appear as dotted connection lines.

To enable looping, select使循环from the canvas menu. This setting applies to the current workflow, as well as subsequent workflows that you open.

Warning  "> WarningLooping is an advanced feature. Exercise caution to avoid creating infinite loops that may overload your FME Engines. Additionally, looping upstream of aMerge Messagesaction is not recommended and may lead to unexpected behavior.

To disable looping, selectDisable Loopingfrom the canvas menu. Any existing loops remain in place.

To annotate a workflow

Annotate your workflow with comments. Select a component, right-click, and selectAdd Annotation. Alternatively, expandand drag from the Annotation icon onto the component. To add an annotation that is not connected to a component, unselect all components, and add an annotation onto a blank area of the canvas.

To add bookmarks to a workflow

Group related components together in bookmarks. Right-click on the canvas and select添加书签, or expand并从书签图标拖放到画布上。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 selectChange Color.

To cut, copy, paste, or remove components in a workflow

On the canvas, right-click on the components and selectCut,Copy,Paste, or删除. Standard browser-based keyboard shortcuts, such as Ctrl + c, may also apply.

Tip  "> TipIf you are building multiple workflows across instances of the Web User Interface in separate windows or tabs, you can cut/copy and paste between them.

To disable or re-enable components in a workflow

Disabled components do not run as part of a workflow. On the canvas, select one or more components, right-click and selectDisable. To re-enable, right-click and selectEnable.

To add or remove a tag from a workflow

On the canvas, selectMenu>年代ave As. In the Save As dialog, configure the tags as desired, and clickOK.

Alternatively, on the Manage Automations page, select one or more worflows, and selectActions>Edit Tags.

Managing Automations

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 selectActions > Startor停止.

To view event counts

FME Flowrecords asevent countsthe number of times a node in your automation runs. Event counts are visible on connection lines. In this example, both theFME Flow年代chedule trigger and the Run aWorkspaceaction have run ten times since the automation started:

Event counts automatically refresh every ten seconds. To expedite a refresh, clickRefresh.

Once an automation is stopped, the final event counts display. These final event counts are removed and reset when any of the following occurs:

  • 的automation is restarted.
  • A connection is updated or removed. Only event counts of downstream nodes are affected.
  • 的parameters of a node are updated, or a node is removed, disabled, or enabled. Only event counts of downstream nodes are affected.

To open or edit an existing workflow

On the Manage Automations page, click on the workflow you want to open or edit.

Note  "> Note你不能编辑工作流,除非它停止。亚搏在线年代elect the workflow and selectActions>停止. Alternatively, on the Create page of a workflow, click停止Automation.

To change the name of a workflow

  • On the Manage Automations page, select a workflow, and selectActions > Rename.
  • On the Create page of a workflow:
    • Click on the workflow name (besideMenu) to edit.
    • 年代electMenu > Rename.

To remove a workflow

On the Manage Automations page, select a workflow, and selectActions > Remove.

To share a workflow

On the Manage Automations page, click the Share with Others icon. Or, on the Create page of a workflow, selectMenu>年代hare. 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 permission in Security, such as an administrator. For more information about sharing and ownership, seeRole-Based and User-Based Access Control.

年代haring an automation may require granting additional permissions to other components in the automation, such as access to a repository to run aworkspace. If these permissions are not already granted,FME Flowattempts to grant them. On the Sharing Options dialog, you can view the additional permissions that are required on the automation.

To view jobs triggered by a workflow

  • On the Manage Automations page, select a workflow, and selectActions > View Triggered Jobs.
  • On the Create page of a workflow, selectMenu > View Triggered Jobs.

To create an automation app from a workflow

年代elect an automation that contains aManual Trigger, clickActions, and selectCreate Automation App.

Viewing Automations

的Manage Automations page lists all the automations created on yourFME Flow.

的columns displayed on this page are:

Note  "> Note年代ome fields do not display by default. To control which columns display, click the Customize Columns icon.
  • Name: The user-defined name of the automation.
  • Tags: The tags assigned to the automation, if any. For more information, seeTo filter the list of workflows, below.
  • Last Updated: The time when the automation was last updated, using the following syntax:
  • year-month-day hour:minute:second

  • 年代tarted: Whether the automation is started or not. Automations do not listen for incoming messages or run until they are explicitly started.
  • 老板: The user who created the automation and has full permissions on it.
  • 年代tatus: The current status of the automation.
  • 年代hare: To share an automation, click the Share with Others icon. For more information, seeTo share a workflow.
  • Id: The system-generated ID of the automation. To copy, click the Copy to Clickboard icon.

To filter the list of workflows

  • To apply a filter: On the Manage Automations page, expand theFiltersbar.
  • To add (or remove) tags: Use tags to organize workflows into meaningful categories on which you can filter. On the Manage Automations page, selectManage Tags.

Working with Automation Logs

Automation logs record all activities performed on workflows.

To view an Automation log

You can view all activity of an automation. You can view the full contents of an automation log, or only since the automation was last started.

  • On the Manage Automations page, do one of the following:
    • 年代elect a workflow and clickActions>View Log File.
    • Click an Error or Warning icon under the Status column of a corresponding workflow. The log opens with "Filter errors" or "Filter warnings" set, respectively.
  • On the Create page of a workflow, selectView Log Filefrom the menu.

On the Automation Log page, use the toolbar to filter the log onLog a Messageaction, error, warning, or information messages. You can also:

  • Display only log messages from when the automation was last started.
  • Hide or display timestamps.
  • Reverse the chronological order of log messages.
  • Refresh the log display.

To download an Automation log

On an Automation Log page, clickDownload Logand select:

  • Download Full Log: Downloads the full automation log
  • Download Filtered Log: Downloads the log according to any filters you applied to the log view (see above).

To configure how long to keep Automation logs

On the年代cheduled Cleanupspage, you can configure how long, in general, to keep Automation log messages. By default, messages in Automation logs older than two weeks are removed.