Skip to main content

Scheduling and Triggers

Workflows can be started in four ways: manually, on a cron schedule, when a file arrives in a una blob storage container, or from a SQL stored procedure call. The Scheduler dialog (accessed from the Schedule tab in the workflow editor) configures all of these.


Cron Schedule​

The Workflow Scheduler tab lets you run a workflow automatically on a repeating schedule.

Setting up a schedule​

  1. Open the Schedule tab at the top of the workflow editor.
  2. Use the Cron Expression Builder to select the frequency visually, or select the custom cron option and type an expression manually.
  3. Select the correct Time Zone — the cron schedule is evaluated in this timezone, so pick the one that matches your business day.
  4. Make sure Disabled is unchecked.
  5. Click Save.

Cron expression syntax​

Una uses the Cronos library, which supports standard cron syntax with some additional expressions:

ExpressionDescription
0 9 * * MON-FRIEvery weekday at 09:00
0 6 1 * *1st of every month at 06:00
0 0 L * *Last day of every month at midnight
0 0 L-1 * *Day before the last day of the month
0 0 3W * *Nearest weekday to the 3rd of the month
0 0 LW * *Last weekday of the month
0 0 * * 2LLast Tuesday of the month
0 0 * * 6#3Third Saturday of the month
0 0 ? 1 MON#1First Monday of January

For full cron syntax reference see the Oracle Cron Expressions documentation.

Notes​

  • Scheduled runs pass no startup parameters to the workflow. Use global variables or hardcoded values if the workflow needs configuration at runtime.
  • The next scheduled run time is pre-computed and queued via Azure Service Bus when you save the schedule. If the schedule is changed, the next queued run is replaced.
  • Scheduled runs execute as the user who saved the schedule last; saving a schedule someone else set up takes it over. Anyone with View access to the workflow can change its schedule. See Permissions and Run Identity.
  • To pause a schedule without deleting it, check the Disabled box and save.

Blob Storage Trigger​

The Blob Storage Trigger tab fires the workflow automatically when a file arrives in a Una-managed Azure Blob Storage container.

How it works​

Una monitors the etlstorage storage account. When a new blob is written to the configured container, the workflow is started automatically.

By default, triggers will only work on the etlstorage storage account.

Setting up a blob trigger​

  1. Open the Schedule tab and switch to the Blob Storage Trigger tab.
  2. Select the Blob Container Name from the dropdown. The list shows containers from Azure Blob Storage data sources that have been configured in the system.
  3. Make sure Disabled is unchecked.
  4. Click Save.

Accessing the file in the workflow​

The blob trigger starts the workflow with no startup parameters — the filename and container are not automatically passed to the workflow context. To work with the file that triggered the run, use a Remote Data Load activity or access the file directly via a path you know from the container configuration.


Database Trigger​

The Database Trigger tab generates a unique trigger code (a GUID) that allows a SQL stored procedure to start the workflow from within a SQL Server trigger, job, or procedure.

How it works​

  1. Una generates a unique trigger code for the workflow.
  2. You copy the generated T-SQL snippet and paste it into your SQL trigger or procedure.
  3. When that SQL code executes, it calls [dbo].[App_TriggerWorkflow] with the trigger code, which starts the workflow.

Setting up a database trigger​

  1. Open the Schedule tab and switch to the Database Trigger tab.
  2. Click Create Trigger. Una generates a unique trigger code and displays the ready-to-use SQL snippet:
    EXECUTE [dbo].[App_TriggerWorkflow] '<trigger-code>' -- Trigger /your/workflow workflow
  3. Click the copy button to copy the snippet to the clipboard.
  4. Paste it into the SQL trigger, stored procedure, or SQL Agent job step that should start the workflow.

Rotating or removing a trigger​

  • Delete removes the trigger code. Any SQL code referencing the old code will stop working.
  • Clicking Create Trigger again after deleting generates a new code.

Notes​

  • The database trigger starts the workflow with no startup parameters. If you need to pass context (e.g. the row ID that triggered the SQL event), set a global variable or use a staging table that the workflow reads at startup.
  • Each workflow can have one database trigger code at a time.
  • Deleting a trigger code immediately disables it — no restart or deploy is needed.

Manual Runs​

Click Run in the workflow editor to start the workflow immediately. You will be prompted for:

  • Instance name — the label shown in the run history dropdown
  • Stop running instances — whether to abort any currently running instance of this workflow before starting the new one

Startup parameters defined on the workflow (via the Parameters tab) are shown as input fields in the run dialog.

Anyone with View access to the workflow can run it. The run executes with their permissions, except for relational tasks when the workflow has Run relational tasks as owner set; see Permissions and Run Identity.