> For the complete documentation index, see [llms.txt](https://developer.collibra.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.collibra.com/workflows/designing-workflows/processes/shape-repository/service-task/delegates.md).

# Delegates

A delegate is a standalone class that executes some logic.

[Data Product delegates](/workflows/designing-workflows/processes/shape-repository/service-task/delegates/data-product-delegates.md) are available in the **com.collibra.dataproduct.workflow\.delegate** package. They wrap the **multipart/form-data** endpoints of the Data Contract API that the **Collibra API task** cannot call directly.

API v2 delegates belong to the **com.collibra.dgc.workflow\.api.delegate** Java Workflow API package.

All API v1 delegates are available in the **com.collibra.dgc.core.workflow\.activiti.delegate** Java Core API package.

{% hint style="danger" %}
Most delegates belong to the deprecated Java Core API v1 and will not be available in the next major release. Use script tasks to replace the functionality of v1 delegates. See [Alternatives to API v1 delegates](/workflows/designing-workflows/processes/shape-repository/service-task/delegates/alternatives-to-api-v1-delegates.md) for examples.
{% endhint %}

A delegate is always configured using a service task. All delegates accept expressions for input parameters.

## Example of a deprecated delegate

![](/files/K5zXD15sYaq5VA2MArz3)

This example shows the use of the **changeStatusDelegate** delegate. The **Result** variable field is not used when using a delegate, but the **Fields** field is. It injects the provided values into the delegate which uses them to perform some action. The **changeStatusDelegate** delegate changes the state of the resource to the status with the given id, **Under Review**, in this example.

* **Field name**: The name of the delegate field you want to inject a value to.
* **String value**: The fixed string value to inject in the field.
* **Expression**: An expression that is evaluated before the result is set as value in the field. For more information, see the expressions section.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.collibra.com/workflows/designing-workflows/processes/shape-repository/service-task/delegates.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
