ariatosca-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mxmrlv <...@git.apache.org>
Subject [GitHub] incubator-ariatosca pull request #158: ARIA-236 Resumable workflow execution...
Date Wed, 21 Jun 2017 13:58:33 GMT
Github user mxmrlv commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/158#discussion_r123252017
  
    --- Diff: aria/orchestrator/workflow_runner.py ---
    @@ -57,26 +57,29 @@ def __init__(self, workflow_name, service_id, inputs,
     
             self._model_storage = model_storage
             self._resource_storage = resource_storage
    -        self._workflow_name = workflow_name
     
             # the IDs are stored rather than the models themselves, so this module could
be used
             # by several threads without raising errors on model objects shared between threads
    -        self._service_id = service_id
     
    -        self._validate_workflow_exists_for_service()
    -
    -        workflow_fn = self._get_workflow_fn()
    -
    -        execution = self._create_execution_model(inputs)
    -        self._execution_id = execution.id
    +        if workflow_name is not None and service_id is not None and execution_id is None:
    +            self._service_id = service_id
    +            self._workflow_name = workflow_name
    +            self._validate_workflow_exists_for_service()
    +            self._execution_id = self._create_execution_model(inputs).id
    +        elif execution_id is not None:
    +            self._execution_id = execution_id
    +            self._service_id = self.execution.service.id
    +            self._workflow_name = model_storage.execution.get(self._execution_id).workflow_name
    +        else:
    +            raise exceptions.InvalidWorkflowRunnerParams("")
    --- End diff --
    
    msg..


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message