Adding an OnStart Script
The following script checks whether the username and email values for a new account are missing. If the values are missing, the workflow fails.
- From the workflow design area, right-click the activity, and then click Properties.
The activity property dialog box appears.
- Click the OnStart Script tab.
- On the OnStart Script tab, enter the following code:
#OnStart Script Sample
if (activity.userName == null || activity.userName.length() == 0)
if (activity.email == null || activity.email.length() == 0)
workflow.setFailed("missing email address");
Tip: Click Insert Variable to add variables as needed.
- Click OK.
Last modified: 9/10/2020 5:37:26 AM