Background Workflow represents tasks should be executed in background to post quick changes or update glance without any user involvement. Example of Background workflows can be:

Background Workflow must not require any input from the user. So it allows to have only subset of tasks, which doesn't show any UI. Though, some tasks, that usually show UI, were modified to be silent when launched from Background Workflow. For example, a "Show Message" task will log a message instead of showing alert. The "New Task Chooser" was modified to show only allowed tasks, when maintaining a Background Workflow.

A new "Toggle Background Workflow" task allows to enable/disable Background Workflow and optionally allows to force it to run immediately. This task is very useful to toggle Background Workflows only when certain criteria are meet - for example after Installation Workflow completes.

The following are Background Workflow options (accessible via the button in Workflow Editor):

The following are running schedule of a Background Workflow according to its Priority:

It is important to carefully design Background Workflows to let them complete as quickly as possible. Avoid doing long running tasks like big data uploads - reserve them to the Main Workflow. Alloy app will prompt to terminate long running Background Workflows after some timeout but you can let them keep running if desired. Though Alloy Widget will try to terminate such Workflows automatically without any prompt.

It is possible to toggle all background actions via the iOS "Settings | Alloy | Enable Background Actions" option. This option can be useful to avoid running of problematic actions to allow troubleshooting of them.

Note, due to luck of suitable background mode in iOS, Background Workflows run only when Alloy app or Widget are active.

Note: access to resources required by a Background Workflow's tasks should be granted before such Background Workflow runs in Widget. It can be done either when the Background Workflow runs in the app or it can be done manually via the Edit Action | Privacy.


See also:
Maintaining Workflows
Tasks and Workflows
Actions

Next > Clear Glance Workflow