Free cookie consent management tool by TermsFeed numtasksforprocessmodelforstatus() Function
numtasksforprocessmodelforstatus() Function

Function

numtasksforprocessmodelforstatus( processModelId, status, includeSubProcessData )

Returns the number of tasks with the specified status in process instances of the process model.

Parameters

Keyword Type Description

processModelId

Integer

The Id number of the process model.

status

Text

The status of the tasks you want counted.

includeSubProcessData

Boolean

Controls whether data from subprocesses are included in the count.

Returns

Integer

Usage considerations

The status of each process instance is not considered.

The current user must hold at least viewer rights for the specified process model, in order to execute this function.

Deleted and archived process instances are not counted.

The following (case sensitive) values are available for the status parameter:

  • accepted
  • assigned
  • cancelled
  • completed
  • paused
  • problem ("problem" tasks are attended tasks that are canceled by exception)

If you do not provide a value for the includeSubProcessData parameter, the default value is taken from the current context or set to false if no subprocesses available.

For example, if the function is used on a Web Content with Process Details Channel and the channel's context includes subprocesses, these subprocesses are included by default.

Examples

You can copy and paste these examples into the Expression Rule Designer to see how this works.

numtasksforprocessmodelforstatus(processModelId,"completed",true) returns 112

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 Mobile Partially compatible

Can be used with offline mobile if it is loaded at the top of the form.

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 Incompatible

Cannot be used to configure a process event node, such as a start event or timer event.

numtasksforprocessmodelforstatus() Function

FEEDBACK