X-UP Automation Model Development

This chapter describes how to develop an automation model using a GUI editor and graphically express, using a diagram, logic that corresponds to a service. It also describes development methods for actually collecting and processing data using various services.

The X-UP model development stages are as follows:

  1. Develop a model using X-UP Builder.

  2. Test a developed model in X-UP Builder.

  3. Deploy a developed model on an X-UP Server by using X-UP Builder’s deployment feature.

  4. Test a deployed model on the X-UP test web page.

Acquire data from a data source with an invoke used in an automation model.

Each invoke can be processed modularly, and you can compose a model using multiple invokes.

This chapter contains the following sections:

Model Development Using SAP RFC Invoke

This section describes model development using the SAP RFC function.

An automation model's SAP RFC Invoke development stages described in this section are as follows:

X-UP Project Creation

  1. Go to [File > New > X-UP Project] and run the New X-UP Project Wizard.

  2. Enter the desired name into the [Project Name] field and click the [Finish] button.

  1. Verify that the X-UP project was created as shown in the image below.

Automation Model and SAP RFC Invoke Creation

  1. Go to [File > New > X-UP Automation Model] and run the New Model Wizard.

  2. Enter the desired name into the [Model Name] field and click the [OK] button.

  1. The below screen will be displayed when the New Model Wizard is completed.

  1. Select [SAP RFC] from the invokes on the palette, and then click the editor to create an SAP RFC invoke.

Data Source Creation and Properties Setup

  1. Double-click the generated SAP RFC invoke, or click the [Properties] tab. Click the [SAP RFC] icon to start the wizard.

  1. Click the [Create New DataSource] button from the Invoke SAP RFC Wizard.

  1. Define a new data source on the New DataSource page. Enter each field value as follows, and click the [Test Connection] button. Verify that a connection is properly established to the datasource.

  2. Click the [Finish] button when complete.

Field Name

Field Value

Name

‘SAP RFC’

Enter a value that does not overlap with any other data source name.

ID

SAP RFC server connection ID

PASSWORD

SAP RFC server connection PASSWORD

Client

Client information to be used in a login account.

Host Name

Server IP

System Number

System number information to be used in a login account.

Repository

Repository information to be used in a login account.

Charset

Character encoding.

Timeout

Maximum time to maintain connection with a server.

  1. Select [SAP RFC] as the data source type, and click the [Get Function List] button to call the function list registered on a server.

  2. Wildcard (*) search is possible when using [Search Group].

  1. When you select a function to be called from the function list search results, its input and output parameter information can be verified.

  2. The information appears simultaneously in the SAP RFC and X-UP parameter formats.

  3. Click the [Test] button and set an input parameter value in the Define Input Value Wizard. Then click the [Finish] button to verify that the data is properly displayed.

  1. You can verify that the input and output parameters were generated after clicking the [OK] button.

Invoke Testing

  1. The SAP RFC invoke's input and output parameters are generated based on its test results.

  2. Select [InvokeInfo] from the SAP RFC invoke's properties menu, and then click [] to start the test.

  1. When the Define Input Value Wizard is displayed, input the test value entered in the Properties menu, and then click the [Finish] button.

  2. When the test is successfully completed, you can verify the results in the Test Result window.

Model Testing

  1. Select [Connect] from the model editor's palette, and then connect the start and end nodes to the SAP RFC invoke.

  2. Right-click on the model editor to display a popup menu. Select [Test] from the popup menu to test a model.

  3. The test results are displayed in the Result ParameterSet window when completed.

Model Development Using Select Invoke

This section describes the development method for using an automation model to acquire data from a database using the Select query.

Refer to the Sample DB Table Creation Script for database table information used in this section.

An automation model's Select Invoke development stages described in this section are as follows:

X-UP Project Creation

  1. Go to [File > New > X-UP Project] and run the New X-UP Project Wizard.

  2. Enter the desired name into the [Project Name] field and click the [Finish] button.

  1. Verify that the X-UP project was created as shown in the image below.

Automation Model and Select Invoke Creation

  1. Go to [File > New > X-UP Automation Model] and run the New Model Wizard.

  2. Enter the desired name into the [Model Name] field and click the [OK] button.

  1. The below screen will be displayed when the New Model Wizard is completed.

  1. Select [New DataSource] from the X-UP DataSource view on the right side of the screen and run the wizard.

  2. Define a new data source in the New DataSource Wizard. Enter each field value as follows, and click the [Test Connection] button. Verify that a connection is properly established to the datasource.

  3. Click the [Finish] button when complete.

Field Name

Field Value

Name

‘DB_ORACLE’

Enter a value that does not overlap with any other data source name.

DBMS

Select a database system to be used.

Oracle is used for this example.

Connection URL

JDBC connection string.

User ID

Database user ID.

User PW

Database user password.

Database

Name of database to be used.

Charset

‘UTF-8’

Character encoding value.

Timeout (msec)

‘10000’

Maximum time to maintain connection with a server.

ConnectionPool MaxActive

‘30’

Maximum connection pool size.

ConnectionPool MaxIdle

‘30’

