Example #1
0
        protected override void Execute(CodeActivityContext context)
        {
            Trace.TraceInformation($"Executing {nameof(CreateTask)}");
            var taskId = Guid.NewGuid();

            TaskId.Set(context, taskId);

            Trace.TraceInformation($"CREATED TASK. Asignee: {AsigneeEmail.Get(context)}, " +
                                   $"RequestMessage: {RequestMessage.Get(context)}. " +
                                   $"Task ID: {taskId.ToString()}");
            Trace.Flush();
        }
        protected override void Execute(NativeActivityContext context)
        {
            Trace.TraceInformation($"Executing {nameof(CreateTask)}");
            var taskId = Guid.NewGuid();

            TaskId.Set(context, taskId);

            Trace.TraceInformation($"<<<< CREATED TASK >>>> Asignee: {AsigneeEmail.Get(context)}, " +
                                   $"RequestMessage: {RequestMessage.Get(context)}. " +
                                   $"Task ID: {taskId.ToString()}");

            Trace.TraceInformation($"Activity : {nameof(WorkflowRestorePoint<TOut>)} creating bookmark : {BookmarkName.Get(context)}, " +
                                   $"on WorkflowInstanceId: {context.WorkflowInstanceId.ToString()}");

            // Create a Bookmark and wait for it to be resumed.
            context.CreateBookmark(BookmarkName.Get(context), new BookmarkCallback(OnResumeBookmark));
            Trace.Flush();
        }