0

たとえば、ボタンの Click イベントを実行することによって、Web ページ コントロールを HandleExternalEvent を使用できるかどうか疑問に思います。

満足のいく結果が得られずにこれを実装しようとしましたが、Windows フォーム プロジェクトでは問題ありません。

    private string InstanciaGuid
    {

        get { return ViewState["instancia"].ToString(); }
        set { ViewState.Add("instancia", value); }
    }

    public BFPrueba01 _FacadePrueba01
    {
        get
        {
            return ViewState["facade"] as BFPrueba01;
        }

        set { ViewState["facade"] = value; }
    }

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
            ConeccionWWF();
    }

    private void ConeccionWWF()
    {
        WorkflowRuntime runtime = new WorkflowRuntime();

        Session.Add("runtime", runtime);

        ExternalDataExchangeService dataExchange = new ExternalDataExchangeService();
        runtime.AddService(dataExchange);
        _FacadePrueba01 = new BFPrueba01();
        dataExchange.AddService(_FacadePrueba01);

        runtime.StartRuntime();
        parameters.Add("oUsuario", oUsuario);
        WorkflowInstance instancia = runtime.CreateWorkflow(typeof(WWFsecuencial));
        instancia.Start();
        InstanciaGuid = instancia.InstanceId.ToString();

    }

    protected void btnComenzarWWF_Click(object sender, EventArgs e)
    {
        WorkflowRuntime runtime = Session["runtime"] as WorkflowRuntime;
        WorkflowInstance instance = runtime.GetWorkflow(new Guid(InstanciaGuid));
        _FacadePrueba01.RaiseEventSecuencial(new ComunicacionEventArgs(instance.InstanceId, MovementChangeType.Accelerate));
    }
4

0 に答える 0