Permalink
Browse files

Informer interaction : comment out query under review

  • Loading branch information...
1 parent e293767 commit cbccd77c0729dbf122348a4953c37534be193167 @sotty sotty committed Aug 8, 2012
@@ -78,31 +78,15 @@ query ticket( String $className, String $formId, InteractionTicket $ticket )
$ticket := InteractionTicket( id == $formId )
end
-
-query conversationAlerts( String $ticketId, String $actorId, List $formIds, List $bodies, List $channels )
- accumulate (
- Alert( $ticketId, $actorId, $formId, $body, $channel; ),
- $formIds : collectList( $formId ),
- $bodies : collectList( $body ),
- $channels : collectList( $channel )
- )
-end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ //TODO : Check that it works!
+//query conversationAlerts( String $ticketId, String $actorId, List $formIds, List $bodies, List $channels )
+// accumulate (
+// Alert( $ticketId, $actorId, $formId, $body, $channel; ),
+// $formIds : collectList( $formId ),
+// $bodies : collectList( $body ),
+// $channels : collectList( $channel )
+// )
+//end
rule "Open interaction"
salience 999
@@ -301,8 +285,9 @@ when
$task : InteractiveTask( $taskId : taskId, args contains $inter, state == TaskStates.READY )
$trig : String() from $trix
then
- System.out.println( "Creating questionnaire of type " + $trig );
- ISurveyable form = FormRegistry.create( $trig, java.util.UUID.randomUUID().toString() );
+ String newId = java.util.UUID.randomUUID().toString();
+ System.out.println( "Creating questionnaire of type " + $trig + " with id " + newId + " for/from itask " + $taskId );
+ ISurveyable form = FormRegistry.create( $trig, newId );
form.setStateful( true );
insert( form );
@@ -185,8 +185,13 @@ when
$inters : interactions,
$source : source )
$convo : TicketActor( $convoId, $ticketId, $actorId ; )
- conversationAlerts( $ticketId, $actorId, $formIds, $bodies, $channels ; )
- Integer( this > 0 ) from $channels.size()
+ accumulate (
+ Alert( $ticketId, $actorId, $formId, $body, $channel; ),
+ $formIds : collectList( $formId ),
+ $bodies : collectList( $body ),
+ $channels : collectList( $channel );
+ $channels.size() > 0
+ )
then
list.add( $actorId );
System.out.println( "@@@@@@@ DISPATCHING to " + $actorId );

0 comments on commit cbccd77

Please sign in to comment.