--- title: "Workflow.Task" slug: "workflowtask" tags: ["luminesce ", "provider", "workflow service", "task"] updated: 2024-08-21T13:30:34Z published: 2024-08-21T13:30:34Z canonical: "support.lusid.com/workflowtask" --- > ## Documentation Index > Fetch the complete documentation index at: https://support.lusid.com/llms.txt > Use this file to discover all available pages before exploring further. # Workflow.Task | **Type** | **Read/write** | **Author** | **Availability** | | --- | --- | --- | --- | | [Data provider](/v1/docs/what-are-a-data-provider-and-a-direct-provider) | Read | FINBOURNE | Provided with LUSID | Providing you have sufficient [access control permissions](/v1/docs/creating-policies-to-control-access-to-providers-for-different-luminesce-end-users), the `Workflow.Task` provider enables you to write a [Luminesce SQL query](/v1/docs/understanding-the-luminesce-sql-query-syntax) that retrieves [tasks](/v1/docs/how-do-i-create-a-task) from the Workflow Service. **See also**: [Workflow.Task.Writer](/v1/docs/workflowtaskwriter), [Workflow.Task.Field](/v1/docs/workflowtaskfield), [Workflow.TaskDefinition](/v1/docs/workflowtaskdefinition) ## Basic usage ```sql select * from Workflow.Task where ``` ## Query parameters `Workflow.Task` has parameters that enable you to filter or refine a query. To list available parameters, their data types, default values, and an explanation for each, run the following query using a [suitable tool](/v1/docs/what-tools-are-available-to-write-luminesce-queries): ```sql select FieldName, DataType, ParamDefaultValue, Description from Sys.Field where TableName = 'Workflow.Task' and FieldType = 'Parameter'; ``` ## Data fields By default, `Workflow.Task` returns a table of data populated with particular fields (columns). You can return a subset of these fields. To list fields available to return, their data types, whether fields are considered 'main', and an explanation for each, run the following query using a [suitable tool](/v1/docs/what-tools-are-available-to-write-luminesce-queries): ```sql select FieldName, DataType, IsMain, IsPrimaryKey, SampleValues, Description from Sys.Field where TableName = 'Workflow.Task' and FieldType = 'Column'; ``` > **Note:** Fields marked 'main' are returned by queries that select a caret character, for example `select ^ from Workflow.Task`. ## Examples > **Note:** For more example Luminesce SQL queries, visit our [Github repo](https://github.com/finbourne/luminesce-examples/tree/master/examples). ### Example 1: Retrieve first 10 tasks ```sql select * from Workflow.Task limit 10; ``` ### Example 2: Retrieve the current state of a particular task ```sql select State from Workflow.Task where Id = '22ffcc7c-3ab6-48cd-9c31-1c702b04a95e'; ``` ### Example 3: Retrieve all child tasks for a particular parent task ```sql select * from Workflow.Task where ParentId = '22ffcc7c-3ab6-48cd-9c31-1c702b04a95e' or UltimateParentId = '22ffcc7c-3ab6-48cd-9c31-1c702b04a95e'; ```