Free cookie consent management tool by TermsFeed

a!urlfortask() Function

On This Page

This function returns the URL of a process task given the task ID. The a!urlfortask() function automatically identifies whether each task runs in a standard or autoscaled process.

See also: Process Task Link: Use this component in a link field to create a link to a process task.

Parameters

a!urlfortask( taskIds, returnTaskPathOnly )

Keyword Type Description

taskIds

List of Number (Integer)

Task IDs of process tasks to generate links.

returnTaskPathOnly

Boolean

If true, only the last path segment to the task is included; if false, the full URL of the task is returned. Default: false

Returns

Text Array

Using the function

The following considerations apply when using the a!urlfortask() function.

Using the taskIds parameter

The taskIds parameter is required. The a!urlfortask() function automatically identifies the process engine for each task ID. Existing expressions that use standard process-engine task IDs remain compatible.

If no task exists with a provided ID, the function still returns a URL.

Generating task URLs and paths

If returnTaskPathOnly is false, the function returns the full Tempo URL for each task. Autoscaled tasks do not appear in the Tempo Tasks list, but users can open them from direct Tempo task URLs.

If returnTaskPathOnly is true, the function returns only the task path after /task. To create a URL to a Site, append the returned path to the Site URL using this format: <base_url>/suite/sites/<site_name>/task/<task_path>.

Opening a task securely

If a user does not have viewer rights to the task in the returned URL, the user sees an error when opening the URL.

Autoscaled process models and application performance

Using this function in a process model with autoscale enabled may result in degraded site or application performance. It should be used with caution and tested thoroughly before deploying it for real-world use. When the application is in production, use the Autoscaled Process Activity tab to monitor how the process performs at scale.

Examples

The following examples demonstrate how to use the a!urlfortask() function in an expression rule.

To experiment with examples, copy and paste the expression into an expression rule.

Return a URL for one task

1
a!urlfortask(taskIds: 123456, returnTaskPathOnly: false)

Returns "https://tasks.appian.com/suite/tasks/task/WrxYT3TYySQZTUwm".

Return URLs for multiple tasks

1
a!urlfortask(taskIds: {123456, 654321}, returnTaskPathOnly: false)

Returns {"https://tasks.appian.com/suite/tasks/task/WrxYT3TYySQZTUwm", "https://tasks.appian.com/suite/tasks/task/BU8YV4nEFVwMuc3U"}.

Return only the task path

1
a!urlfortask(taskIds: {12345, 54321}, returnTaskPathOnly: true)

Returns "WrxYT3TYySQZTUwm".

Feature compatibility

The table below lists this function's compatibility with various features in Appian.
Feature Compatibility Note
Portals Partially compatible

Can be used with Appian Portals if it is connected using an integration and web API.

Offline Interfaces Partially compatible

Can be used with offline interfaces if loaded at the top of the interface.

Sync-Time Custom Record Fields Incompatible
Real-Time Custom Record Fields Incompatible

Custom record fields that evaluate in real time must be configured using one or more Custom Field functions.

Process Reports Incompatible

Cannot be used to configure a process report.

Process Events Partially compatible

If autoscale is enabled, can be used to configure a supported process event node (such as a start event or timer event).

Process Autoscaling Compatible

Can be used in autoscaled processes.

Event Consumer Filter Conditions Incompatible

Cannot be used in filter conditions.

Event Consumer Event Handlers Incompatible

Cannot be used in event handler expressions.

Feedback