How to change one assignee to another assignee

Hi Team, how would do we have to achive the one assignee /candidate group name to other @ runtime in java can any one share the code-snippet for the same it will be helful. Thank you advance.

Are you looking to do this using the task service:
taskService.setAssignee(taskId, userId)

Thank you, i have tried both setAssignee and change candidate group approch both not worked me, and still tasks with first assignee itself only not new assignee so i am new to this flowable plz help me out

Yes by using taskservice only i am trying

Please share the java code that you are trying.

Hi tjmac, nowi am able to change the assign using task service setAssigne but this is in memory if i restart server again i have call setAssignee so to avoid this do we have any option to save permanantly ? If so how can we achive?

Are you wanting a H2 persistant DB?

This may help:

You can try this: runtimeService.setVariable(instanceId,variableName,value)