Highlighted
Super Contributor.. Super Contributor..
Super Contributor..
558 views

call a process / wizard from RAD or Java Script

Hello Experts , 

i have need to call a wizard after a users select a value from a combofill box . so i need to call the wizard from the Java code to the RAD expression of the Link file .

i manged to create the Wizard and create a process to call it ., would you please help me how to call this process or the wizard from RAD or JS 

 

thanks in advacne for all of you 

Thanks and Best Regards
------------------------------
Amr Salah
0 Likes
2 Replies
Highlighted
Super Contributor.. Super Contributor..
Super Contributor..

Re: call a process / wizard from RAD or Java Script

Hi Amr,

Did you try using the formatcontrol - after update of particular field  you can call the customized wizard using the wizard.run RAD application in the Subroutines. 

Or Using Process Designed Rules you can launch the new wizard on the condition that the user fills the particular field. 

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: call a process / wizard from RAD or Java Script

Hi Amr Salah,

Please trying below code inserting in your javascript code, make sure to provide the wizard name in place of <<<<<<<<<<TYPE YOUR WIZARD NAME>>>>>>>>>>>>

 

	var rteReturnValue = new SCDatum();
	var argNames = new SCDatum();
	var argVals = new SCDatum();
	
	argVals.setType(8);     //type array
	argNames.setType(8);    //type array
	
	var argVal;
	argVal=new SCDatum();
	      argVal.setType(2); //string                           
	      argVal="name";
	      argNames.push(argVal);
	
	argVal=new SCDatum();
	      argVal.setType(2); //string                           
	      argVal="<<<<<<<<<<TYPE YOUR WIZARD NAME>>>>>>>>>>>>"
	      argVals.push(argVal);      
	      
	var ret = system.functions.rtecall("callrad", rteReturnValue, "wizard.run", argNames, argVals,true);

 

 In order to call process from a javascript code, bleow function can be used :

function invokeprocess(file, name)
{
    var rteReturnValue = new SCDatum();
    var rteNames = new SCDatum();
    var rteVals = new SCDatum();
    rteNames.setType(8); //type array
    rteNames.push("file");      //Current File   
    rteNames.push("name");      //Process Name 
    rteVals.setType(8);
    rteVals.push(file); // 
    rteVals.push(name); //Process Name 
  
      
      system.functions.rtecall("callrad",rteReturnValue,"se.call.process",rteNames,rteVals,false); //false to run in the same thread, true to run in new one.  
      //print("done");
}

Here basically se.call.process RAD is called using callrad rtecall , whcih when provided with the process name , process can be called.

Try understanding by lokking at below example , how a process is called if using in RAD :

Call_process_RAD.JPGThanks

Neo Jax

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.