Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
31 views
14 pages
BW406 25 LabK Using Java Code
Uploaded by
benlama
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download
Save
Save BW406_25_LabK_Using_Java_Code For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
31 views
14 pages
BW406 25 LabK Using Java Code
Uploaded by
benlama
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Carousel Previous
Carousel Next
Download
Save
Save BW406_25_LabK_Using_Java_Code For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 14
Search
Fullscreen
ot Lab K: Using Java Code Lab K Using Java Code Overview In this lab you will examine the various ways in which Java code can be integrated into your BusinessWorks solution. You will first import the JMS Java code into your application so you can close the Java project you had created earlier. Objectives 18 Importing Bxisting Code, page 360 = Get OrderID and Price, page 364 Prerequisites ‘= The following software installed and configured on your EDUCLT machine: @ TIBCO ActiveMatrix BusinessWorks 6.2 1& Previous lab has been completed Directions = Complete the exercises that follow TIBCO Software Inc. Page 359‘BW406: Developing Solutions with TIBCO Active Matrix BusinessWorks™ 6.x 7 -_ Pa Lab K - Exercise 1: Importing = Existing Code - —— tw Overview Im this exercise you will import the existing JMS code into your application ~ Steps 1. Update your application to have a Java nature, 1 Launch Business Studio for workspace: /home/tibco/BNSEDU/myworkspace ‘9 In Project Explorer, browse to ACMEAppModule Rightlick and choose Configure > Convert to Java Project Expand the ACMEAppModule folder © Notice new folders sre and lib have been added [+ & ACMEAppModule @ Processes §B Service Descriptors ‘@ Resources @ Schemas ‘W Module Descriptors 8 ste BA JRE System Library [1.7.0] Bi Plug-in Dependencies Sib @ build properties © The JRE system libraries are also included © Inaddition, there is a new Plug-in Dependencies folder as well ail ble and cae Page 360 TIBCO Education ProgramsLab K: Using Java Code Copy and paste NewOrderACME java program to your application. 1 Expand the Java Project created earlier -JMSNewOrder> sre Right-click on com.tihco.ibedu,jmstest and choose Copy ‘@ IMSNewOrder 4 @ src (iB comiibootibeduyisteal » B NewOrderACMEjava_ © Browse to ACMEAppModule > sre © Right-click on sre folder and click Paste thatthe package and java program have been copied over ‘© There are errors in the code, to be resolved soon 7 ACMEAppModule » @ Processes » IB Service Descriptors ‘@ Resources » <@ Schemas » Module Descriptors sid comtibco.tibedujmstest 6B NewOrderACME java 3. Close the original java project. @ Right-click on JMSNewOrder project, © Choose Close Project “© The project icon changes, indicating it is closed © build properties TIBCO Software Ine. Page 361‘BYV406: Developing Solutions with TIBCO ActiveMatric BusinessWorks™ 6.x. 4. Resolve errors with the imported Java code by adding required dependencies. Browse to ACMEAppModule > Module Descriptors % Double-click Dependencies to open details |: Dependencies Required Modules Specify the ist of Busine mles requ ‘or the operation oft Ose! Required Palettes The list of BusinessWorks palettes required for the ‘operation of this module, GAcMEShared (1.00) | [FAddases) [General Activities [imported Packages ‘Specify packages on which this plug-in depends without explicitly identifying their originating plug- in "In Imported Packages, click Add. In the pop-up window, type javax,j the list of packages appears ~ Select javax.jms (1.1.100) and click OK Similarly, add com.tibeo.tibjms.naming.tibjmsnaming (63.100) imported Packages ‘Specity packages on which this plug-in depends without explicitly identifying their originating plug-in, ‘8 javaxjms (1.1100) '|@ Save your changes, and all errors with your Java code should be resolved | Close module properties view Page 362 TIBCO Bdweation ProgramsLab K: Using Java Code 5. Update the project settings and run the Java code. | Attempt to run the Java code that you just imported. © Right-click sre > com.tibco.tibedu.jmstest > NewOrderACME java © Sclect Run As>Java Application _- ‘@ The program runs, but does not send any messages, as it is missing arguments [Pseee: Java NewOrderACME
'= Provide arguments to the program ‘® From the top menu, choose Run > Run Configurations... © Browse to Java Application > NewOrderACME(1) © Choose Arguments tab and enter these arguments cusT1 1001 1 1002 2 a ee ‘CUSTL 1001110022 + $l BusinessWorks Application ‘$I BWApplication @ Eclipse Application @ Eclipse Data Tools F2 Java Applet Apply changes and click Run to test the application again '@- Verify it runs by observing the console window (0} IMSExpiration=(0} INSPriority=(4) *UTE-8"2>
Processes > acmeappmodule © Double-click NewOrderProcess.bwp to open it 2. Adda mapper activity to hold an OrderlD schema element. Drag a Mapper activity and place it between placeOrderOpIn and Log activity © Configure it as follows: © Name: GenerateOrder1D © Input Editor ~ Sclect Input Element and choose Create New Schema aes jae 1B ACMEAppModule i a ——— P| {© Workspace © Current and Dependent Modules © Current Module | bisplay an xSD elements [Elinclude Process Intine Schemas oa ae 2 Page 364 TIBCO Education Programs [xtoreet =.) iM im eee amm mo —l i 7m Se Be Es IF it) IB) 2 Bes 5 bes== Par tag ia a ‘Se Eee Wr a = le! Gs tae i Lab K: Using Java Code 3. Define the new schema to hold the generated OrderID. = Resource Name: Order IDSchema ® Workspace Location: /ACMEAppModule/Schemas © Select MapperInputType ~ Click Add Primitive Element (citcled)/ ~ This adds an element below MapperlaputType ~ Expand it to locate the element + Mapperinput {Mapperinputlypel 4 1B] MapperinputType © Change Blement name to OrderID (Hit enter to apply changes) Resource Name: | OrderiDSchema Workspace Locatic| /ACMEAppModule/Schemas ‘Schema Element + Bi Mapperinput (MapperinputTypel 1H MapperinputType _ fi] Prdend +i (Sting = |[Sting =] 12 Select the MapperInput [MapperInputType] ‘@ Now you can click OK = Save changes TIBCO Software Ine Page 365| ‘BHY406: Developing Solutions with TIBCO ActiveMatrix BusinessWorks™ 6.x 4. Complete the mapper activity to generate a unique Order after the request is received, = For Generate OrderID - Properties, '@ Input for OrderID: concat ("ACME-", $placeOrderOpIn/input /ns :NewOrdexInfo/n: | omerID, "=", format-dateTime(current-dateTime() ," (¥] [¥] [0] (h] {m] [3] ")) ‘GenerateOrderiD-input ust. [concat("ACME-, | ‘SplaceOrderOpin/input/nsNewOrderinfo/nsCustomerD,| ~*, format-dateTime(current-dateTime0,"{YIIMIIDIIh) Emits) Save changes 5.__Add another mapper activity to calculate the TotalAmount after update inventory. ‘= Click Mapper activity and place it between updateltems and Inventory activity = Configure it as follows: @ Name: Caletotalamount ® Input Editor - Select Input Element ~ Choose Create New Schema ~ Resource Name: Total Amount Schema ~~ Workspace Location: /ACMEAppModule/Schemas Resource Name: TotalAmountSchema ‘Workspace Locati’/ACMEAppModule/Schemas Page 366 TIBCO kducation ProgramsLab K: Using Java Code 6, Add the totalAmount element as a decimal type. Choose MapperinputType © Click Add Primitive Element = Change Element name to TotalAmount, Type: Decimal - Double — Hit Enter to apply the changes Resource Name: TotalAmountSchema Workspace Locatic /ACMEAppModule/Schemas Schema Element Tl Mapperinput {MapperlnputType] Bi MapperinputType — | [Decimat_=[Doubte|=]/4 [1 1=] fol Total ‘Browse up to MapperInput [MapperinputType] Click OK and Save changes 7. Calculate the total amount based on prices retumed by update inventory sub-process. = In CaleTotalAmount - Properties > Input ‘& Set TotalAmount using this formula: sum (for $currItem in $Updatertems/input /ne:LinextemsList/ns:LineTtemDetail return $curritem/ns:Quantity * $currItem/ns:Price) © Use mapper check and repair to resolve any namespace mismatch issues [Bg CalcTotalAmount-input ‘$Updateltems/input/ns-LineltemsList/nstLineltemDetail return Scurtitem/nsQuantity * Scuritem/nsPrice) TIBCO Software Inc. Page 367BIV406: Developing Solutions with TIBCO ActiveMatrx business Works™ 6. Update the Log activity to record the total order amount. a Update the Inventory log activity as shown below: Update Message: concat ("Item Inventory Processing Completed, total order amount: « xsd:string ($CalcTotalAmount /Totalamount)) = Use Mapper check and repair to add the string conversion function ty Processing Completed, total 4 order amount: ", ‘xsdstring($CalcTotalAmount/TotalAmount)) 5. Run te solution to vey that OrderiD and TotlAmount are gonented ropaiy. 7 ‘= Inthe top menu of Business Studio '@ Click on Debug icon (shown below) and select 1 BWApplication Aller the BusinessWorks Applicaton starts, Click Debug icon and select 2 NewOrderAcme(1) "= Confirm that both are executed successfully ‘@ Toggle between two consoles using the icon inthe debug console view : mx | Bs 8 By Page 368 TIBCO Education Programs- (gl z E run rin Be Lab K: Using Java Code 10. Examine the details for the generated OrderID and Total Amount ‘= In the debug details window (top left), locate the NewOrderProcess and examine its execution details '@ Click on GenerateOrderID and view Job Data ‘© Confirm that OrderID is generated properly a Ma 8 2T2.| GonerateOrderID » @ iesiersNewOrderRESTChent owt, - » @ services Ordering {bw0a103} - (Ci) Input + @ acmeappmodule NewOrderProce & placeOrderOpin [bw00194.3) - | ~ GenerateOrdeiD (bn 0019883), = loa tow00i945}- one) ‘Click on Updateltems and examine the Output LineltemDetail [1
Export > Studio Projects to Archive © Save as BW406LabK.zip = Exit Business Studio Page 370 TIBCO Education ProgramsLab K: Using Java Code Notes TIBCO Software Ine. Page 371BWA06: Developing Solutions with TIBCC Active Matrix BusinessWorks™ 6:2 Notes eee Page 372 TIBCO Education Programs
You might also like
SAP SD Basic Knowledge
PDF
No ratings yet
SAP SD Basic Knowledge
24 pages
Erp Field Manual Ver1
PDF
No ratings yet
Erp Field Manual Ver1
104 pages
Mass Upload of Purchase Order Release Codes and Release Strategies
PDF
100% (1)
Mass Upload of Purchase Order Release Codes and Release Strategies
22 pages
Erp Field Manual Ver5.2
PDF
No ratings yet
Erp Field Manual Ver5.2
120 pages
SAP - Tips and Tricks For Your End Users
PDF
100% (2)
SAP - Tips and Tricks For Your End Users
51 pages
Sap SD
PDF
No ratings yet
Sap SD
129 pages
User Manual For STO Process
PDF
No ratings yet
User Manual For STO Process
14 pages
Add Line Items Automatically in VA01
PDF
100% (1)
Add Line Items Automatically in VA01
5 pages
Issue: 1. When One Product Is Purchased, System Should Propose 2 or 3 Products As Free Goods
PDF
No ratings yet
Issue: 1. When One Product Is Purchased, System Should Propose 2 or 3 Products As Free Goods
81 pages
Muhammadmansoorali 140910133314 Phpapp02
PDF
No ratings yet
Muhammadmansoorali 140910133314 Phpapp02
518 pages
2 ExtendingDataModel
PDF
No ratings yet
2 ExtendingDataModel
9 pages
Om Day1&2
PDF
No ratings yet
Om Day1&2
71 pages
Inventory Basic Setup Labs v1.2
PDF
No ratings yet
Inventory Basic Setup Labs v1.2
187 pages
Bhargav
PDF
No ratings yet
Bhargav
25 pages
Cds
PDF
100% (1)
Cds
106 pages
Customer Master
PDF
No ratings yet
Customer Master
27 pages
SAPSD - Flow Documentation
PDF
100% (1)
SAPSD - Flow Documentation
80 pages
Batch
PDF
No ratings yet
Batch
157 pages
WBS Creation
PDF
No ratings yet
WBS Creation
39 pages
Import Customizing Steps
PDF
No ratings yet
Import Customizing Steps
12 pages
Lab04 Packaging
PDF
No ratings yet
Lab04 Packaging
21 pages
Important Table, Program and Solution
PDF
No ratings yet
Important Table, Program and Solution
19 pages
BOM-Bill Resource Creation
PDF
No ratings yet
BOM-Bill Resource Creation
4 pages
SAP SD Tcode List - SAPCODES
PDF
No ratings yet
SAP SD Tcode List - SAPCODES
6 pages
BW406 17 LabG Module Properties
PDF
No ratings yet
BW406 17 LabG Module Properties
16 pages
Transaction Codes in SAP SD
PDF
100% (1)
Transaction Codes in SAP SD
6 pages
RSPDN1622684
PDF
No ratings yet
RSPDN1622684
11 pages
IW32 - Change Work Order
PDF
No ratings yet
IW32 - Change Work Order
38 pages
Third Party Order
PDF
No ratings yet
Third Party Order
4 pages
Important Tables For SAP SD Sales and Distribution
PDF
No ratings yet
Important Tables For SAP SD Sales and Distribution
10 pages
PD AP - Basic Extensions and Automation Booster Pack For PD AP
PDF
No ratings yet
PD AP - Basic Extensions and Automation Booster Pack For PD AP
190 pages
Esm Configuration
PDF
No ratings yet
Esm Configuration
33 pages
Sap - MM Faq
PDF
No ratings yet
Sap - MM Faq
29 pages
RSPDN1639236
PDF
No ratings yet
RSPDN1639236
6 pages
Sap SD Tcodes
PDF
No ratings yet
Sap SD Tcodes
11 pages
Sap SD Tcode List - Sapcodes
PDF
No ratings yet
Sap SD Tcode List - Sapcodes
5 pages
Track8 Appendix4a
PDF
No ratings yet
Track8 Appendix4a
4 pages
Auto Industry Demo Script New
PDF
No ratings yet
Auto Industry Demo Script New
10 pages
Sap SD
PDF
No ratings yet
Sap SD
8 pages
SAP SD T-Codes
PDF
No ratings yet
SAP SD T-Codes
6 pages
Sap R3 Quick Ref
PDF
No ratings yet
Sap R3 Quick Ref
10 pages
Spec SRM
PDF
No ratings yet
Spec SRM
5 pages
Product Costing
PDF
100% (1)
Product Costing
146 pages
SAP SD Transaction Codes List
PDF
No ratings yet
SAP SD Transaction Codes List
5 pages
List of Important and Useful Transaction Codes Used in SAP Sales and Distribution
PDF
No ratings yet
List of Important and Useful Transaction Codes Used in SAP Sales and Distribution
5 pages
BDC For Material Master (MM02) - Select Specific Material Master View
PDF
No ratings yet
BDC For Material Master (MM02) - Select Specific Material Master View
4 pages
PS User Manual
PDF
No ratings yet
PS User Manual
81 pages
J05 Materials Management Master Document en de
PDF
No ratings yet
J05 Materials Management Master Document en de
3 pages
Data Types: - Organisational Data - Master Data
PDF
No ratings yet
Data Types: - Organisational Data - Master Data
18 pages
F4311 Edit Line JDEdwards
PDF
No ratings yet
F4311 Edit Line JDEdwards
3 pages
Sap SD Transaction Codes
PDF
No ratings yet
Sap SD Transaction Codes
5 pages
Sales and Distribution Tables
PDF
No ratings yet
Sales and Distribution Tables
13 pages
Sap MM Tcode
PDF
100% (1)
Sap MM Tcode
14 pages
Product Cost by Valuated Sales Order
PDF
No ratings yet
Product Cost by Valuated Sales Order
74 pages