All, I'm having what seems to be somewhat the same issue /awd/forums/questions/3402600. The main difference is that I'm trying to set the parameters through the ECL since we are not using the Metastorm web interface, but our own custom interface instead. I have followed all the suggestions above, but they seem to apply when looking at the form containing the BO (as opposed to when calling to it through the ECL).
I currently have the BO's parameters set to variables in the Managed Variables section. I have also dragged those variables onto the form. Although I am able to manipulate the variables at will after using EWorkSession.StartAction(...), I have found that it does not rerun/update the BO results. I have verified this by monitoring SQL Server Query Analyzer and viewing the values passed for the BO query.
I have tried both setting the variables after starting the action as well as setting them at the exact moment the action is started. Neither seem to work. I'm hoping I'm just missing something very simple here. I've copied the code below in case anyone has a few moments to help me out.
// validate that the session is logged in
ValidateSession();
// declare variable to be returned
DataTable dt = null;
// get the list of admin forms
eFormsListResponse adminList = m_EworkSession.AdminFormsList(null, "", "", -1, -1);
// loop through the forms
foreach (FormsDataSet.FormsRow row in adminList.Forms.Forms)
{
// only work on the FindItems form
if (row.eActionCaption == "afrm_FindItems")
{
//TODO: TES - need to find a way to set the parameters still
// start an action on the form in order to interact with the items on it
string actionName = row.eActionName;
string mapName = row.eMapName;
//FieldList fl = new FieldList();
//fl.Add("ItemID", new Field("ItemID", itemId));
//fl.Add("ItemTypeID", new Field("ItemTypeID", itemTypeId));
//ActionResponse actResponse = m_EworkSession.StartAction(null, mapName, actionName, false, fl);
ActionResponse actResponse = m_EworkSession.StartAction(null, mapName, actionName, false, null);
// set the params
actResponse.Action.Fields2["ItemID"].Value = itemId;
actResponse.Action.Fields2["ItemTypeID"].Value = itemTypeId;
// get the data
DataSet ds = (DataSet)actResponse.Action.Fields2["Grid1"].Value;
dt = ds.Tables[0];
}
}
// return to the caller
return dt;