Spin Deserialize Json and Enums

I have this code for the enum on the model:

public enum StatusEnum {
	GOODSTANDING("Goodstanding/Inforce"),

	GRACE("Grace"),

	LAPSE("Lapse");

	private String value;

	StatusEnum(String value) {
		this.value = value;
	}

	@Override
	public String toString() {
		return String.valueOf(value);
	}

	@JsonCreator
	public static StatusEnum getEnum(String valor) {
		return StatusEnum.GOODSTANDING.toString().equals(valor) ? StatusEnum.GOODSTANDING
				: (StatusEnum.GRACE.toString().equals(valor) ? StatusEnum.GRACE
						: (StatusEnum.GRACE.toString().equals(valor) ? StatusEnum.GRACE : StatusEnum.LAPSE));
	}

	public String toValue() {
		return StatusEnum.GOODSTANDING.toString().equals(this.value) ? StatusEnum.GOODSTANDING.toString()
				: (StatusEnum.GRACE.toString().equals(this.value) ? StatusEnum.GRACE.toString()
						: StatusEnum.LAPSE.toString());
	}
}

I can successfully run a test to parse the string like this:

	ObjectMapper mapper = new ObjectMapper();
	PolicyPremium.StatusEnum s1 = mapper.readValue("\"Goodstanding/Inforce\"", PolicyPremium.StatusEnum.class);
	System.out.println(s1);		

So I know is working fine outside of the engine with this error:

Caused by: spinjar.com.fasterxml.jackson.databind.exc.InvalidFormatException: Can not construct instance of com.northstar.slxclient.client.model.PolicyPremium$StatusEnum from String value 'Goodstanding/Inforce': value not one of declared Enum instance names: [GRACE, GOODSTANDING, LAPSE]
 at [Source: N/A; line: -1, column: -1] (through reference chain: java.util.ArrayList[0]->com.northstar.slxclient.client.model.Policy["currentPremium"]->com.northstar.slxclient.client.model.PolicyPremium["status"])

Hi,

In which environment are you executing the code (shared engine and application server; embedded engine)? Which Spin libraries are available there, camunda-spin-dataformat-all or camunda-spin-dataformat-json-jackson? In case of the former, this contains Jackson in a relocated package namespace (see also http://stage.docs.camunda.org/manual/develop/user-guide/data-formats/configuring-spin-integration/#maven-coordinates), so it won’t pick up any regular Jackson annotations of your custom classes. You should switch to camunda-spin-dataformat-json-jackson in this case.

Cheers,
Thorben

Yes. The solution was to use the separate packages (camunda-spin-dataformat-json and add the same version of the jackson libraries in all projects and in the lib folder.