Maximum idle pool size.

ConnectionPool maxWait

‘5000’

Maximum wait time for opening a connection.

  1. Select [DataSource] from the X-UP DataSource view and import a table list.

  2. Drag the ADDRESS_BOOK table from the table list and drop it into the editor.

  3. Choose the [Select] invoke to create a select invoke.

  4. Alternatively, you can select the [Select] invoke from the palette and then click the editor to create a select invoke.

  1. By default, a generated select invoke will have a dataset as an output parameter.

  2. The generated Select SQL statement retrieves all columns without a where clause.

Input Parameter and Properties Setup (SQL change)

At this stage, you will set the properties for defining the input parameter and entering information required to obtain data from a data source.

  1. Select [DataSet] from the palette, and then click the editor to create a dataset.

  2. The default name of a generated dataset is dataset + index. Change the name and alias to IN_DS.

  1. Use [Connect] from the palette to link the modified dataset to the Select invoke.

  2. When connected, the dataset icon changes to blue and becomes a parameter required as input.

  3. Verify the change using the [InOut] tab in Properties.

  4. Change the name and alias of the output dataset to OUT_DS and select "out."

Distinction between alias and name when using a dataset parameter:


Alias: Define an alias desired by the user. Korean input is available.


Name: Define the dataset name. The dataset name can only be defined in English with a name that does not overlap with any other parameter in the editor.


Although the alias is visible on the editor during development, only Name is actually distinguished during Java code and source generation.

  1. Select the IN_DS dataset, select [Schema] under Properties, and then add an ID and define the data type.

  1. When the select invoke in the image below is connected to the start and end nodes using [Connect] from the palette, the invoke is run during a model test.

  1. You can modify the automatically-generated SQL statement by double-clicking the select invoke. In the example, the ID (IN_DS) is received as the input variable, and the ADDRESS_BOOK is retrieved. If the ID is not null during a retrieval, only an ID received as an input variable is retrieved.

$r_title(Before changes)
 select 
	ID,
	NAME,
	COMPANY,
	EMAIL,
	PHONE,
	BIRTHDAY,
	NOTES
 from MIMASHUP.ADDRESS_BOOK
$r_title(After changes)
select 
	ID,
	NAME,
	COMPANY,
	EMAIL,
	PHONE,
	BIRTHDAY,
	NOTES
from ADDRESS_BOOK
<dynamic prepend="where">
	<isNotNull property="IN_DS.ID">
		ID = #IN_DS.ID#
	</isNotNull>
</dynamic>

Invoke Testing

  1. To start a test, click the [] preview button located in the upper-right corner of the [InvokeInfo] tab in a select invoke's properties window. Add a row in the Define Test Value window, and enter “5.” Click the [Finish] button.

  1. The test results will be displayed in the Result ParameterSet view.

Model Testing

  1. Right-click on the model editor to display a popup menu. Select [Test] from the popup menu to test a model.

  1. The test results are displayed in the Result ParameterSet window when completed.

  2. The [Parameters] and [DataSets] tabs are located at the bottom of the Result ParameterSet view. Verify that a dataset named “OUT_DS” exists as an output parameter.

Model Development Using Modify Invoke

This section describes the development method for changing data in a database using an automation model.

Refer to the Sample DB Table Creation Script for database table information used in this section.

An automation model's Modify Invoke development stages described in this section are as follows:

X-UP Project Creation

  1. Go to [File > New > X-UP Project] and run the New X-UP Project Wizard.

  2. Enter the desired name into the [Project Name] field and click the [Finish] button.

  1. Verify that the X-UP project was created as shown in the image below.

Automation Model and Modify Invoke Creation

  1. Go to [File > New > X-UP Automation Model] and run the New Model Wizard.

  2. Enter the desired name into the [Model Name] field and click the [OK] button.

  1. The below screen will be displayed when the New Model Wizard is completed.

  1. Select [New DataSource] from the X-UP DataSource view on the right side of the screen and run the wizard.

  2. Define a new data source in the New DataSource Wizard. Enter each field value as follows, and click the [Test Connection] button. Verify that a connection is properly established to the datasource.

  3. Click the [Finish] button when complete.

INCLUDE_ERROR(ELEMENT_REMOVED)

  1. Select [DataSource] from the X-UP DataSource view and import a table list.

  2. Drag the ADDRESS_BOOK table from the table list and drop it into the editor.

  3. Choose the [Select] invoke to create a select invoke.

  4. Alternatively, you can select the [Modify] invoke from the palette and then click the editor to create a modify invoke.

A basic query, capable of CUD operations with respect to the table, is automatically generated when creating an invoke in the X-UP DataSource in view.

  1. When creating a modify invoke, a wizard is first executed where you can select columns.

  1. Click the [Select All] button, and then click [OK]. By default, a generated modify invoke will have input and output datasets as parameters.

Input Parameter and Properties Setup

  1. Click the input dataset and select [General] in the properties window. Change the name and alias to IN_DS.

