Getting down to basics and starting from scratch. We're beginning at the beginning here folks. The purpose of this tutorial is to learn how to create a basic working Workflow project in Workflow Designer.
Objective: To create a Workflow project.
Estimated time to complete: 30 minutes
Step 1: Create a New Project
To begin, create a new Workflow project. The Workflow project can be selected from the main page when you first run Workflow Designer.
Step 2: Setting Up Your Project
To create a working Workflow project, you will need input variables and output variables. This allows the project to take in data to work on.
To begin, click the Input Data entry in the Project Info box on the left-hand side of the screen. In the window which appears, click the Add button to create a new variable.
Set the variable's Name property to "LeaveRqstDate" and set its Type property to "Date (Date Time)". Also, check the Null Allowed checkbox.
Step 3: Setup Your Model
Return to the main project model by clicking on the Model: Primary tab at the top of the screen.
Drag-and-drop an ApprovalWorkflow component from your toolbox. This component is located under the Workflow Components category in your toolbox. Right-click on your newly-added ApprovalWorkflow component, and select Edit Component.
In the Edit Component window, select the Setup: Page Look tab:
Set the Item Description to "Leave Request" and the Page Title to "Leave Request Approval." Also, make sure the Show Tracking Link On Page checkbox is checked.
Select the Response tab and set the following properties:
Step 4: Editing Your Embedded Model
From the Event Configuration Tab, click the ... button to the right of the Start Process field. A new model windowshould appear.
Drag-and-drop a SendEmail component from the Communications category of the toolbox to this new model.
Connect the Start to the SendEmail and connect SendEmail to the End.
Right-click on the SendEmail component and select Edit Component. In the Edit Component, select the Email Contents tab. Click the ... button to the right of the Contents field.
In the Advanced Text Editor window, enter the following data. Keep in mind that wherever there is a blue link, you must drag the data from the box on the left. Therefore, you must drag the LeaveRqstDate and ResponsePageLink items from the box on the left:
Click the OK button to accept changes. Click the ... button to the right of the ToAddresses field. In the List Builder window which appears, select the Constant Data tab and click the Add button. Enter your email address in the Value field:
Click OK button twice. Click the ... button to the right of the FromAddress field. Select the Constant Value tab, uncheck the NULL Value checkbox, and enter your email address in the Value field. Click the OK button to accept changes:
Enter "Leave Request" in the Subject textbox. Click the ... button to the right of the SMTP Server Name field. In the Constant Value (*) tab of the Specify Variable Names or Constant Value window, uncheck the NULL Value checkox and enter your email server's SMTP URL in the Value texbox. Just for a test, you may wish to enter "localhost," referring to the local computer.
Click the OK button to accept changes. Click OK until you return to the new model window. In the new model window, click OK to accept changes. You will be returned to the Edit Component window for your ApprovalWorkflow component. Click OK to accept changes.
Step 5: Finishing Your Main Project Model
Drag-and-drop two SendEmail components from the Communications category of your toolbox to your main model. Connect them in a similar manner to the model shown below:
Right-click on the top-most Send Email component and select Edit Component . Specify your To Addresses, From Address, Subject, and SMTP Server Name properties in a similar manner to the Send Email component we just completed.
Specify the Contents field with the message: "Leave request has been approved."
Click the OK button to accept changes.
Right-click on the bottom-most Send Email component and select Edit Component.Specify the To Addresses, From Address, Subject, and SMTP Server Name properties in a similar manner to the last two Send Email components.
Specify the Contents field with the message: "Leave request has been denied."
Step 6: Run and Test Your Project
Run your project by clicking on the Debug button on the toolbar. The Debug button appears as a bug with a green arrow over it. The project will initially ask for input data:
Enter a date, such as "12/12/2006" and click the OK button. Your project will execute. You will receive an email similar to the one below in your inbox:
Clicking on the respond link will take you to the webpage shown below:
Choose whether to approve or deny the request for leave. Once you have chosen one, you should receive an email informing you which was chosen. The following email displays that the leave request has been approved:
As you are checking your email, you project is running quietly in the background:
It will go to the EndComponent once you approve or deny a request for leave. All information about the decisions made and the paths followed can be viewed in the Execution Log.