Hi
I have two actions Accept/Decline I have associated them with my DropDownList but when i run it, the two actions do not appear on the dropdown list below is the code for doing the association:
protected
void DDLDecision_SelectedIndexChanged(object sender, EventArgs e){
if (DDLDecision.SelectedItem.Text == "Accept")
{
WorkflowActions(
"Accept");}
else if (DDLDecision.SelectedItem.Text == "Decline")
{
WorkflowActions(
"Decline");}
}
public void WorkflowActions(string Actions)
{
try
{
//Generate the Connection String for the K2 Server
SCConnectionStringBuilder cb = new SCConnectionStringBuilder();
cb.Host =
"centaurus";cb.Port = 5555;
cb.Integrated =
true;cb.IsPrimaryLogin =
true;//Open the Worklist item and retrieve the SmartObject ID
//Connect to Workflow Server
wfConnection.Open(
"centaurus");//Open the Worklist Item and retrieve the SmartObjectID
WorklistItem wiClientEvent = wfConnection.OpenWorklistItem(Request.QueryString["SN"].ToString());
wiClientEvent.Actions[Actions.ToString()].Execute();
}
catch
{
Response.Write(
"Error");}
finally
{
//Close Connection
wfConnection.Close();
//now redirect to the workspace page
string[] Url = System.Web.Configuration.WebConfigurationManager.AppSettings.GetValues("TaskList");
//Response.Redirect(Url[0]);
}
}
I am confused as to why the actions do not appear in the DDL can anyone please help as I am about to go crazy