How I can capture the action button

Hi, Guys

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?

Thank You

0 votes

2 answers

1152 views

ANSWER



I created a EventHandler with

0 votes



Hi,

You can listen to events from org.nuxeo.ecm.platform.task.TaskEventNames

  • Reject: workflowTaskRejected
  • Accept: workflowTaskCompleted

to do the difference

0 votes



Thanks for the reply,

I need a listener (XML) specific for org.nuxeo.ecm.platform.task.TaskEventNames?

Example:

<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

04/23/2014

You have all the documentations about event and listener here: http://doc.nuxeo.com/display/public/NXDOC/Events+and+Listeners

And don't hesitate to use Nuxeo IDE, which offers wizards to generate actions, listeners, operations… on the fly:)

http://doc.nuxeo.com/display/IDEDOC/Installing+Nuxeo+IDE

04/23/2014