You can't avoid 'em - interactions. Everywhere you go you interact with others. This might not help your social life but it will help! In this tutorial, the reader should learn the common interactions of projects with web data protocols.
Prerequisites: A preexisting XML file.
Objective: Create a project which allows the user to enter data into an XML file.
Estimated time to complete: 15-20 minutes
Step 1: Create a New Project
Create a new Decision Only project at the main screen of Workflow Designer:
Step 2: Setup Your Project
To begin setting up your project, click the Import Components button on your main project model. Click the Create Integration Library button, and enter "XMLSchemaDefinitionLib" in the Library Name field. Click the OK button.
In the Dynamic Type Creation Selection window, select XML Schema Type Generator and click OK:
This will launch the Generator Wizard. The first step requires you to enter an incoming data file. This file will dictate the different fields for your XML File.
Enter an input file in the File Name field of the first step:
Click the Next >> button to continue to the second step.
The second step will simply display the source of the input file:
Click the Next >> button to continue to the final step. Click the Finish button in the last step. The last step allows you to customize the names of the components you are creating using the Generator wizard. For this tutorial, however, we will simply use the default.
The following window will appear:
Click the OK button to accept changes.
Step 3: Complete Specification of Your Project
To complete specification of your project, drag and drop an Add New Data component from the Data category of your toolbox to your project model. Link the new component to your StartComponent and EndComponent as shown below:
We must also specify input data for the project, allowing the user to enter data at execution time. Select the Input Data entry in the Project Info box on the left-hand side of the screen:
Click the Add button to create a new variable. Enter the name "dsPubs" in the Namefield, and set its Type to "dsPubs." Return to the main model of your project by selecting the Model: Primary tab at the top of the screen.
Step 4: Specify Your AddNewData Component
In the main model of the component, right-click on the Add New Data component and select Edit Component. The Edit Component window should appear:
Select dsPubs for the Data Type field. Enter "dsPubs" as the Variable Name under the Output Variables section. This will specify our newly-created input variable as the output variable for the AddNewData component.
Click the ... button to the right of the Value field. In the window which appears, click the ... button to the right of the Items field:
Click the Add button to create a new "dsPubs" type. Click the OK button three times to return to your main project model.
Step 5: Run and Test Your Project
Run your project by selecting the Debug button from the toolbar. The Debug button looks like a bug with a green arrow over it.
In the window which appears, double-click on the blue Execute link. Your project will ask you for input data:
Click the ... button to the right of the ds Pubs field. Then, click the ... button to the right of the Items field. In the Edit Object window, enter some vital information, including the "city," "country," "pub_id," "pub_name," and "state" for the newly-created ficticious publisher.
Click the OK button three times. Your project will begin to execute:
The data you entered will then be added to the input file you specified (in this example, "PurchaseOrder.xsd.")