Java Engine API Error - LocalDate serialization

1
0
-1

Hi guys,

As my colleague said (in french here ), we have an unexpected behavior with the Java API for Bonita 7.5.

When trying to start a new process with a LocalDate in the contract, we have the following error :
Error while validating expected inputs: [java.time.Ser@271a6dc7 cannot be assigned to LOCALDATE]

I created a new Definition process, taking only 'myDate' LOCALDATE in the initialization contract

Then I execute this simple Java code :

  1. @Test
  2. public void startSimpleProcessWithContract() {
  3. try {
  4. final Map<String, Serializable> propositionsInput = new HashMap<>();
  5. propositionsInput.put("myDate", LocalDate.of(2017, 4, 12));
  6.  
  7. app.startProcessWithContractInput(app.getProcessLastVersionId("POC_InitDate"),propositionsInput );
  8. } catch (Exception e) {
  9. Assert.fail(e.getMessage());
  10. }
  11.  
  12. }
  13.  
  14. public static void startProcessWithContractInput(Long processId, Map<String, Serializable> instantiationInputs ) throws Exception {
  15. logger.debug("Entree dans la methode startProcessWithoutValues [id=" + processId + "].");
  16. ProcessInstance processInstance = null;
  17. try {
  18. processInstance = processAPI.startProcessWithInputs(processId, instantiationInputs);
  19. logger.debug("Instance démarrée : " + processInstance.getId());
  20. } catch (Exception e) {
  21. String errorMessage = "Erreur lors du démarrage du process" + e.getMessage();
  22. logger.error(errorMessage, e);
  23. throw e;
  24. }
  25. }

My code is executed in Eclipse, with a maven-compiler-plugin set to 1.8 (JDK 8)
I wonder if it is a product's bug or if we did something wrong.

Any idea ?
Thanks

No answers yet.
Notifications