Camunda Tasklist API now includes a powerful new filter that allows users to filter tasks based on variables. This means that instead of just filtering tasks based on their state, assignee, or other basic attributes, you can now also filter them based on specific variables associated with those tasks.
The new taskVariables
attribute in the request schema is an array of TaskVariables
objects. Each TaskVariables
object consists of:
- name: The name of the variable.
- value: The value of the variable.
- operator: The operator used to compare the variable’s value.
This new feature enhances the flexibility and precision of task filtering, enabling users to retrieve tasks that meet very specific criteria.
Why Filter Tasks by Variables?
In the evolving landscape of task management and business process automation, the ability to filter tasks by variables stands out as a transformative feature. Variables, in essence, capture the diverse attributes and nuances of tasks, making them pivotal in tailoring task management to specific needs. The Camunda Tasklist API’s introduction of this feature is not just an incremental improvement; it’s a leap towards a more adaptive, precise, and insightful task management experience. Let’s delve into the myriad advantages this feature brings:
- Dynamic task management: With variable-based filtering, tasks can be dynamically categorized and retrieved based on changing criteria. For instance, if a variable represents a “priority level,” tasks can be quickly filtered to address high-priority items first.
- Enhanced reporting: By filtering tasks based on specific variables, managers and teams can generate more detailed and targeted reports. For example, you could generate a report of all tasks related to a specific client or project phase.
- Personalized user views: Different team members can set up personalized views of their tasklist based on variables relevant to their role. A developer might filter tasks by “feature” or “bug,” while a salesperson might filter by “client name” or “region.”
- Better audit and compliance: For businesses that need to adhere to regulatory standards, filtering tasks by variables like “compliance check” or “audit status” can help ensure that all necessary tasks are completed and documented.
- Flexible Integration with Other Systems: If Camunda is integrated with other systems (like CRM or ERP), variable-based filtering can help synchronize and manage tasks more effectively across platforms. For instance, tasks related to a specific order ID or customer account can be easily retrieved.
Use Case: Filtering Tasks for a Product Launch
Scenario: Imagine you’re a product manager at a tech company, and you’re using Camunda to manage tasks related to different product launches. Each task in the Tasklist has a variable named product_name
that indicates which product the task is associated with. You also have a variable named launch_date
that indicates the launch date of the product.
Now, you want to retrieve all tasks related to the product named “TechGadget 2023” that are scheduled to launch in “April 2023”.
Using the new filter
To achieve this, you would use the new taskVariables
filter in the following way:
{
"taskVariables": [
{
"name": "product_name",
"value": "”/TechGadget 2023”/",
"operator": "eq"
},
{
"name": "launch_date",
"value": "/”April 2023”/",
"operator": "eq"
}
]
}
In the above request:
- We’re filtering all created tasks as well as the completed ones.
- We’re using the
taskVariables
filter to specify that we want tasks where theproduct_name
is “TechGadget 2023” and thelaunch_date
is “April 2023”.
This precise filtering ensures that you get exactly the tasks you’re interested in, without having to sift through unrelated tasks.
Conclusion
The addition of the filter tasks by variables in the Camunda Tasklist API is a game-changer. It provides users with the ability to filter tasks based on specific variables, offering a level of precision and flexibility that wasn’t possible before. Whether you’re managing product launches, coordinating events, or handling any other tasks with specific variables, this new feature will undoubtedly enhance your task management experience.
If you want to discover more about this new resource, which was first introduced in the version 8.3.0-alpha6, check out the documentation here.
Start the discussion at forum.camunda.io