The name of the dataset that is bound to the query is also changed when you change the input dataset name.

  1. When a modify invoke is created from the palette, the input parameter must be generated manually (No. 1 in the below image), and the IN_DS input parameter's schema must be specified. Click the [Import] button (No. 2 in the below image).

  2. The user can directly enter a dataset's column settings by clicking the [Add] button, or the column information can be obtained from a database table or another X-UP or XML file by clicking the [Import] button.

  3. In the Import Dataset Schema Wizard, select DB Table as the import source. Select the ADDRESS_BOOK table schema with DB_ORACLE selected as the data source.

Import Source

Description

DB Table

Acquire column information from the database table. More than one DB data source must be configured in the current X-UP project to be available for use.

X-UP Model

Acquire column information by using another model's output dataset that exists in the current X-UP project.

XML File

Acquire dataset column information from an .xml file.

The column information can only be used if it's in the dataset schema format provided by TOBESOFT.

  1. After changing the name of the input dataset, double-clicking a modify invoke will display the Target DataSet combo box in the Invoke Modify SQL popup window. The input parameters of dataset types are displayed. Select IN_DS from the drop-down menu. Verify that the insert, update, and delete queries are automatically entered.

SQL delete, insert, and update will be unconditionally executed once in order if a target dataset is not selected.

Enable Surround CDATA

If the Enable Surround CDATA option is selected in the Invoke Modify SQL window, only the CDATA that corresponds to the checked setting will be processed. If all settings are selected, for example, CDATA is processed for all queries. If only Insert SQL is selected, it's applied only to insert queries.

Invoke Testing

  1. To start a test, click the preview button[] located in the upper-right corner of the [InvokeInfo] tab in a modify invoke's properties window.

  1. When the Define Test Value window is displayed, enter the data to be used in the modify invoke test.

  2. Click the [Add] button and enter the data.

  1. Click the [Finish] button when completed.

Refer to the table below for descriptions of transaction processing methods (Action field).

Action

Description

INSERT

Rows with the INSERT setting are added to the DB table.

UPDATE

Rows with the UPDATE setting by deleted by finding identical records in the table. "Identical records" refers to records where the primary key column values match the input dataset values. Thus, updates can only be performed in tables with more than one primary key column.

DELETE

Rows with the DELETE setting are deleted by finding identical records in the table. "Identical records" refers to records where the primary key column values match the input dataset values. Thus, deletions can only be performed in tables with more than one primary key column.

NORMAL

NORMAL is only used as input data and does not participate in DB transactions.

  1. You can verify the results in the Result ParameterSet view when testing is successfully completed.

Model Testing

  1. Connect the start and end nodes to the modify invoke.

  2. Right-click on the model editor to display a popup menu. Select [Test] from the popup menu to test a model.

  3. Enter the same test data from "Invoke Testing" and conduct the test.

  4. The test results are displayed in the Result ParameterSet window when completed.

  5. The [Parameters] and [DataSets] tabs are located at the bottom of the Result ParameterSet view. You can verify that "RESULT0" exists as the dataset output parameter.

Model Development Using Procedure Invoke

This section describes the development method for calling a procedure or function in a database using an automation model.

Refer to the Sample DB Table Creation Script for database table information used in this section.

An automation model's Procedure Invoke development stages described in this section are as follows:

X-UP Project Creation

  1. Go to [File > New > X-UP Project] and run the New X-UP Project Wizard.

  2. Enter the desired name into the [Project Name] field and click the [Finish] button.

  1. Verify that the X-UP project was created as shown in the image below.

Automation Model and Procedure Invoke Creation

  1. Go to [File > New > X-UP Automation Model] and run the New Model Wizard.

  2. Enter the desired name into the [Model Name] field and click the [OK] button.

  1. The below screen will be displayed when the New Model Wizard is completed.

  1. Select [New DataSource] from the X-UP DataSource view on the right side of the screen and run the wizard.

  2. Define a new data source in the New DataSource Wizard. Enter each field value as follows, and click the [Test Connection] button. Verify that a connection is properly established to the datasource.

  3. Click the [Finish] button when complete.

INCLUDE_ERROR(ELEMENT_REMOVED)

  1. Select [DataSource] from the X-UP DataSource view and import procedure and function lists.

  2. Drag a target from the imported procedure list and drop it into the editor.

  3. Alternatively, you can select the [Procedure] invoke from the palette and then click the editor to create a procedure invoke.

The defined input and output parameter information is displayed when a procedure is selected. The input and output parameters are displayed in said order. A blue circle is displayed in front of input parameters, and a red circle is displayed in front of output parameters.

  1. Click the [Test] button on the wizard.

The exact output values for procedures and functions cannot be known until testing is completed. (MSSQL, MySql) Therefore, a procedure invoke is created after verifying the output test results.

  1. Enter a value into Define Input Value, and then click the [Finish] button.

  1. The output value can be verified when the procedure is called.

  2. Click the [OK] button to complete the procedure invoke’s input and output parameter setup.

