Buongiorno a tutti,
configurazione attuale: cmdbuild 2.5.1,TWE 4.4.1
ho un problema nella creazione di NewCard e CreateReport da WorkFlow con i modificatori with(String name, Object value)
Codice funzionante:
cdNuovaFattura = cmdb.newCard("Fattura")
.withDescription(Anno)
.withAttribute("NumeroFattura",NrFattura)
.withAttribute("dataFattura",del)
.withAttribute("Cliente",Cliente)
.withAttribute("PeriododiFatturazione",PeriodoDiFatturazione)
.create();
ma se utilizzo:
cdNuovaFattura = cmdb.newCard("Fattura")
.withDescription(Anno)
.with("NumeroFattura",NrFattura)
.withAttribute("dataFattura",del)
.withAttribute("Cliente",Cliente)
.withAttribute("PeriododiFatturazione",PeriodoDiFatturazione)
.create();
Ho il seguente errore da Shark.log:
2018-07-16 15:23:28,947: Activity[Process Id=730_Package_fattura_Process_fattura, Id=805_730_Package_fattura_Process_fattura_CreoCard, ba=null, ActDefId=CreoCard] - failed to execute script [type=text/javascript,value=cdNuovaFattura = cmdb.newCard("Fattura")
.withDescription(Anno)
.with("NumeroFattura",NrFattura)
.withAttribute("dataFattura",del)
.withAttribute("Cliente",Cliente)
.withAttribute("PeriododiFatturazione",PeriodoDiFatturazione)
.create();]: org.enhydra.shark.api.internal.toolagent.ToolAgentGeneralException: missing name after . operator (<script>#3)
2018-07-16 15:23:28,947: activity 'CreoCard' closed
L'errore è da imputare all'utilizzo del modificatore with(String name, Object value) che ho utilizzato come descritto a pagina 46 del WorkFlow Manual 2.5.
Ho aggirato il problema utilizzando withAttribute al posto di with, solo che ora mi si ripresenta nella creazione di Report, sempre da workflow dove purtroppo non ho altri modificatori da poter utilizzare, pag 55 dello stesso manuale.
Se a qualcuno è già successo, vorrei sapere come risolvere, grazie a tutti.
Marco Marconi