Skip to content

Commit

Permalink
Improve getting workflow context data when running nested workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
gggeek committed Jun 2, 2017
1 parent 4cd1e5b commit cbab279
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Core/WorkflowServiceInner.php
Expand Up @@ -109,13 +109,14 @@ public function executeMigration(MigrationDefinition $migrationDefinition, $useT
protected function executeMigrationInner(Migration $migration, MigrationDefinition $migrationDefinition,
$migrationContext, $stepOffset = 0, $useTransaction = true, $adminLogin = null)
{
$previousWorkflowName = $this->currentWorkflowName;
$this->currentWorkflowName = $migration->name;
try {
parent::executeMigrationInner($migration, $migrationDefinition, $migrationContext, $stepOffset,
$useTransaction, $adminLogin);
$this->currentWorkflowName = null;
$this->currentWorkflowName = $previousWorkflowName;
} catch (\Exception $e) {
$this->currentWorkflowName = null;
$this->currentWorkflowName = $previousWorkflowName;
throw $e;
}
}
Expand Down

0 comments on commit cbab279

Please sign in to comment.