The HULFT Script trigger is a trigger function that executes a script when it detects a HULFT file transfer and the transfer history matches with criteria.
■Event firing image
We will introduce an example of linking a HULFT file transfer and a DataSpider script execution using the HULFT Script trigger.
Example: Executing a DataSpider script when the receiving of a specific file ID completes successfully in HULFT for Windows.
■Prerequisite environment
- DataSpider and HULFT must be installed on the same OS.
- HULFT requires the HULFT Script option.
■Setting Method
1. HULFT side setting
Please specify the DataSpider port number in [System operating environment settings]-[Others]-[HULFT Script port No.] of the HULFT management screen.
The default setting when installing DataSpider is 7700.
After you save the settings, please restart the HULFT service from the process controller.
2. DataSpider script creation
Please create a script to be processed by the DataSpider in advance.
As a sample, please create a process to copy the file collected by HULFT.
After you saved the project, please register the service from [File]-[Register project as service] of the designer so that it can be called from the trigger.
3. DataSpider Global Resource Settings
You need to double-click [Create New Global Resource] from [Control Panel]-[Global Resources] of DataSpider Studio.
In the [Select Resource Type] screen, please double-click the HULFT8 icon in the [HULFT] tab.
In the [Edit Connection Settings] screen, you need to set the HULFT installation directory and HULPATH directory. Please set any name in the Connection Name]. Click OK to save finally.
After the setting, please restart DataSpiderServer from [Control Panel]-[DataSpiderServer Settings]-[Others] tab of DataSpider Studio.
After the restarting, it is possible to continue using the DataSpider Studio by performing [Reconnect to Server] from the [Studio] menu.
4. DataSpider trigger settings
From DataSpider Studio's [My Triggers], please click [My Trigger Tasks]-[Create a New HULFT Script Trigger].
In the [HULFT Script Trigger Settings] screen, you need to set the conditions for trigger firing.
- Trigger name: Set any name
- HULFT Configuration: Select the global resource you created earlier.
- Monitored Target: Select "Concentration Only" to execute after concentration.
- Condition range: In this case, please select "Match all the conditions" because it is based on "When completed with a specific file ID".
- Condition setting: Add and set conditions with the [Add] button. Please set the file ID that you want to monitor and the completion code "000000" that indicates normal termination with HULFT as the condition.
Once you have set, please click [Next].
In the [Set Execution Content] screen, you need to set the owner and execution user. Select the service and script you want to start which you created in step 2 and registered for service in step 2.
If required, you need to set the option in the Setup of Run Options screen. We will leave the default settings this time. Please click the Finish button to save the trigger in a valid state.
With the above settings, you can set the trigger to execute a script after HULFT's specific file ID has been successfully collected.
Please refer to the help of the following URL for details of HULFT Script trigger, such as specification restrictions and notes.