On Submit Workflow Script
On Submit Workflow custom tasks Logic Scripts can be used to perform custom tasks such as whether certain properties are populated for base members or parent members, or whether certain members have alternate (or shared) instances created.
These scripts get executed before a request enters the workflow, providing a validation gate to ensure request completeness and correctness. The scripts can prevent workflow initiation if validation fails.
These scripts are associated in the Workflow -> Builder screen as shown below.

Figure: On Submit Workflow Task Script Association