# Unable to add Custom Object Type using setCustomPostVariableTypes

**URL:** <https://forum.flowable.org/t/unable-to-add-custom-object-type-using-setcustompostvariabletypes/8611>\
**Category:** Flowable Engine\
**Created:** [November 7, 2021, 4:04am UTC](https://forum.flowable.org/t/unable-to-add-custom-object-type-using-setcustompostvariabletypes/8611 "2021-11-07T04:04:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aashi](https://avatars.discourse-cdn.com/v4/letter/a/da6949/32.png) [@aashi](https://forum.flowable.org/u/aashi)\
**Post date:** [November 7, 2021, 4:04am UTC](https://forum.flowable.org/t/unable-to-add-custom-object-type-using-setcustompostvariabletypes/8611/1 "2021-11-07T04:04:14Z")

</div>

Hello,

[Reference Code](https://github.com/omidashouri/flowable-engine/blob/ddd783175c2a4af1dc8c3f9df66ee3ba8f2eee42/modules/flowable-spring-boot/flowable-spring-boot-samples/flowable-spring-boot-sample-starter/src/test/java/flowable/CustomVariableTypesTestConfiguration.java)

I want to store object of this class in flowable context,

```auto
public class DeployerClientConfiguration extends SerializableType {

    public static final String TYPE_NAME = "deployerClientConfigurationDetails";

    private String uaaUrl;
    private String clientId;
    private String clientSecret;

    @Override
    public String getTypeName() {
        return TYPE_NAME;
    }
 }

```

And this is how I’m adding the custom variable type,

```auto
@Bean
    public EngineConfigurationConfigurer<SpringProcessEngineConfiguration> configurer() {
        return engineConfiguration -> {
            engineConfiguration.setCustomPostVariableTypes(Arrays.asList(new DeployerClientConfiguration()));
        };
    }

```

And through DelegateExcution I’m setting the variable,  
`execution.setVariable(moduleName, deployerClientConfiguration);`

And I still get the same error,  
`"couldn't find a variable type that is able to serialize DeployerClientConfiguration"`

Any suggestions?

Regards,  
aashi

---

<div class="post-metadata">

**Author:** ![joram](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/joram/32/26_2.png) [@joram](https://forum.flowable.org/u/joram)\
**Post date:** [November 10, 2021, 11:12am UTC](https://forum.flowable.org/t/unable-to-add-custom-object-type-using-setcustompostvariabletypes/8611/2 "2021-11-10T11:12:10Z")

</div>

You’re extending SerializableType, which still has following implementation: [flowable-engine/SerializableType.java at main · flowable/flowable-engine · GitHub](https://github.com/flowable/flowable-engine/blob/main/modules/flowable-variable-service/src/main/java/org/flowable/variable/service/impl/types/SerializableType.java#L190)

You will need to override the isAbleToStore method to do what you want.