Invoke Testing

  1. The procedure invoke's input and output parameters are generated based on its test results.

  2. Select [InvokeInfo] from the procedure invoke's properties menu, and then click to start the test.

  1. Follow the same invoke testing procedure from "Automation Model and Procedure Invoke Creation" by entering a test value in the properties menu and clicking the [Test] button. The results can be verified when the test is completed.

  2. When the test is successfully completed, you can verify the results in the Result ParameterSet window.

Model Testing

  1. Select [Connect] from the model editor palette, and then connect the start and end nodes to the procedure invoke.

  2. Right-click on the model editor to display a popup menu. Select [Test] from the popup menu to test a model.

  3. Enter the same test data from "Procedure Invoke Testing" and conduct the test.

  4. The test results are displayed in the Result ParameterSet window when completed.

Model Development Using OpenApi Invoke

This section describes OpenApi model development using the App Store service of Apple Inc.

App Store offers new applications classified according to categories as well as a most-popular list. Data will be provided in the form of the XML-based RSS format. X-UP builder collects XML-formatted data and converts it into standard parameters.

In this section, you will go through the following stages to develop the OpenApi Invoke of an automation model.

X-UP Project Creation

  1. Go to [File > New > X-UP Project] and run the New X-UP Project Wizard.

  2. Enter the desired name into the [Project Name] field and click the [Finish] button.

  1. Verify that the X-UP project was created as shown in the image below.

Automation Model and OpenApi Invoke Creation

  1. Go to [File > New > X-UP Automation Model] and run the New Model Wizard.

  2. Enter the desired name into the [Model Name] field and click the [OK] button.

  1. The below screen will be displayed when New Model Wizard is completed.

  1. Select Open API from the invokes on the palette, and then click the editor to create an OpenApi Invoke.

Data Source Creation and Properties Setup

  1. Double-click the generated OpenApi Invoke (1) to start the wizard. Otherwise, click the InvokingInfo tab (2) of the Properties view and click the OpenApi icon’[ ](3).

  1. Click create new DataSource [] in the wizard.

  1. Define a new data source on the New DataSource page. Enter each field value as below, and click the Test Connection button. Verify that a connection is properly established to the datasource.

  2. Click the Finish button after the verification.

Field Name

Field Value

Name

‘OPENAPI_APPLE’

Enter a value that does not overlap any other data source names.

HTTP URL

‘https://itunes.apple.com/us/rss/’

Enter a base URL for the open API services.

In case the host of open APIs demands HTTP basic authentication, enter valid values into 'Id' and 'Password' of HTTP Authentication Information.

  1. Select 'OPENAPI_APPLE' among the defined data sources.

  2. Enter an appropriate sub-path for the base path and click Test button.

    The sub-path for this example is ‘topfreeapplications/limit=10/xml.’

  1. If you succeeds in calling the services, you can see the BODY value as well as values of the HTTP headers, as presented in the second picture below.

  1. Click the OK button to designate the tested values as output parameters.

The Invoke will be still valid even if you delete unnecessary pieces of header information.

Invoke Testing

  1. The OpenApi Invoke's input and output parameters are generated based on its test results.

  2. Delete unused values of the HTTP header responses.

  3. Proceed with the test by accessing the InvokeInfo(2) tab in the Properties view of OpenApi Invoke(1) and clicking [].

  1. When the test is successfully completed, you can verify the results in the Result ParameterSet view. (As you can see in this example, output results will come out in no time if there is no input parameter.)

Model Testing

  1. Select Connect from the model editor's palette, and then establish connection from the start, OpenApi Invoke, to the end nod.

  2. Right-click on the model editor to display a popup menu. Select Test from the popup menu to test a model.

  3. The test results are displayed in the Result ParameterSet window when completed.

X-UP Project Creation

  1. Go to [File > New > X-UP Project] and run the New X-UP Project Wizard.

  2. Enter the desired name into the [Project Name] field and click the [Finish] button.

  1. Verify that the X-UP project was created as shown in the image below.

Model Development Using X-UP Invoke

This section describes the development method for calling an X-UP model deployed on a WAS using an automation model.

Please refer to Model Deployment on an X-UP Server for deployment methods.

An automation model's X-UP Invoke development stages described in this section are as follows:

X-UP Project Creation

  1. Go to [File > New > X-UP Project] and run the New X-UP Project Wizard.

  2. Enter the desired name into the [Project Name] field and click the [Finish] button.

  1. Verify that the X-UP project was created as shown in the image below.

Automation Model and X-UP Invoke Creation

  1. Go to [File > New > X-UP Automation Model] and run the New Model Wizard.

  2. Enter the desired name into the [Model Name] field and click the [OK] button.

  1. The below screen will be displayed when the New Model Wizard is completed.

  2. Select [X-UP] from the invokes on the palette, and then click the editor to create an X-UP invoke.

  3. Double-click the generated X-UP invoke, or click the [Properties] tab. Click the [X-UP ] icon to start the wizard.

Data Source Creation and Properties Setup

  1. Click the [Create New DataSource] button from the X-UP Model List Wizard.

  1. Define a new data source in the New DataSource Wizard. Enter each field value as follows, and click the [Test Connection] button. Verify that a connection is properly established to the datasource.

  2. Click the [Finish] button when complete.

