Skip to main content
1-Visitor
March 30, 2016
Solved

I can't add a listener of WorkItem objects

  • March 30, 2016
  • 1 reply
  • 2054 views

截图02.png

this's my codes, and i can't catch the event target of workitem.

can you help me ,thank you!

Best answer by BineshKumar1

Try this

if((event.getEventType( ).equals( PersistenceManagerEvent.INSERT )) && ( target instanceof WorkItemLink))

Thanks

Binesh Kumar

1 reply

1-Visitor
March 30, 2016

Try this

if((event.getEventType( ).equals( PersistenceManagerEvent.INSERT )) && ( target instanceof WorkItemLink))

Thanks

Binesh Kumar

è吕1-VisitorAuthor
1-Visitor
March 30, 2016

thanks for your answer,and how can i get WorkItem with WorkItemLink ?

1-Visitor
March 30, 2016

WorkItemLink workitemlink = (WorkItemLink) target;

WorkItem workitem = workitemlink.getWorkItem();