ExecuteCustTaskScript()
This code sample describes how to create a script that loads information about the custom display step and uses that information to locate and run the appropriate callback script.
Function Boolean ExecuteCustTaskScript( \ Object prgCtx, \ WAPIWORK work, \ Integer workID, \ Integer subWorkID, \ Integer taskID, \ String scriptName ) Dynamic taskInfo Boolean success = False Object uapiCtx = prgCtx.Usession() //Load information about the custom display step. taskInfo = prgCtx.WSession().LoadTaskStatus( workID, subWorkID, \ taskID ) if ( !IsError( taskInfo ) ) UAPI.ExpandList( \ uapiCtx.fSession, \ taskInfo, \ { \ 'WORK_OWNERID', \ 'WORK_MANAGERID', \ 'SUBWORKTASK_PERFORMERID' } ) //Call the ExecuteScript() script which uses the information //about the step to locate and run the correct callback script. success = $Custmod.UtilityPkg.ExecuteScript( prgCtx, work, \ taskInfo, scriptName ) end return( success ) end