@@ -66,7 +66,11 @@ public EventVO interceptStart(AnnotatedElement element) {
6666 long userId = ctx .getCallerUserId ();
6767 long accountId = ctx .getAccountId ();
6868 long startEventId = ctx .getStartEventId ();
69- EventUtils .saveStartedEvent (userId , accountId , actionEvent .eventType (), actionEvent .eventDescription (), startEventId );
69+ String eventDescription = actionEvent .eventDescription ();
70+ if (ctx .getEventDetails () != null ){
71+ eventDescription += ". " +ctx .getEventDetails ();
72+ }
73+ EventUtils .saveStartedEvent (userId , accountId , actionEvent .eventType (), eventDescription , startEventId );
7074 }
7175 }
7276 return event ;
@@ -81,12 +85,16 @@ public void interceptComplete(AnnotatedElement element, EventVO event) {
8185 long userId = ctx .getCallerUserId ();
8286 long accountId = ctx .getAccountId ();
8387 long startEventId = ctx .getStartEventId ();
88+ String eventDescription = actionEvent .eventDescription ();
89+ if (ctx .getEventDetails () != null ){
90+ eventDescription += ". " +ctx .getEventDetails ();
91+ }
8492 if (actionEvent .create ()){
8593 //This start event has to be used for subsequent events of this action
86- startEventId = EventUtils .saveCreatedEvent (userId , accountId , EventVO .LEVEL_INFO , actionEvent .eventType (), "Successfully created entity for " +actionEvent . eventDescription () );
94+ startEventId = EventUtils .saveCreatedEvent (userId , accountId , EventVO .LEVEL_INFO , actionEvent .eventType (), "Successfully created entity for " +eventDescription );
8795 ctx .setStartEventId (startEventId );
8896 } else {
89- EventUtils .saveEvent (userId , accountId , EventVO .LEVEL_INFO , actionEvent .eventType (), "Successfully completed " +actionEvent . eventDescription () , startEventId );
97+ EventUtils .saveEvent (userId , accountId , EventVO .LEVEL_INFO , actionEvent .eventType (), "Successfully completed " +eventDescription , startEventId );
9098 }
9199 }
92100 }
@@ -100,11 +108,15 @@ public void interceptException(AnnotatedElement element, EventVO event) {
100108 long userId = ctx .getCallerUserId ();
101109 long accountId = ctx .getAccountId ();
102110 long startEventId = ctx .getStartEventId ();
111+ String eventDescription = actionEvent .eventDescription ();
112+ if (ctx .getEventDetails () != null ){
113+ eventDescription += ". " +ctx .getEventDetails ();
114+ }
103115 if (actionEvent .create ()){
104- long eventId = EventUtils .saveCreatedEvent (userId , accountId , EventVO .LEVEL_ERROR , actionEvent .eventType (), "Error while creating entity for " +actionEvent . eventDescription () );
116+ long eventId = EventUtils .saveCreatedEvent (userId , accountId , EventVO .LEVEL_ERROR , actionEvent .eventType (), "Error while creating entity for " +eventDescription );
105117 ctx .setStartEventId (eventId );
106118 } else {
107- EventUtils .saveEvent (userId , accountId , EventVO .LEVEL_ERROR , actionEvent .eventType (), "Error while " +actionEvent . eventDescription () , startEventId );
119+ EventUtils .saveEvent (userId , accountId , EventVO .LEVEL_ERROR , actionEvent .eventType (), "Error while " +eventDescription , startEventId );
108120 }
109121 }
110122 }
0 commit comments