Buongiorno a tutti,
ho agganciato con successo shark al cmdbuild 2.2.2 e riesco a far girare i workflow creati con il TWE.
Sto avendo problemi nel definire un'attività "script" che invii una semplice email di test.
La "activity" di tipo "task script" utilizza questo codice:
cmdb.newMail()
.withFrom(maskedpenguin@mydomain.com")
.withTo(myrecipient@mydomain.com")
.withSubject("TEST1")
.withContent("Mail content TEST1")
.send();
Sul log cmdbuild.log ho queste (ultime) righe al verificarsi dell'errore al passo in cui il flow dovrebbe inviare la mail.
INFO 2014-12-16 17:18:12 [cmdbuild] trying to login user workflow with group null
INFO 2014-12-16 17:18:12 [workflow] pushing event 'WorkflowEvent[type=UPDATE,processDefinitionId=Process_test2,processInstanceId=207_Package_test2_Process_test2]' for session '75'
WARN 2014-12-16 17:18:13 [sql ] cannot get content of column 'test2#FlowStatus#Description'
WARN 2014-12-16 17:18:13 [sql ] cannot get content of column 'test2#FlowStatus#Description'
INFO 2014-12-16 17:18:13 [workflow] updating activity instance '19_207_Package_test2_Process_test2_UpdOS' for process 'test2'
WARN 2014-12-16 17:18:13 [sql ] cannot get content of column 'test2#FlowStatus#Description'
INFO 2014-12-16 17:18:13 [workflow] advancing activity instance '19_207_Package_test2_Process_test2_UpdOS' for process 'test2'
INFO 2014-12-16 17:18:13 [cmdbuild] trying to login user workflow with group null
INFO 2014-12-16 17:18:13 [workflow] pushing event 'WorkflowEvent[type=UPDATE,processDefinitionId=Process_test2,processInstanceId=207_Package_test2_Process_test2]' for session '79'
ERROR 2014-12-16 17:18:14 [jsonrpc ] A org.cmdbuild.workflow.CMWorkflowException occurred calling method class org.cmdbuild.servlets.json.Workflow.saveActivity: org.enhydra.shark.api.internal.toolagent.ToolAgentGeneralException: Sourced file: eval stream : Method Invocation send
A prima vista sembra che il problema sia nell'invocazione del metodo "send" sull'oggetto MAIL creato nel workflow, ma non saprei cercare ulteriormente in quanto a pag 66 del manuale in inglese del workflow è presente un estratto di codice praticamente identico.
Grazie a tutti in anticipo, saluti,
g.caglio