Appearance
Flo_ExecuteActionWithParams
Declaration
C# public static extern bool Flo_ExecuteActionWithParams(string ActionFID, string InputParams, TExecuteCallBackEvent CallBack);
Delphi function Flo_ExecuteActionWithParams(ActionFID : PChar; InputParams : PChar; CallBackProc : TExecuteCallBackEvent = nil) : boolean; stdcall;
Example
csharp
C#
try
{
TExecuteCallBackEvent ExecuteCallBack = new TExecuteCallBackEvent(ExecuteCallBackHandler);
Boolean result =FlowAPI.Flo_ExecuteActionWithParams("00000000-0000-0000-0000-000000000000", "Accno|34|Group|ABC", ExecuteCallBack);
if (result) MessageBox.Show("Action execution accepted for processing"); else MessageBox.Show("Action execution not accepted for processing");
}
catch (Exception ex)
{
MessageBox.Show("Exception while trying to execute Action - " + ex.Message);
}pascal
Delphi
try
Result := Flo_ExecuteActionWithParams('00000000-0000-0000-0000-000000000000', 'Accno|34|Group|ABC', ExecuteCallBackHandler);
if Result then
showmessage('Action execution accepted for processing')
else
showmessage('Action execution not accepted for processing');
except
on e : exception do
showmessage('Exception while trying to execute Action - ' + e.Message);
end;Description
Executes the Action with the specified ActionFID passing it the parameters specified in InputParams. The ActionFID can be found by looking at the FID column in the FLO_ACTIONS table of the configuration database. The function returns a True or False response indicating whether the action has been accepted for processing.
Because the action will execute Asynchronously you cannot use the result of this function to determine success of the action, instead you need to pass a "call back" procedure that is called once the Action has completed processing. This call back procedure will indicate the success or failure of the action execution.
The InputParams parameter is a vertical pipe (|) separated list of named parameters passed as a string. The InputParams takes the format <paramname1>|<paramvalue1>|<paramname2>|<paramvalue2>|<paramname3>|<paramvalue3> etc. You can pass any number of parameters in the InputParams. The above examples pass two parameter, one named "Accno" with the value 34, the other called Group with the value 'ABC'.
TIP
The named parameters are turned into Local Globals within the action. This allows you to reference them within the Action configuration. Refer to the Variables section of the Administration Guide scripting reference for more information on Local Globals.