This guide walks through how to configure hooks within your Workspace.
A hook is a configured command line that points to script on your servers, that is executed by accsyn on certain occasions:
pre-submit-server; Executed on the server before a job is submitted, with first argument being a path to a JSON file generated at temp location holding job data.
post-submit-server; Executed on the server after a job is submitted, with first argument being a path to a JSON file generated at temp location holding job data.
post-failed-client; Executed on the remote client when a job has failed, with first argument being a path to a JSON file generated at temp location holding job data.
post-failed-server; Executed on the server when a job has failed, with first argument being a path to a JSON file generated at temp location holding job data.
post-done-client; Executed on the remote client when a job has finished, with first argument being a path to a JSON file generated at temp location holding job data.
post-done-server; Executed on the server when a job has finished, with first argument being a path to a JSON file generated at temp location holding job data.
pre-publish-server; Executed on the server when a remote user requests to publish one or more files, with first argument being a path to a JSON file generated at temp location holding file data and the second argument pointing to a path were expected feedback to user should be written in JSON format (see Publish workflow)
publish-server; Executed on the server when the published files from remote user has been uploaded, with first argument being a path to a JSON file generated at temp location holding the same pre publish input data aboe (see Publish workflow)
To configure hooks globally, logon as administrator to https://accsyn.io/admin/settings:
Click on the Hooks settings tab.
Click the edit(pen) icon on Hook configuration setting.
3. Click Enable hooks to have hook subsystem enabled.
4. If you want to run the hooks on a different server than the default (serving default volume at main site), choose the server @ Hook execution server.
5. Choose which hook you want to configure.
6. Click Enable.
7. Choose the entry matching the operating system your server is running, enter the local full path your script. Keep the token "${PATH_JSON_INPUT}" - it will be replaced with the path to the temp JSON input data at runtime. (Same goes for ${PATH_JSON_OUTPUT} with pre-publish-server hook)
Click [ Save ] when done to apply your hooks configuration. Test the hook by submitted a job / performing a publish.
Hooks can be overridden, or just be configured on a queue. See Queue administration.
Use the Python API within your hook, for example to program chained file transfer workflows.