How I can capture the action button
I created a EventListener to capture the attributes of a task when submitted, I managed to capture when the document type is equals DocumentRoute Example:
Serializable sml = doc.getPropertyValue(“var_ReportCreatedWorkflow:reports”);
Serializable sml1 = doc.getPropertyValue(“var_ReportCreatedWorkflow:mission_comment”);
How I can capture the action button? , I need to check if was clicked Done or Reject. What the attribute can I use to capture this action?
You can listen to events from org.nuxeo.ecm.platform.task.TaskEventNames
- Reject: workflowTaskRejected
- Accept: workflowTaskCompleted
to do the difference
I need a listener (XML) specific for org.nuxeo.ecm.platform.task.TaskEventNames?
<extension target = "org.nuxeo.ecm.platform.task.TaskEventNames" point = "listener">
<listener name = "validateFilds" async = "false" postCommit = "false" class = "org.br.ezute.event.DocumentValidationFilds" order = "10"> <event> workflowTaskCompleted </ event> </ listener> </ extension>
workflowTaskCompleteds would be the event? Would have some sample document to introduce myself?
Thanks for the support
And don't hesitate to use Nuxeo IDE, which offers wizards to generate actions, listeners, operations… on the fly:)