# setWorkflowIsAssignable

Audience: Developer

Toggle the `pyck_workflow_is_assignable` search attribute on a running workflow execution.

Toggle the `pyck_workflow_is_assignable` search attribute on a running
workflow execution. The workflow must be running and must have been
registered with a `WorkflowIsAssignableSetter` handler via
`workflowsdk.SetupDefaults`; otherwise Temporal returns
"no update handler registered".

**Served by:** [workflow](https://docs.pyck.cloud/dev/api/services/workflow.md)

## Arguments

| Name | Type |
| --- | --- |
| `input` | [SetWorkflowIsAssignableInput](https://docs.pyck.cloud/dev/api/inputs/setworkflowisassignableinput.md)! |

## Returns

[SetWorkflowIsAssignableResponse](https://docs.pyck.cloud/dev/api/types/setworkflowisassignableresponse.md)

## Example

Toggles the assignability flag on a running workflow execution by sending a Temporal update. The value is persisted to the pyck_workflow_is_assignable search attribute, which controls whether the workflow appears in assignableWorkflowExecutions queries.

```graphql
mutation SetWorkflowIsAssignable($input: SetWorkflowIsAssignableInput!) {
  setWorkflowIsAssignable(input: $input) {
    isAssignable
  }
}
```

**Variables**

```json
{
  "input": {
    "isAssignable": false,
    "workflowExecutionID": "<run ID>",
    "workflowID": "<workflow execution ID>"
  }
}
```
