Question

i have a custom activity which contains other activity inside it to use execution property like this :

public sealed  class GlobalContainerActivity:NativeActivity
{

[RequiredArgument]
 public InArgument<WfParam> WfparamInArg { get; set; }
        /// <summary>
    ///   Gets or sets Body.
    /// </summary>
    [DefaultValue(null)]
    public Activity Body { get; set; }


    protected override void Execute(NativeActivityContext context)
    {
        var generalargument = context.GetValue(WfparamInArg);
        context.Properties.Add(GlobalWfparam.Name, new GlobalWfparam(generalargument));

        if (Body != null)
        {
            context.ScheduleActivity(Body);
        }
    }

and i have a child custom activity which persist the workflow for human interact like this:

 public  class WaitActivity :NativeActivity
{
   public string BookmarkName { get; set; }

   public OutArgument<WfBookmark> WfBookmark { get; set; }

    protected override void Execute(NativeActivityContext context)
    {
        try
        {
            BookmarkName = "ResumeFlow";
            context.CreateBookmark(BookmarkName, Continue);
        }
        catch (Exception)
        {

            throw;
        }

    }
    private void Continue(NativeActivityContext context, Bookmark bookmark, object value)
    {
        WfBookmark wfBookmarkParam = (WfBookmark)value;
        WfBookmark.Set(context, wfBookmarkParam);

       }
    protected override bool CanInduceIdle
    {
        get
        {
            return true;
        }
    }
}

and after finishing this class work flow stop without any error but after that i want to resume the workflow i have error that mention the InstanceStore Id is not persist and doesn't resume the flow

Was it helpful?

Solution

I Found That There is some think Called No Persistent Area And I use it in Wrong way So I Re commend Not TO use it When Ever you want To Persist WorkFlow

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top