Take a survey

Developing Components > Creating Components That Use Custom Data Types > Testing the bank component

Testing the bank component
After you deploy the bank component to LiveCycle ES, you can test it by creating a new process that uses it. Although this section does not explain all the concepts involved in creating a process, it provides the basic concepts for you to create a simple process that uses the bank component. For information about creating a process, see Creating Your First LiveCycle ES Application at http://www.adobe.com/go/learn_lc_firstApplication.
The following illustration shows an example process named CreateBankAccount that creates a new customer, creates a new account, and then emails a message that specifies the new customer and account identifier value. The email component created in the previous section is used to email a message to the user. For information, see Creating Your First Component.
The following table describes the operations that are used within this process.
 
Defining values for the createCustomer operation
The following illustration shows the property editor that corresponds to the createCustomer operation.
Notice that these input values correspond to the fields that are located in the Customer class. For information, see Defining the Customer class.
The createCustomer operation returns a string value that represents the customer identifier value. This value is stored in a string process variable named customerId. For information about creating process variables, see LiveCycle Workbench ES Help.
Defining values for the createAccount operation
The following illustration shows the property editor that corresponds to the createAccount operation.
Notice that these input values correspond to the fields that are located in the AccountInfo class. For information, see Defining the Account class.
The customer identifier input value is assigned the value of the customerId process variable. The createAccount operation returns a string value that represents the account identifier value. This value is stored in another string process variable named accountId.
Defining values for the setValue operation
The setValue operation assigns a string process variable named outputResult with the value of customerId and accountID. The following XPath expression is used to concatenate these string values together:
	concat( "The customer ID is ", /process_data/@customerId, 
	"The bank account IDs ", /process_data/@accountId)
The following illustration shows the mapping property editor that corresponds to the SetValue operation.
Defining values for the send operation
The send operation (which belongs to the email component created in the previous section) emails the value of the outputResult process variable to the specified email recipient. For information about the send operation, see Creating Your First Component.
The following illustration shows the property editor that corresponds to the send operation.
*To create a process that uses the bank component:
1.
Select File > New Process.
2.
Type CreateBankAccount for the process name and accept the default settings.
3.
In the Services view, drag the CreateCustomer, CreateAccount, SetValue, and Send operations onto the process diagram (these operations are shown in the sample process introduced in this section).
4.
Click the Properties view and confirm that default property editors have been assigned to each parameter. Enter values in the property editor.
5.
Note: The process created in this section is named CreateBankAccount and contains one operation named invoke. The application logic to programmatically invoke this process is the same as the application logic to invoke the SendMail process. For information, see Invoking the SendMail process.
 

 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/livecycle/es/sdkHelp/programmer/sdkHelp/componentCreatingMultiple.159.16.html