protected override async Task <Action <NativeActivityContext> > ExecuteAsync(NativeActivityContext context, CancellationToken cancellationToken)
        {
            // Inputs
            var timeout             = TimeoutMS.Get(context);
            var orchestratorName    = OrchestratorName.Get(context);
            var clientID            = ClientID.Get(context);
            var userKey             = UserKey.Get(context);
            var tenantName          = TenantName.Get(context);
            var existingAccessToken = ExistingAccessToken.Get(context);

            // Set a timeout on the execution
            var task = ExecuteWithTimeout(context, cancellationToken);

            if (await Task.WhenAny(task, Task.Delay(timeout, cancellationToken)) != task)
            {
                throw new TimeoutException(Resources.Timeout_Error);
            }
            await task;

            return((ctx) => {
                // Schedule child activities
                if (Body != null)
                {
                    ctx.ScheduleAction <IObjectContainer>(Body, _objectContainer, OnCompleted, OnFaulted);
                }

                // Outputs
                AccessToken.Set(ctx, null);
            });
        }