| Quintiq file version 2.0 | 
| #parent: #root | 
| Method CanProcessStep ( | 
|   output String feedback_o, | 
|   const SWF_Step step, | 
|   String action | 
| ) const declarative remote as Boolean | 
| { | 
|   Description: 'Indicate if this user can process the [action] for the given [step].' | 
|   TextBody: | 
|   [* | 
|     result := true; | 
|      | 
|     if( not this.IsAdministrator() | 
|         and step.AssignedUser() <> this ) | 
|     { | 
|       result := false; | 
|       feedback_o := SWF_Translation::TRANSLATE_Auth_UnauthorizeAction(); | 
|     } | 
|     else if( action = SWF_Step::ACTION_SetToComplete() | 
|              and step.IsCompleted() ) | 
|     { | 
|       result := false; | 
|       feedback_o := SWF_Translation::TRANSLATE_StepsAlreadyCompleted(); | 
|     } | 
|     else if( action = SWF_Step::ACTION_SetToIncomplete()  | 
|              and step.CanSetIncomplete() ) | 
|     { | 
|       result := false; | 
|       feedback_o := SWF_Translation::TRANSLATE_StepMustManualCompleteBeforeSetToIncomplete(); | 
|     }  | 
|     else if( action = SWF_Step::ACTION_OverrideDueDate() | 
|              and step.IsCompleted() ) | 
|     { | 
|       result := false; | 
|       feedback_o := SWF_Translation::TRANSLATE_StepsAlreadyCompleted(); | 
|     } | 
|      | 
|     return result; | 
|   *] | 
| } |