Field Name

Field Value

Name

‘XUP_REMOTE’

Enter a value that does not overlap with any other data source name.

Description

‘remote xup server’

Enter a brief data source description.

ServerURL

‘http://host:port/xup/FrontControllServlet.do’

Enter the URL of a server that can load data sources.

Charset

‘UTF-8’

Character encoding.

Timeout

‘10000’

Maximum time to maintain connection with a server.

Parameters

Enter the parameter value for passing.

Verify that the data source was successfully designated as XUP_REMOTE.

1Select a domain and model to be called.

2Verify the model's input and output parameter information.

3Click the [OK] button to end the wizard.

  1. You can verify whether the input and output parameters were successfully generated after clicking the [OK] button.

Invoke Testing

  1. Select [InvokeInfo] from the X-UP invoke's properties menu, and then click to start the test.

  1. When the test is successfully completed, you can verify the results in the Result ParameterSet window.

Model Testing

  1. Select [Connect] from the model editor palette, and then connect the start and end nodes to the X-UP invoke.

  2. Right-click on the model editor to display a popup menu. Select [Test] from the popup menu to test a model.

    The test results are displayed in the Result ParameterSet window when completed.

Model Development Using OData Invoke

This section describes the method for developing an automation model that uses an OData invoke.

SAP's NetWeaver Gateway demo site is used in this example.
The demo site is located at the following URL:

https://sapes1.sapdevcenter.com

Before starting, you must receive authentication to use the SAP NetWeaver Gateway demo system. Please refer to the following URL for detailed authentication information.

http://scn.sap.com/docs/DOC-40986

An automation model's OData Invoke development stages described in this section are as follows:

X-UP Project Creation

  1. Go to [File > New > X-UP Project] and run the New X-UP Project Wizard.

  2. Enter the desired name into the [Project Name] field and click the [Finish] button.

  1. Verify that the X-UP project was created as shown in the image below.

Automation Model and OData Invoke Creation

  1. Go to [File > New > X-UP Automation Model] and run the New Model Wizard.

  2. Enter the desired name into the [Model Name] field and click the [OK] button.

  1. The below screen will be displayed when the New Model Wizard is completed.

  1. Select [OData] from the invokes on the palette, and then click the editor to create an OData invoke.

Data Source Creation and Properties Setup

  1. Double-click the generated OData invoke, or click the [Properties] tab. Click the [OData] icon to start the wizard.

  1. Click the [Create New DataSource] button from the Invoke OData Wizard.

  1. Define a new data source on the New DataSource page. Enter each field value as follows, and click the [Test Connection] button. Verify that a connection is properly established to the datasource.

  1. Click the [Finish] button after verifying the connection.

Field Name

Field Value

Name

'ODATA_GW' - Enter a value that does not overlap with any other data source name.

Type

Select a vendor type that provides SAP OData. (SAP supported)

Host

'sapes1.sapdevcenter.com' - Enter the NetWeaver Gateway demo system URL.

Port

'443' - Enter the port information.

User ID

User account for SAP NetWeaver Gateway access.

User PW

User password for SAP NetWeaver Gateway access.

Client

Client information to be used in a login account.

Authentication

'Basic' - Authentication method.

Format

Default data format used for 'ATOM' OData communication.

Use SSL

'true' - SSL usage setting.

  1. Select [ODATA_GW] as the datasource type, and then click the [Service List] button to call the service list registered on the server.

  1. Select a service to be called from the service list results to verify the EntitySet and FunctionImport information exposed to the respective service. You can also check parameter information regarding the I/O.

  1. Click the [OK] button, and then select a service.

  1. Drag the item to be run from the selected service’s items and drop it into Operations.

  2. The information appears simultaneously in the SAP RFC and X-UP parameter formats.

  3. Click the [Test] button and set an input parameter value in the Define Input Value Wizard. Then click the [Finish] button to verify that the data is properly displayed.

The HTTP method available for EntitySet () and FunctionImport () is automatically bound.

  1. You can verify that the input and output parameters were generated after clicking the [OK] button.

Invoke Testing

  1. The OData invoke's input and output parameters are generated based on its test results.

  2. Select [InvokeInfo] from the OData invoke's properties menu, and then click [] to start the test.

  1. When the Define Input Value Wizard is displayed, input the test value entered in the Properties menu, and then click the [Finish] button.

  2. When the test is successfully completed, you can verify the results in the Result ParameterSet window.

Model Testing

  1. Select [Connect] from the model editor palette, and then connect the start and end nodes to the OData invoke.

  2. Right-click on the model editor to display a popup menu. Select [Test] from the popup menu to test a model.

  3. The test results are displayed in the Result ParameterSet window when completed.

Data Processing Using the DataSet Row Loop Function

This section describes the DataSet Row Loop function for running iterative business logic a number of times equal to the number of datasets.

In this example, FLIGHT_LIST will be retrieved using an SAP RFC invoke, and a new dataset will be created with that satisfies certain conditions.

The development stages described in this section for an automation model that uses the DataSetRowLoop function are as follows:

