- Wed Aug 05, 2015 4:09 pm
#783823
Hi all. There has been some discussion about the Steps menu that appears at the top of the case when it is opened in classic skin. This menu shows all steps (dynaforms) accessible to the user at that time. Notably, if you use dynaform conditions, the menu will show only those steps for which the conditions resolve to true. (This is a very powerful feature.) I found this very helpful in the latest process I am building because I have a variable number of forms to fill out depending on a field.
I know that I could hide the menu by:
(1) editing base code in ..\workflow\engine\menus\caseOptions.php (comment out line 32), or
(2) using the following javascript previously documented in "Accessing the Interface" wiki:
Fatal error: Call to a member function getStepMode() on a non-object in C:\Program Files (x86)\Processmaker\processmaker\workflow\engine\methods\cases\cases_Step.php on line 266
Please Help!
I know that I could hide the menu by:
(1) editing base code in ..\workflow\engine\menus\caseOptions.php (comment out line 32), or
(2) using the following javascript previously documented in "Accessing the Interface" wiki:
Code: Select all
What I want to do is to refresh/recalculate this menu after I derivate the case to a new task and open it using the following code in a trigger:
function hideSteps() {
if (top.frames['casesFrame'] && top.frames['casesFrame'].frames['casesSubFrame'] &&
top.frames['casesFrame'].frames['casesSubFrame'].document.getElementById("stepsMenu")) {
top.frames['casesFrame'].frames['casesSubFrame'].document.getElementById("stepsMenu").style.display = "none";
window.clearInterval(saveInterval);
}
}
saveInterval = window.setInterval(hideSteps, 100);
Code: Select all
At this point, if a user opens the task from the inbox, the steps menu properly shows the accessible steps. However, when the case is derivated and opened automatically with the trigger, the steps menu retains info from the previous task, and if those tasks are clicked causes the following error: $caseId = @@APPLICATION;
$nextId = @%INDEX+1;
//$link = "Location: cases_Open?APP_UID=".$caseId."&DEL_INDEX=".$nextId."&action=draft";
//G::SendMessageText($link, "WARNING");
PMFDerivateCase(@@APPLICATION, @%INDEX);
G::header("Location: cases_Open?APP_UID=$caseId&DEL_INDEX=$nextId&action=draft");
die;
Fatal error: Call to a member function getStepMode() on a non-object in C:\Program Files (x86)\Processmaker\processmaker\workflow\engine\methods\cases\cases_Step.php on line 266
Please Help!