Convert the type of an Activity programmatically

Hey,
I would like to convert programmatically the type of a task.
For instance:

image

In this case I would like to convert a service task to user task.
I could preparse the bpmn file and convert this manually but I was wondering if there is a way to do this passing through the camunda api.

Do you have any ideas?

ps: Let me know if the category of the post is wrong. In case, I will change it.

@rikirenz, can you please explain your use case in a bit more detail? Do you want to change the design of your process at runtime?

Cheers,
Mat

Yes, I would like to change the design of my process at runtime. Is this possible?