I design a simple process in K2 Design.
Approve activity with two actions 'Approve' and 'Decline'.
I can startprocess by code as following:
       SourceCode.Workflow.Client.Connection k2conn = new Connection();
       k2conn.Open("DLX");
       ProcessInstance pi = k2conn.CreateProcessInstance("Denallix Process TutorialCodeTest");
       pi.DataFieldsÂ"CodeTestID"].Value = this.TextBox1.Text;
       pi.DataFields;"CodeTestName"].Value = this.TextBox2.Text;
       k2conn.StartProcessInstance(pi);
       k2conn.Close();
I want create aspx page for Approve activity using code:
   protected void Page_Load(object sender, EventArgs e)
   {
       Connection k2Conn = new Connection();
       k2Conn.Open("DLX");
       WorklistItem wli = k2Conn.OpenWorklistItem(Request.QueryString "sn"]);
       this.TextBox1.Text=wli.ProcessInstance.DataFieldss"CodeTestID"].Value.ToString();
       this.TextBox2.Text = wli.ProcessInstance.DataFields."CodeTestname"].Value.ToString();
       //this.DropDownList1.DataSource = wli.Actions;
     Â
       foreach (Action oAct in wli.Actions)
       {
                       this.DropDownList1.Items.Add(oAct.Name.ToString());
         Â
       }
       k2Conn.Close();
   }Â
----------------------------------------Â
I find Actions.count=0, but I can Approve or Decline by dropdown menu by BP workspace worklist
Anyone can help me!