Ejemplo n.º 1
0
        protected override void Execute(NativeActivityContext context)
        {
            var contentItem = Node.Load <GenericContent>(ContentPath.Get(context));

            using (InstanceManager.CreateRelatedContentProtector(contentItem, context))
            {
                contentItem["RejectReason"] = Reason == null ? string.Empty : (Reason.Get(context) ?? string.Empty);
                contentItem.Reject();
            }
        }
Ejemplo n.º 2
0
        protected override void Execute(NativeActivityContext context)
        {
            var bookMarkName = Guid.NewGuid().ToString();
            var content      = new WfContent {
                Path = ContentPath.Get(context)
            };

            notificationId.Set(context, context.GetExtension <ContentWorkflowExtension>().RegisterWait(content, bookMarkName));

            context.CreateBookmark(bookMarkName, Continue, BookmarkOptions.MultipleResume);
        }