Github user dankilman commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/18#discussion_r87365792
  
    --- Diff: aria/workflows/core/engine.py ---
    @@ -57,11 +57,28 @@ def execute(self):
                         break
                     else:
                         time.sleep(0.1)
    -            events.on_success_workflow_signal.send(self._workflow_context)
    +            if self._is_cancelling():
    +                
events.on_cancel_workflow_signal.send(self._workflow_context)
    +            else:
    +                
events.on_success_workflow_signal.send(self._workflow_context)
             except BaseException as e:
                 events.on_failure_workflow_signal.send(self._workflow_context, 
exception=e)
                 raise
     
    +    def cancel_request(self):
    +        """
    +        Send a cancel request to the engine. If execution already started, 
execution status
    +        will be modified to 'cancelling' status. If execution is in 
pending mode, execution status
    +        will be modified to 'cancelled' directly. If execution is in one 
if its ended state, an
    +        AriaEngineError will be raised
    +        """
    +        if self._workflow_context.execution.status not in 
models.Execution.ACTIVE_STATES:
    --- End diff --
    
    remove? storage should take care of it? check!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to