| Quintiq file version 2.0 | 
| #parent: #root | 
| Response OnClick ( | 
|   SWF_ActivityBase selection | 
| ) id:Response_ListActivities_OnClick | 
| { | 
|   #keys: '[136682.0.1188077392]' | 
|   CanBindMultiple: false | 
|   DefinitionID: 'Responsedef_WebList_OnClick' | 
|   GroupServerCalls: true | 
|   QuillAction | 
|   { | 
|     Body: | 
|     [* | 
|       // this will only set change the activity status from IsNew to false | 
|       isClickCheckbox := false; | 
|       transactionManager := SWF_WorkflowDataset.Service(); | 
|        | 
|       if( selection.IsExternal() ) | 
|       { | 
|         transactionManager.TR_UpdateActivityExternalStatus( selection.ID(),  | 
|                                                             selection.IsExecutable(),  | 
|                                                             ifexpr( isClickCheckbox, not selection.IsCompleted(), selection.IsCompleted() ),  | 
|                                                             SWF_WorkflowDataset.GetCurrentUserID(),  | 
|                                                             true /* isRequireIOSync */ ); | 
|       } | 
|       else | 
|       { | 
|         transactionManager.TR_UpdateActivityStatus( selection.ID(),  | 
|                                                     ifexpr( isClickCheckbox, not selection.IsCompleted(), selection.IsCompleted() ),  | 
|                                                     SWF_WorkflowDataset.GetCurrentUserID() ); | 
|       } | 
|     *] | 
|   } | 
| } |