X-UP Project Creation

  1. Go to [File > New > X-UP Project] and run the New X-UP Project Wizard.

  2. Enter the desired name into the [Project Name] field and click the [Finish] button.

  1. Verify that the X-UP project was created as shown in the image below.

Automation Model Creation

  1. Go to [File > New > X-UP Automation Model] and run the New Model Wizard.

  2. Enter the desired name into the [Model Name] field and click the [OK] button.

  1. The below screen will be displayed when the New Model Wizard is completed.

SAP RFC Logic Creation for Input Parameters

  1. Select [SAP RFC] from the invokes on the palette, and then click the editor to create an SAP RFC invoke.

  1. Double-click the generated SAP RFC invoke, or click the [Properties] tab. Click the [SAP RFC] icon to start the wizard.

  1. Click the [Create New DataSource] button from the Invoke SAP RFC Wizard.

  1. Define a new data source on the New DataSource page. Enter each field value as follows, and click the [Test Connection] button. Verify that a connection is properly established to the datasource.

  2. Click the [Finish] button when complete.

INCLUDE_ERROR(ELEMENT_REMOVED)

  1. Select [SAP RFC] as the data source type, and click the [Get Function List] button to call the function list registered on a server.

  2. Wildcard (*) search is possible when using [Search Group].

  1. When you select a function to be called from the function list search results, its input and output parameter information can be verified.

  2. The information appears simultaneously in the SAP RFC and X-UP parameter formats.

  3. Click the [Test] button and set an input parameter value in the Define Input Value Wizard. Then click the [Finish] button to verify that the data is properly displayed.

  1. You can verify that the input and output parameters were generated after clicking the [OK] button.

DataSetRowLoop Function Creation and Event Inclusion

  1. Select [DataSetRowLoop] from the functions on the palette, and then click the editor to create a DataSetRowLoop function.

  1. Use the [Connect] function to connect FLIGHT_LIST1, the SAP RFC Invoke's output parameter, to the DataSetRowLoop function's input parameter.

  1. Right-click the DataSetRowLoop function, select [Add Event], and then click [loopEvent] to add an even.

Output Parameter Setup Using a UserMethod Function

  1. Add a UserMethod function between the events and connect the function and events.

  1. Connect the rowIndex and dataset parameters (automatically generated as event outputs) to the UserMethod function's input parameter.

  1. Select and add a dataset from the palette to set the output parameter, and then connect to the UserMethod function's output parameter.

  1. Change the name of the generated dataset to FILTERED_FLIGHT_LIST.

  1. Add the FILTERED_FLIGHT_LIST dataset's schema as follows:

Name

Type

Size

AIRLINE

string

20

CONNECTIONID

int

4

FLIGHTDATE

date

8

  1. double-click the UserMethod function and enter the following source code into the automatically-moved logic class.

If an error occurs in the DataTypes section, import the com.tobesoft.xplatform.data.datatype.DataType class.

public void userMethod(ParameterSet globalParameterSet, EuserMethodParameters eps) throws AutomationFailException {
	DataSet filteredDataSet = globalParameterSet.getDataSet("FILTERED_FLIGHT_LIST");

	DataSet dataset = eps.getDataSet();
	int month = (dataset.getDateTime(0, "FLIGHTDATE").getMonth());
	// data filter
	if(month == 4) {
		int row = filteredDataSet.newRow();
		filteredDataSet .set(row, "AIRLINE", dataset.getString(0, "AIRLINE"));
		filteredDataSet .set(row, "CONNECTID", dataset.getInt(0, "CONNECTID"));
		filteredDataSet .set(row, "FLIGHTDATE", dataset.getString(0, "FLIGHTDATE"));
	}
}

Model Testing

  1. Select [Connect] from the model editor palette, and then connect the SAP RFC invoke, DataSetRowLoop function, and start and ends nodes.

  2. Right-click on the model editor to display a popup menu. Select [Test] from the popup menu to test a model.

Data Processing Using the Quick Merge Function

This section describes the Quick Merge function, which amalgamates two datasets obtained from multiple invokes or functions to create a new dataset.

Two datasets is the standard, and the datasets are amalgamated through sort merge or hash join algorithms.

The development stages described in this section for an automation model that uses the Quick Merge function are as follows:

X-UP Project Creation

  1. Go to [File > New > X-UP Project] and run the New X-UP Project Wizard.

  2. Enter the desired name into the [Project Name] field and click the [Finish] button.

  1. Verify that the X-UP project was created as shown in the image below.

Automation Model and Quick Merge Function Creation

  1. Go to [File > New > X-UP Automation Model] and run the New Model Wizard.

  2. Enter the desired name into the [Model Name] field and click the [Finish] button.

  1. The below screen will be displayed when the New Model Wizard is completed.

  1. Select [Quick Merge] from the functions on the palette, and then click the editor to create a quick merge function.

Dataset Creation for Amalgamation

  1. Select [Dataset] from the palette, and then click the editor.

  2. The default name for a generated dataset is DataSet. Change the name and alias to DS_BOOK.

  1. Click the [] button under [Schema] in the properties, and add the following column information.

