Add the following server script to the business service that you defined in Step 2. You must use the name of the workflow process that you use in Step 7:
function Service_PreCanInvokeMethod (MethodName, &CanInvoke)
{
if ( MethodName == "TestTBItem" )
{
CanInvoke = "TRUE";
return( CancelOperation );
}
return (ContinueOperation);
}
function Service_PreInvokeMethod (MethodName, Inputs, Outputs)
{
if ( MethodName == "TestTBItem" )
{
var input = TheApplication().NewPropertySet();
var output = TheApplication().NewPropertySet();
var svc = TheApplication().GetService( "Workflow Process Manager" );
input.SetProperty("ProcessName", "<WF Process Name Created in Step 4>");
svc.InvokeMethod("RunProcess", input, output);
input = null;
output = null;
svc = null;
return (CancelOperation);
}
return (ContinueOperation);
}