protected override void Execute(NativeActivityContext context) { //do other stuffs then prepare for pause context.CreateBookmark( BookmarkName.Get(context), new BookmarkCallback(DataArrived)); }
protected override void Execute(NativeActivityContext context) { if (Action != null) { context.ScheduleAction(Action, Prompt.Get(context), BookmarkName.Get(context)); } }
protected override void Execute(NativeActivityContext context) { 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(); }
protected override void Execute(NativeActivityContext context) { var customRecord = new CustomTrackingRecord("CurrentUserRecord"); customRecord.Data.Add("CurrentUser", CurrentUser.Get(context)); customRecord.Data.Add("Drafter", WorkFlowInParameters.Get(context).drafter); customRecord.Data.Add("OpinionField", OpinionField.Get(context) == null ? "" : OpinionField.Get(context)); context.Track(customRecord); context.CreateBookmark(BookmarkName.Get(context), new BookmarkCallback(OnResumeBookmark)); //创建书签 }
protected override void Execute(NativeActivityContext context) { // Send request to human Trace.TraceInformation("Request message : " + RequestMessage.Get(context)); Trace.TraceInformation("Creating bookmark : " + BookmarkName.Get(context)); // Create a Bookmark and wait for it to be resumed. context.CreateBookmark(BookmarkName.Get(context), new BookmarkCallback(OnResumeBookmark)); }
protected override void Execute(NativeActivityContext context) { // Send request to human Trace.TraceInformation($"From : {nameof(RequestHumanInput<T>)}. CREATE TASK >> {RequestMessage.Get(context)}"); Trace.TraceInformation($"From : {nameof(RequestHumanInput<T>)}. 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(); }
private Activity GetImplementation() { return(new Sequence { Activities = { new WriteLine { Text = new InArgument <string>(ctx => Text.Get(ctx)) }, new ReadInt { BookmarkName = new InArgument <string>(ctx => BookmarkName.Get(ctx)), Result = new OutArgument <int>(ctx => Result.Get(ctx)) } } }); }
protected override void Execute(NativeActivityContext context) { // Enter a no persist zone to pin this activity to memory since we are setting up a delegate to receive a callback var handle = _noPersistHandle.Get(context); handle.Enter(context); // Get (which may create) the extension var waiterExtension = context.GetExtension<WaiterExtension>(); // Add the callback waiterExtension.AddWaiterCallback(Waiter.Get(context), new Bookmark(BookmarkName.Get(context))); // Set a bookmark - the extension will resume when the Waiter is fired context.CreateBookmark(BookmarkName.Get(context), WaiterBookmarkCallback); }
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(); }
/// <summary> /// Create a bookmark and wait for data to arrive on it /// </summary> /// <param name="context"></param> protected override void Execute(NativeActivityContext context) { context.CreateBookmark(BookmarkName.Get(context), new BookmarkCallback(OnDataArrived)); }
protected override void Execute(NativeActivityContext context) { var bookmark = context.CreateBookmark(BookmarkName.Get(context), BookmarkResumed); var extension = context.GetExtension <Helpers.WorkflowInstanceExtensionHelper>(); //extension.WaitSome(bookmark); }