Dataset Name

DS_BOOK

Column Info

Name

Type

Size

id

int

10

book_name

string

255

author

string

255

  1. Connect DS_BOOK and the merge function using the [Connect] button on the palette.

  2. Create another dataset following the aforementioned procedure, and change the name and alias to DS_AUTHOR.

  3. Click the [] button under [Schema] in the properties, and add the following column information.

Dataset Name

DS_AUTHOR

Column Info

Name

Type

Size

no

int

10

name

string

255

work

string

255

  1. Connect DS_AUTHOR and the merge function using the [Connect] button on the palette.

Amalgamation Logic Setup

  1. Double-click the quick merge function from the editor, or click the [Properties] tab. Click the [Quick Merge] icon to start the wizard.

  1. The two input datasets are set for merging by default. Set the key columns as "book_name" for DS_BOOK and "work" for DS_AUTHOR. The other items are set to their default values.

  1. Click the [Test] button in the Quick Merge Wizard to test the amalgamation logic.

  1. Enter the following values into [Define Input Value], and then click the [Finish] button.

DS_BOOK

Action

id

book_name

author

INSERT

10

Java Development with Ant

Erik Hatcher

INSERT

20

being digital

Nicholas Negroponte

INSERT

30

Visualize This

Nathan Yau

INSERT

40

Data Structures in C

Chun In-gook

INSERT

50

HTML : the comlete reference

Thomas A

INSERT

60

Search & Destroy: Why You Can't Trust Google Inc

Scott Cleland

DS_AUTHOR

Action

id

name

work

INSERT

1

Tomas A

HTML : the comlete reference

INSERT

2

Tomas A

Global Sourcing Logistics

INSERT

3

Tomas A

Elements Of Distribution Theory

INSERT

4

Erik Hatcher

Java Development wth Ant

INSERT

5

Erik Hatcher

Lucene in Action

INSERT

6

Susan M. Weinschenk

Neuro Web Design: What makes them click?)

INSERT

7

Scott Cleland

Search & Destroy: Why You Can't Trust Google Inc

Function Testing

  1. The output parameter is generated based on test results.

  2. Select [InvokeInfo] from the quick merge function's properties menu, and then click [] to start the test.

  3. Follow the same procedure from the above "Amalgamation Logic Setup" by clicking the [Test] button in the wizard. The results can be verified when the test is completed.

  4. You can verify the results in the Result ParameterSet view when testing is successfully completed.

Invoke Testing

  1. Select [Connect] from the model editor palette, and then connect the start and end nodes to the quick merge function.

  2. Right-click on the model editor to display a popup menu. Select [Test] from the popup menu to test a model.

  3. Enter the same test data from "Function Testing" and conduct the test.

  4. The test results are displayed in the Result ParameterSet window when completed.

Data Processing Using the Merge Function

This section describes the Merge function, which amalgamates datasets obtained from multiple models to create a new dataset.

The amalgamation model development stages described in this section are as follows:

X-UP utilizes an internal memory database system to implement amalgamation models.. Therefore, the memory and performance of a WAS operating an X-UP Server can be affected when models that output large amounts of data are amalgamated.

X-UP Project Creation

  1. Go to [File > New > X-UP Project] and run the New X-UP Project Wizard.

  2. Enter the desired name into the [Project Name] field and click the [Finish] button.

  1. Verify that the X-UP project was created as shown in the image below.

Automation Model and Merge Function Creation

  1. Go to [File > New > X-UP Automation Model] and run the New Model Wizard.

  2. Enter the desired name into the [Model Name] field and click the [Finish] button.

  1. The below screen will be displayed when the New Model Wizard is completed.

  1. Select [Merge] from the functions on the palette, and then click the editor to create a merge function.

Dataset Creation for Amalgamation

  1. Select [Dataset] from the palette, and then click the editor.

  2. The default name for a generated dataset is DataSet. Change the name and alias to DS_BOOK.

  1. Click the [] button under [Schema] in the properties, and add the following column information.

Dataset Name

DS_BOOK

Column Info

Name

Type

Size

id

int

10

book_name

string

255

author

string

255

  1. Connect DS_BOOK and the merge function using the [Connect] button on the palette.

  2. Create another dataset following the aforementioned procedure, and change the name and alias to DS_AUTHOR.

  3. Click the [] button under [Schema] in the properties, and add the following column information.

Dataset Name

DS_AUTHOR

Column Info

Name

Type

Size

no

int

10

name

string

255

work

string

255

  1. Connect DS_AUTHOR and the merge function using the [Connect] button on the palette.

Amalgamation Logic Setup

  1. Double-click the merge function from the editor, or click the [Properties] tab. Click the [Merge] icon to start the wizard.

  1. Click [Create Default Merging SQL] to generate a basic amalgamation logic in the SQL editor.

  2. Modify the amalgamation logic as follows:

$r_title(Before changes)
select 
	a.id,
	a.book_name,
	a.author,
	b.no,
	b.name,
	b.work
