Вы находитесь на странице: 1из 28

BSSV Notes

1. There are 2 type of BSSVs.


a. Internal BSSV : Code is not exposed to outside world, Contains main logic
b. Published BSSV: Exposed to outside world, Communicate with internal BSSV

2. Components of Internal BSSV.


a. Internal Value Object (VO):
i. JDE compatible data types.
ii. All Getters & Setters methods
iii. Name should contain word "internal" (EX. InternalAddAddressBook....)
iv. Name should follow database operation type
b. Business Service (Internal Business Service):
i. This contains actual logic or operation
ii. Word "processor" is used in the name

3. Components of Published BSSV.


a. Published Value Object (VO):
i. This contains actual logic or operation
ii. Generic to JDE data type transformation should be done here
b. Published BSSV:
i. Takes input from outside and call to internal BSSV
ii. Name should contain word "manager" .

Practical Example
1. Create a table as follows:
2. Create Internal Business Service Object (J55TBLE)

a. Create JDE BSSV Object

b. Open BSSV in JDev

c. Create Internal Value Object (VO)

Follow all step as we have created published VO (last wizard from looks like as below)
d. Select all needed parameters and generate accessors.

3. Create a Published BSSV.

a. JDE BSSV object created

b. BSSV opened in JDeveloper


4. Create Published Value Object (VO)

a. Right Click on JDeveloper Project

b. Select the Database Value Object Class (as follows)


c. Follow the following steps:
The VO will be created as in the attached file

d. Generate the accessors for the for the members ( right click on white space and select
"Generate Accessors")
e. Select members for which you want to build accessors ( I selected all):
The file becomes:

The difference is: Right side shows new code for getters and setters functions, whereas there are not
such functions on left side.
f. Now pass value from published VO members to internal VO members.

The mapping between the published value object and the internal value object takes place in the
published value object. You create a method for mapping fields from the published value object to the
corresponding fields of the internal value object.

If you call the Formatter utility or a business service utility when mapping data from published to
internal value objects, Oracle recommends that you create a method named mapFromPublished that
returns an E1MessageList. The mapFromPublished method takes at a minimum the internal value object
as a parameter. This method holds all of the mappings between the published value object and the
internal value object. If a message could be returned to the published business service, you should
create a method for mappings. You should always create a method to return messages when you call a
business service utility or the Formatter utility during mapping. If no messages would be returned from
mappings, you can have the method return void.

Write the follow code in "Published VO" and import all required libraries:

// Map Internal parameters from published parameters

public E1MessageList mapfromPublished(IContext context,


AddF55TBLEInternal internalVO){
E1MessageList message = new E1MessageList();

//set all internal VO attributes based on external VO passed in

if (this.getDocumentOrderInvoiceE()!= null)

internalVO.setF55TBLE_DOCO(new
MathNumeric(this.getDocumentOrderInvoiceE()));

internalVO.setF55TBLE_KCOO(this.getCompanyKeyOrderNo());

internalVO.setF55TBLE_DCTO(this.getOrderType());

internalVO.setF55TBLE_URCD(this.getUserReservedCode());

if(this.getUserReservedNumber()!=null)

internalVO.setF55TBLE_URAB(new MathNumeric
(this.getUserReservedNumber()));

if(this.getUserReservedAmount()!=null)

internalVO.setF55TBLE_URAT(new MathNumeric
(this.getUserReservedAmount()));

internalVO.setF55TBLE_EV01(this.getEverestEventPoint01());

return (message);

Imported statements:

import oracle.e1.bssv.J55TBLE.valueobject.AddF55TBLEInternal;

import oracle.e1.bssvfoundation.base.IContext;

import oracle.e1.bssvfoundation.util.E1MessageList;

import oracle.e1.bssvfoundation.util.MathNumeric;
5. Create Business Service class under J55TBLE Project in JDeveloper.

a. Follow the steps:


b. Create a database call in Processor
c. Change the Input VO Type to Internal VO Type
d. Create a BSFN call to get audit information under " insertToF55TBLE" and map the fields.
Select all needed Parameters
Change VO type for BSFN Call and correct setters:
6. Create Published Business Service Class under JP55TBLE project in JDev.
The file got created as :

Now make the following changes:

7. Create a Test Class for testing


8. Run test class and test the BSSV

Initially there is no record in the table F55TBLE.


the message pane shows that there is not error.
We have a record in the table F55TBLE.

Вам также может понравиться