Create new variable type in flowable

I want to put a local variable to user task by ‘api /task/{taskId}/variables’ with person object.
A person has 3 properties (name, age, address).

I create a custom ProcessEngineConfigurator implement from EngineConfigurator.

@Override
public void configure(AbstractEngineConfiguration engineConfiguration) {
SpringProcessEngineConfiguration appEngineConfiguration = (SpringProcessEngineConfiguration) engineConfiguration;
appEngineConfiguration.getVariableTypes().addType(new PersonVariableType(appEngineConfiguration.getMaxLengthString(),appEngineConfiguration.getObjectMapper()));

        // Invoked after the initialisation of the engine. Think afterInit
    }

I debug and check method .getVariableTypes() have PersonVariableType (my variable).
But When I test with post variable into user task then got error as follow:
“exception”: “Variable ‘person’ has unsupported type: ‘person’.”

My question. How to add custom variable type into flowable for easy parser to another tasks?

We can add new Variable Type using internal activity.
example. I put it pre task and get it in next task. But can not got it from rest api.
How to add RestVariable for convert object when use spring api.

VariableTypes are shared between engines, so that code should work.

Do you mean you got it working?