from
DS_BOOK a, DS_AUTHOR b
$r_title(After changes)
select 
	a.id,
	a.book_name,
	a.author,
	b.no,
	b.name,
	b.work
from
DS_BOOK a, DS_AUTHOR b
where a.book_name = b.work

  1. Click the [Test] button in the SQL Editor to test the amalgamation logic.

  2. Enter the following values into [Define Input Value], and then click the [Finish] button.

DS_BOOK

Action

id

book_name

author

INSERT

10

Java Development with Ant

Erik Hatcher

INSERT

20

being digital

Nicholas Negroponte

INSERT

30

Visualize This

Nathan Yau

INSERT

40

Data Structures in C

Chun In-gook

INSERT

50

HTML : the comlete reference

Thomas A

INSERT

60

Search & Destroy: Why You Can't Trust Google Inc

Scott Cleland

DS_AUTHOR

Action

id

name

work

INSERT

1

Tomas A

HTML : the comlete reference

INSERT

2

Tomas A

Global Sourcing Logistics

INSERT

3

Tomas A

Elements Of Distribution Theory

INSERT

4

Erik Hatcher

Java Development wth Ant

INSERT

5

Erik Hatcher

Lucene in Action

INSERT

6

Susan M. Weinschenk

Neuro Web Design: What makes them click?)

INSERT

7

Scott Cleland

Search & Destroy: Why You Can't Trust Google Inc

Function Testing

  1. The output parameter is generated based on test results.

  2. Select [InvokeInfo] from the merge function's properties menu, and then click [] to start the test.

  3. Follow the same procedure from the above "Amalgamation Logic Setup" by clicking the [Test] button in the SQL editor. The results can be verified when the test is completed.

  4. You can verify the results in the Result ParameterSet view when testing is successfully completed.

Model Testing

  1. Select [Connect] from the model editor palette, and then connect the start and end nodes to the merge function.

  2. Right-click on the model editor to display a popup menu. Select [Test] from the popup menu to test a model.

  3. Enter the same test data from "Function Testing" and conduct the test.

  4. The test results are displayed in the Result ParameterSet window when completed.

Data Processing Using the XML Parser Function

This section describes how to easily generate datasets or primitive-type data from XML data using the XML Parser function.

Refer to the section Sample XML Required for the XML Parser Function for the XML used in this example.

The development stages described in this section for an automation model that uses the XML Parser are as follows:

X-UP Project Creation

  1. Go to [File > New > X-UP Project] and run the New X-UP Project Wizard.

  2. Enter the desired name into the [Project Name] field and click the [Finish] button.

  1. Verify that the X-UP project was created as shown in the image below.

Automation Model and XML Parser Function Creation

  1. Go to [File > New > X-UP Automation Model] and run the New Model Wizard.

  2. Enter the desired name into the [Model Name] field and click the [OK] button.

  1. The below screen will be displayed when the New Model Wizard is completed.

  1. Select [XML Parser] from the functions on the palette, and then click the editor to create an XML parser.

Defining XML Parsing Rules

  1. Double-click the XML parser, or click the [Properties] tab. Click the [XML Parser] icon to start the XML Parser Wizard.

  1. Copy the XML data from the section Sample XML Required for the XML Parser Function for data input.

  2. Paste the XML strings into the [XML Content] section of the XML Parser wizard.

  3. The XML is displayed in [XML Content] as shown below. Click the [Pretty View] button for a more organized view.

  4. In addition, the XML is displayed in tree form in the [Parser Info] section at the bottom.

  1. Drag the PLANT node iterated in ParseInfo and drop it into the [Parse List] to parse the data.

  2. Alternatively, you can click the [Add] button in the upper-left corner by the [Parse List].

  3. When the node is added to the [Parse List], the [XPath, Const Column, Condition, and Option] tabs become active next to the [Parse Info].

  4. The selected node is automatically assigned to [XPath], and child nodes are included. The information is converted into a dataset.

Field Name

Field Value

XPath

ROOT xpath for the xml parsing.

Const column

If XPath selects an iterative node, you can specify the Const Column area of a dataset.

Condition

XPath condition.

Only nodes that satisfy the condition are designated as the output.

Options

If a redundant node name exists with respect to one parse info that corresponds to the [Parse List], the node is created with a single name via a delimiter.

The iterative PLANT node can be dragged and dropped into [XPath].

  1. Click the [Test] button to verify the results in the [Preview] area.

  1. A dataset named PLANT will be created as an output parameter when the [OK] button is clicked.

  2. The dataset schema is configured with the name of the child node that corresponds to XPath.

Function Testing

  1. Select [ParserInfo] from the XML parser's properties menu, and then click [] to start the test.

  1. The XML that was used to define XML parsing rules is automatically entered when the Define Input Value wizard is executed.

  2. Click the [Finish] button.

  1. When the test is successfully completed, you can verify the results in the Result ParameterSet window.

Model Testing

  1. Select [Connect] from the model editor palette, and then connect the start and end nodes to the XML parser.

  2. Right-click on the model editor to display a popup menu. Select [Test] from the popup menu to test a model.

The test results are displayed in the Result ParameterSet window when completed.