Download presentation
Presentation is loading. Please wait.
Published byRodger Parrish Modified over 9 years ago
1
AWP.TRG.SWCTR-TO4.ADE-CAVE(Lx)-01.00/02.00 Rev. A This document includes data that shall not be duplicated, used, or disclosed – in whole or in part – outside the Government for any purpose other than to the extent provided in contract DG133W-05-CQ-1067. However, the Government shall have the right to duplicate, use, or disclose the data to the extent provided in the contract. This restriction does not limit the Government’s right to use information contained in this data if it is obtained from another source without restriction. The data subject to this restriction are contained in all sheets. Jan. 16, 2007 1 Advanced Weather Interactive Processing System II (AWIPS II) AWIPS Development Environment (ADE) and the Common AWIPS Visualization Environment (CAVE) Module 3: Micro Engine and Scripts
2
AWP.TRG.SWCTR-TO4.ADE-CAVE(Lx)-01.00/02.00 Rev. A This document includes data that shall not be duplicated, used, or disclosed – in whole or in part – outside the Government for any purpose other than to the extent provided in contract DG133W-05-CQ-1067. However, the Government shall have the right to duplicate, use, or disclose the data to the extent provided in the contract. This restriction does not limit the Government’s right to use information contained in this data if it is obtained from another source without restriction. The data subject to this restriction are contained in all sheets. Jan. 16, 2007 2 Module 3: Micro Engine and Scripts Module 3 Objectives Learn Why the Micro Engine Exists and the Role It Plays Understand the Architectural Pattern of the Micro Engine Learn How to Write and Test Micro Engine Scripts Learn How to Extend the Micro Engine by Writing Micro Engine Tasks Learn About Future Evolution of The Micro Engine
3
AWP.TRG.SWCTR-TO4.ADE-CAVE(Lx)-01.00/02.00 Rev. A This document includes data that shall not be duplicated, used, or disclosed – in whole or in part – outside the Government for any purpose other than to the extent provided in contract DG133W-05-CQ-1067. However, the Government shall have the right to duplicate, use, or disclose the data to the extent provided in the contract. This restriction does not limit the Government’s right to use information contained in this data if it is obtained from another source without restriction. The data subject to this restriction are contained in all sheets. Jan. 16, 2007 3 uEngine Task Execution Pattern Breaks Up Execution Into Small Reusable Tasks uEngine Vision –Create an execution framework for generating custom products on demand –Customer systems can request products by script requests over a network –The script performs small general units of work that get chained together to produce a customer product
4
AWP.TRG.SWCTR-TO4.ADE-CAVE(Lx)-01.00/02.00 Rev. A This document includes data that shall not be duplicated, used, or disclosed – in whole or in part – outside the Government for any purpose other than to the extent provided in contract DG133W-05-CQ-1067. However, the Government shall have the right to duplicate, use, or disclose the data to the extent provided in the contract. This restriction does not limit the Government’s right to use information contained in this data if it is obtained from another source without restriction. The data subject to this restriction are contained in all sheets. Jan. 16, 2007 4 uEngine Task Execution Pattern Breaks Up Execution Into Small Reusable Tasks uEngine Implementation –Runs out of an SOA services “ProductSrv” and “AutoBldSrv” that are attached for I/O to ESB endpoints –uEngine executes scripts in a XML language similar to “ANT” –Utilizes the open source project “common-digester” for high- performance XML to object parsing
5
AWP.TRG.SWCTR-TO4.ADE-CAVE(Lx)-01.00/02.00 Rev. A This document includes data that shall not be duplicated, used, or disclosed – in whole or in part – outside the Government for any purpose other than to the extent provided in contract DG133W-05-CQ-1067. However, the Government shall have the right to duplicate, use, or disclose the data to the extent provided in the contract. This restriction does not limit the Government’s right to use information contained in this data if it is obtained from another source without restriction. The data subject to this restriction are contained in all sheets. Jan. 16, 2007 5 uEngine Used Out of Two SOA Services IngestSrvPersistSrvIndexSrvProductSrv NotifySrvAutoBldSrvSubscribeSrvColabrateSrvGridEditSrv CAVE Visualization Client ADE 1.0 Services Mbean JMX Remote Service Management Client ASCIIIngestSrv GridIngestSrv SBNSatIngestSrv RadarSrv LightingSrv ProductSrv FileSystem RDBMS via JDBC Lucene – Reverse Idx Spatial R-Tree uEngine Scripts Grid Diagnostics SubscriptionNotify AlertNotify Data Rendering Notify Response CAVE Scripting Wx Drawing Wx Warning Data Interrogation Delivered T03 Delivered T05 Enterprise Service Bus – HTTP, JMS, Virtual Memory, File Endpoints Dissemination AdapterSrv Mbean Exec Adapter Hydro Adapter Jini Adapter Hydro Visualization Delivered T04 uEngine Scripts Services Independent of End Points
6
AWP.TRG.SWCTR-TO4.ADE-CAVE(Lx)-01.00/02.00 Rev. A This document includes data that shall not be duplicated, used, or disclosed – in whole or in part – outside the Government for any purpose other than to the extent provided in contract DG133W-05-CQ-1067. However, the Government shall have the right to duplicate, use, or disclose the data to the extent provided in the contract. This restriction does not limit the Government’s right to use information contained in this data if it is obtained from another source without restriction. The data subject to this restriction are contained in all sheets. Jan. 16, 2007 6 uEngine Design Concepts Idea originated out of ANT files –Think of uEngine tasks as being similar to ANT tasks inside –Most uEngine script tasks are “bodiless” –Simplicity is guiding concept –Tasks get executed from top to bottom in sequence, no controls Added Apache Commons Digester XML parser –Layered on SAX parsing –Improves the performance of XML parsing –Provides rule-based XML to Java Object mapping
7
AWP.TRG.SWCTR-TO4.ADE-CAVE(Lx)-01.00/02.00 Rev. A This document includes data that shall not be duplicated, used, or disclosed – in whole or in part – outside the Government for any purpose other than to the extent provided in contract DG133W-05-CQ-1067. However, the Government shall have the right to duplicate, use, or disclose the data to the extent provided in the contract. This restriction does not limit the Government’s right to use information contained in this data if it is obtained from another source without restriction. The data subject to this restriction are contained in all sheets. Jan. 16, 2007 7 uEngine Design Concepts Each Task defines its own parsing rules –Rules for a task can be changed with minimal impact on the micro engine –The abstract Task class provides convenience methods for many common rules Class bundle in uEngine identifies tasks –uEngine able to identify tasks included within its jar –Enables new tasks to be added with a system build –New tasks are “pluggable” – they do not require modifications to the existing uEngine
8
AWP.TRG.SWCTR-TO4.ADE-CAVE(Lx)-01.00/02.00 Rev. A This document includes data that shall not be duplicated, used, or disclosed – in whole or in part – outside the Government for any purpose other than to the extent provided in contract DG133W-05-CQ-1067. However, the Government shall have the right to duplicate, use, or disclose the data to the extent provided in the contract. This restriction does not limit the Government’s right to use information contained in this data if it is obtained from another source without restriction. The data subject to this restriction are contained in all sheets. Jan. 16, 2007 8 Commons Digester <query name=“grid_type” value=“22” /> uEngine Task Execution Pattern Common-Digester Based XML Rule Driven Parsing > ProductSrv +receive() {String output = (String) myLaunch.parseAndRun(msg);} > Launcher +parseAndRun() {action = DigesterSingleton.parse(reader); action.executeTasks();} > Action +executeTasks() {Task task = i.next(); task.init(retObj); retObj = task.execute();}
9
AWP.TRG.SWCTR-TO4.ADE-CAVE(Lx)-01.00/02.00 Rev. A This document includes data that shall not be duplicated, used, or disclosed – in whole or in part – outside the Government for any purpose other than to the extent provided in contract DG133W-05-CQ-1067. However, the Government shall have the right to duplicate, use, or disclose the data to the extent provided in the contract. This restriction does not limit the Government’s right to use information contained in this data if it is obtained from another source without restriction. The data subject to this restriction are contained in all sheets. Jan. 16, 2007 9 <query name=“grid_type” value=“22” /> uEngine Task Execution Pattern Connecting Units of Work Together - ChainDataType termQuery query degribgribMap colorMap Task XML child elements Input ChainDataType Output ChainDataType colorImage colorMap imageOut format fileOutworldFileInfomakeServiceResponse > Task +addRules(Digester) +init(ChainDataType) +ChainDataType execute() Adding a new uEngine Task 1. Extend Task 2. Implement addRules() 3. Implement abstract methods
10
AWP.TRG.SWCTR-TO4.ADE-CAVE(Lx)-01.00/02.00 Rev. A This document includes data that shall not be duplicated, used, or disclosed – in whole or in part – outside the Government for any purpose other than to the extent provided in contract DG133W-05-CQ-1067. However, the Government shall have the right to duplicate, use, or disclose the data to the extent provided in the contract. This restriction does not limit the Government’s right to use information contained in this data if it is obtained from another source without restriction. The data subject to this restriction are contained in all sheets. Jan. 16, 2007 10 uEngine Task Execution Pattern Data Transformation Into Decision Aids - Scripting mathScript
11
AWP.TRG.SWCTR-TO4.ADE-CAVE(Lx)-01.00/02.00 Rev. A This document includes data that shall not be duplicated, used, or disclosed – in whole or in part – outside the Government for any purpose other than to the extent provided in contract DG133W-05-CQ-1067. However, the Government shall have the right to duplicate, use, or disclose the data to the extent provided in the contract. This restriction does not limit the Government’s right to use information contained in this data if it is obtained from another source without restriction. The data subject to this restriction are contained in all sheets. Jan. 16, 2007 11 Writing and Testing uEngine Scripts General Rules –Remember the KISS principle – scripts generally create a single product –Script generally follow the Input-Process-Output (IPO) pattern –Each script starts with a data query – you need to know the data that may available
12
AWP.TRG.SWCTR-TO4.ADE-CAVE(Lx)-01.00/02.00 Rev. A This document includes data that shall not be duplicated, used, or disclosed – in whole or in part – outside the Government for any purpose other than to the extent provided in contract DG133W-05-CQ-1067. However, the Government shall have the right to duplicate, use, or disclose the data to the extent provided in the contract. This restriction does not limit the Government’s right to use information contained in this data if it is obtained from another source without restriction. The data subject to this restriction are contained in all sheets. Jan. 16, 2007 12 Writing and Testing uEngine Scripts A Scripting Example We want a script that will return the latest TAF for Omaha Eppley Airport. The ICAO for Omaha Eppley is KOMA. The data should be returned to the client as a raw TAF record. Analysis In this case, there is no processing to be performed. We simply retrieve the data and return it to the client. Two uEngine tasks are used: –termQuery, which is used to query the data store –makeResponse, which returns the data to the client
13
AWP.TRG.SWCTR-TO4.ADE-CAVE(Lx)-01.00/02.00 Rev. A This document includes data that shall not be duplicated, used, or disclosed – in whole or in part – outside the Government for any purpose other than to the extent provided in contract DG133W-05-CQ-1067. However, the Government shall have the right to duplicate, use, or disclose the data to the extent provided in the contract. This restriction does not limit the Government’s right to use information contained in this data if it is obtained from another source without restriction. The data subject to this restriction are contained in all sheets. Jan. 16, 2007 13 Writing and Testing uEngine Scripts The Basic Tag Formats: –action – represents the script document. Encloses other tags. –termQuery – defines a query to the data store –makeResponse – prepares the data to return to the client
14
AWP.TRG.SWCTR-TO4.ADE-CAVE(Lx)-01.00/02.00 Rev. A This document includes data that shall not be duplicated, used, or disclosed – in whole or in part – outside the Government for any purpose other than to the extent provided in contract DG133W-05-CQ-1067. However, the Government shall have the right to duplicate, use, or disclose the data to the extent provided in the contract. This restriction does not limit the Government’s right to use information contained in this data if it is obtained from another source without restriction. The data subject to this restriction are contained in all sheets. Jan. 16, 2007 14 Writing and Testing uEngine Scripts The Completed Script This Returns the Raw Data to the Client Will Revisit This One on the Lab
15
AWP.TRG.SWCTR-TO4.ADE-CAVE(Lx)-01.00/02.00 Rev. A This document includes data that shall not be duplicated, used, or disclosed – in whole or in part – outside the Government for any purpose other than to the extent provided in contract DG133W-05-CQ-1067. However, the Government shall have the right to duplicate, use, or disclose the data to the extent provided in the contract. This restriction does not limit the Government’s right to use information contained in this data if it is obtained from another source without restriction. The data subject to this restriction are contained in all sheets. Jan. 16, 2007 15 Writing and Testing uEngine Scripts A Script Example In this example, we again retrieve the latest TAF for KOMA, but in this case we will return the decoded report in XML format. Analysis Two additional uEngine tasks are needed here: –decodeAscii, which is used to decode the record –asciiXML, which converts the decoded report to XML format Note: To be useful, the client needs to “understand” the XML formatting.
16
AWP.TRG.SWCTR-TO4.ADE-CAVE(Lx)-01.00/02.00 Rev. A This document includes data that shall not be duplicated, used, or disclosed – in whole or in part – outside the Government for any purpose other than to the extent provided in contract DG133W-05-CQ-1067. However, the Government shall have the right to duplicate, use, or disclose the data to the extent provided in the contract. This restriction does not limit the Government’s right to use information contained in this data if it is obtained from another source without restriction. The data subject to this restriction are contained in all sheets. Jan. 16, 2007 16 Writing and Testing uEngine Scripts The Basic Tag Formats: –decodeAscii – runs the TAF decoder. We will revisit this one later since it utilizes the plug-in pattern in performing the decoding. –asciiXML – converts the decoded TAF to XML. This one also utilizes the plug-in pattern. Note: Neither tag requires that the ascii report type be identified. This is part of the plug-in pattern.
17
AWP.TRG.SWCTR-TO4.ADE-CAVE(Lx)-01.00/02.00 Rev. A This document includes data that shall not be duplicated, used, or disclosed – in whole or in part – outside the Government for any purpose other than to the extent provided in contract DG133W-05-CQ-1067. However, the Government shall have the right to duplicate, use, or disclose the data to the extent provided in the contract. This restriction does not limit the Government’s right to use information contained in this data if it is obtained from another source without restriction. The data subject to this restriction are contained in all sheets. Jan. 16, 2007 17 Writing and Testing uEngine Scripts The Completed Script Will Revisit This One in the Lab
18
AWP.TRG.SWCTR-TO4.ADE-CAVE(Lx)-01.00/02.00 Rev. A This document includes data that shall not be duplicated, used, or disclosed – in whole or in part – outside the Government for any purpose other than to the extent provided in contract DG133W-05-CQ-1067. However, the Government shall have the right to duplicate, use, or disclose the data to the extent provided in the contract. This restriction does not limit the Government’s right to use information contained in this data if it is obtained from another source without restriction. The data subject to this restriction are contained in all sheets. Jan. 16, 2007 18 Writing and Testing uEngine Scripts Summary –Saw two example scripts that work with ASCII data –More examples in the documentation included on the DVD
19
AWP.TRG.SWCTR-TO4.ADE-CAVE(Lx)-01.00/02.00 Rev. A This document includes data that shall not be duplicated, used, or disclosed – in whole or in part – outside the Government for any purpose other than to the extent provided in contract DG133W-05-CQ-1067. However, the Government shall have the right to duplicate, use, or disclose the data to the extent provided in the contract. This restriction does not limit the Government’s right to use information contained in this data if it is obtained from another source without restriction. The data subject to this restriction are contained in all sheets. Jan. 16, 2007 19 BREAK
20
AWP.TRG.SWCTR-TO4.ADE-CAVE(Lx)-01.00/02.00 Rev. A This document includes data that shall not be duplicated, used, or disclosed – in whole or in part – outside the Government for any purpose other than to the extent provided in contract DG133W-05-CQ-1067. However, the Government shall have the right to duplicate, use, or disclose the data to the extent provided in the contract. This restriction does not limit the Government’s right to use information contained in this data if it is obtained from another source without restriction. The data subject to this restriction are contained in all sheets. Jan. 16, 2007 20 Hands-On Micro Engine/Scripts Running the Development Version of EDEX Script Builder Web Page Running a Script Debugging a Script Script Editor Web Page
21
AWP.TRG.SWCTR-TO4.ADE-CAVE(Lx)-01.00/02.00 Rev. A This document includes data that shall not be duplicated, used, or disclosed – in whole or in part – outside the Government for any purpose other than to the extent provided in contract DG133W-05-CQ-1067. However, the Government shall have the right to duplicate, use, or disclose the data to the extent provided in the contract. This restriction does not limit the Government’s right to use information contained in this data if it is obtained from another source without restriction. The data subject to this restriction are contained in all sheets. Jan. 16, 2007 21 Install EDEX on Development Computer To Start EDEX: Double Click the Start ActiveMQ, Start Mule, and Start Tomcat Icons on PC Desktop Linux Users: Start Edex From a Terminal Running EDEX 3 2 1
22
AWP.TRG.SWCTR-TO4.ADE-CAVE(Lx)-01.00/02.00 Rev. A This document includes data that shall not be duplicated, used, or disclosed – in whole or in part – outside the Government for any purpose other than to the extent provided in contract DG133W-05-CQ-1067. However, the Government shall have the right to duplicate, use, or disclose the data to the extent provided in the contract. This restriction does not limit the Government’s right to use information contained in this data if it is obtained from another source without restriction. The data subject to this restriction are contained in all sheets. Jan. 16, 2007 22 Script Builder Web Page AWIPS ADE 0.1 Includes a Web Site That Can Be Used to Build/Debug uEngine Scripts –Does not have an empty editor page; we will use the GRIB Retrieval Page Open the Browser. Navigate to uEngineWeb Test Page.uEngineWeb Click GRIB Retrieval Link. Delete Contents of Blue Box. Enter the Script to Test. Steps:
23
AWP.TRG.SWCTR-TO4.ADE-CAVE(Lx)-01.00/02.00 Rev. A This document includes data that shall not be duplicated, used, or disclosed – in whole or in part – outside the Government for any purpose other than to the extent provided in contract DG133W-05-CQ-1067. However, the Government shall have the right to duplicate, use, or disclose the data to the extent provided in the contract. This restriction does not limit the Government’s right to use information contained in this data if it is obtained from another source without restriction. The data subject to this restriction are contained in all sheets. Jan. 16, 2007 23 Running a Script Click the Get Image button Enter the script into the blue box
24
AWP.TRG.SWCTR-TO4.ADE-CAVE(Lx)-01.00/02.00 Rev. A This document includes data that shall not be duplicated, used, or disclosed – in whole or in part – outside the Government for any purpose other than to the extent provided in contract DG133W-05-CQ-1067. However, the Government shall have the right to duplicate, use, or disclose the data to the extent provided in the contract. This restriction does not limit the Government’s right to use information contained in this data if it is obtained from another source without restriction. The data subject to this restriction are contained in all sheets. Jan. 16, 2007 24 Running a Script: Results This is the TAF. The original formatting is retained, but not reflected on page.
25
AWP.TRG.SWCTR-TO4.ADE-CAVE(Lx)-01.00/02.00 Rev. A This document includes data that shall not be duplicated, used, or disclosed – in whole or in part – outside the Government for any purpose other than to the extent provided in contract DG133W-05-CQ-1067. However, the Government shall have the right to duplicate, use, or disclose the data to the extent provided in the contract. This restriction does not limit the Government’s right to use information contained in this data if it is obtained from another source without restriction. The data subject to this restriction are contained in all sheets. Jan. 16, 2007 25 Running a Script: Example 2 Click the Get Image button Enter the script into the blue box
26
AWP.TRG.SWCTR-TO4.ADE-CAVE(Lx)-01.00/02.00 Rev. A This document includes data that shall not be duplicated, used, or disclosed – in whole or in part – outside the Government for any purpose other than to the extent provided in contract DG133W-05-CQ-1067. However, the Government shall have the right to duplicate, use, or disclose the data to the extent provided in the contract. This restriction does not limit the Government’s right to use information contained in this data if it is obtained from another source without restriction. The data subject to this restriction are contained in all sheets. Jan. 16, 2007 26 Running a Script: Results This is the decoded TAF. XML formatting is hidden by the page rendering.
27
AWP.TRG.SWCTR-TO4.ADE-CAVE(Lx)-01.00/02.00 Rev. A This document includes data that shall not be duplicated, used, or disclosed – in whole or in part – outside the Government for any purpose other than to the extent provided in contract DG133W-05-CQ-1067. However, the Government shall have the right to duplicate, use, or disclose the data to the extent provided in the contract. This restriction does not limit the Government’s right to use information contained in this data if it is obtained from another source without restriction. The data subject to this restriction are contained in all sheets. Jan. 16, 2007 27 Debugging a Script uEngine Will Detect Common Scripting Errors –Invalid XML –Invalid search parameters –Missing tags This Error Caused by an Invalid ( uEngine Script Tag
28
AWP.TRG.SWCTR-TO4.ADE-CAVE(Lx)-01.00/02.00 Rev. A This document includes data that shall not be duplicated, used, or disclosed – in whole or in part – outside the Government for any purpose other than to the extent provided in contract DG133W-05-CQ-1067. However, the Government shall have the right to duplicate, use, or disclose the data to the extent provided in the contract. This restriction does not limit the Government’s right to use information contained in this data if it is obtained from another source without restriction. The data subject to this restriction are contained in all sheets. Jan. 16, 2007 28 Script Editor Web Page AWIPS Test Driver Interface may be used as a script builder This interface used create scripts for this demo Expand the page to see the script
29
AWP.TRG.SWCTR-TO4.ADE-CAVE(Lx)-01.00/02.00 Rev. A This document includes data that shall not be duplicated, used, or disclosed – in whole or in part – outside the Government for any purpose other than to the extent provided in contract DG133W-05-CQ-1067. However, the Government shall have the right to duplicate, use, or disclose the data to the extent provided in the contract. This restriction does not limit the Government’s right to use information contained in this data if it is obtained from another source without restriction. The data subject to this restriction are contained in all sheets. Jan. 16, 2007 29 BREAK
30
AWP.TRG.SWCTR-TO4.ADE-CAVE(Lx)-01.00/02.00 Rev. A This document includes data that shall not be duplicated, used, or disclosed – in whole or in part – outside the Government for any purpose other than to the extent provided in contract DG133W-05-CQ-1067. However, the Government shall have the right to duplicate, use, or disclose the data to the extent provided in the contract. This restriction does not limit the Government’s right to use information contained in this data if it is obtained from another source without restriction. The data subject to this restriction are contained in all sheets. Jan. 16, 2007 30 Extending the uEngine by Adding New Tasks Steps Involved in Writing New uEngine Tasks Writing a “Hello World” Task Testing Your New Task
31
AWP.TRG.SWCTR-TO4.ADE-CAVE(Lx)-01.00/02.00 Rev. A This document includes data that shall not be duplicated, used, or disclosed – in whole or in part – outside the Government for any purpose other than to the extent provided in contract DG133W-05-CQ-1067. However, the Government shall have the right to duplicate, use, or disclose the data to the extent provided in the contract. This restriction does not limit the Government’s right to use information contained in this data if it is obtained from another source without restriction. The data subject to this restriction are contained in all sheets. Jan. 16, 2007 31 General Rules Remember the KISS principle – each task should perform a single job Most tasks extend Task. May also extend an intermediate class –Jython tasks extend JythonTask rather than Task, but JythonTask extends Jython. Override the static addRules(Digester) method –At a minimum, call the static addBasicRules(…) method Implement the abstract init(ChainData), and execute() methods The abstract test(ChainData) method is currently deprecated and can be implemented by simply returning the input
32
AWP.TRG.SWCTR-TO4.ADE-CAVE(Lx)-01.00/02.00 Rev. A This document includes data that shall not be duplicated, used, or disclosed – in whole or in part – outside the Government for any purpose other than to the extent provided in contract DG133W-05-CQ-1067. However, the Government shall have the right to duplicate, use, or disclose the data to the extent provided in the contract. This restriction does not limit the Government’s right to use information contained in this data if it is obtained from another source without restriction. The data subject to this restriction are contained in all sheets. Jan. 16, 2007 32 The “Hello World” Task Problem Statement We want to create a uEngine task so that a uEngine script can print a “Hello World” message. Analysis In this case, we will interpret “print” as log a message. This allows for creation of a somewhat more useful task, one that will allow the script writer to log messages. For simplicity, the logging will be at “info” level.
33
AWP.TRG.SWCTR-TO4.ADE-CAVE(Lx)-01.00/02.00 Rev. A This document includes data that shall not be duplicated, used, or disclosed – in whole or in part – outside the Government for any purpose other than to the extent provided in contract DG133W-05-CQ-1067. However, the Government shall have the right to duplicate, use, or disclose the data to the extent provided in the contract. This restriction does not limit the Government’s right to use information contained in this data if it is obtained from another source without restriction. The data subject to this restriction are contained in all sheets. Jan. 16, 2007 33 The “Hello World” Task The XML Tag Syntax The tag name will be echo. The text to be logged will be provided via the message attribute. The message will be static, i.e., it will be determined at the time the script is written. Log Output Typical log output will be similar to INFO 2007-01-16 14:07:46, 964 [ProductSrv.2] tasks.Echo Message: Hello World!
34
AWP.TRG.SWCTR-TO4.ADE-CAVE(Lx)-01.00/02.00 Rev. A This document includes data that shall not be duplicated, used, or disclosed – in whole or in part – outside the Government for any purpose other than to the extent provided in contract DG133W-05-CQ-1067. However, the Government shall have the right to duplicate, use, or disclose the data to the extent provided in the contract. This restriction does not limit the Government’s right to use information contained in this data if it is obtained from another source without restriction. The data subject to this restriction are contained in all sheets. Jan. 16, 2007 34 The “Hello World” Task Basic Class Structure –Basic class generated by Eclipse –Import statements added by Eclipse as needed “msg” and setMsg() follow Java bean naming pattern.
35
AWP.TRG.SWCTR-TO4.ADE-CAVE(Lx)-01.00/02.00 Rev. A This document includes data that shall not be duplicated, used, or disclosed – in whole or in part – outside the Government for any purpose other than to the extent provided in contract DG133W-05-CQ-1067. However, the Government shall have the right to duplicate, use, or disclose the data to the extent provided in the contract. This restriction does not limit the Government’s right to use information contained in this data if it is obtained from another source without restriction. The data subject to this restriction are contained in all sheets. Jan. 16, 2007 35 The “Hello World” Task addRules(Digester) method: “Echo.class” specifies the class and is required since this is a static method Uses the rules method from Task and previously defined constants to simplify code
36
AWP.TRG.SWCTR-TO4.ADE-CAVE(Lx)-01.00/02.00 Rev. A This document includes data that shall not be duplicated, used, or disclosed – in whole or in part – outside the Government for any purpose other than to the extent provided in contract DG133W-05-CQ-1067. However, the Government shall have the right to duplicate, use, or disclose the data to the extent provided in the contract. This restriction does not limit the Government’s right to use information contained in this data if it is obtained from another source without restriction. The data subject to this restriction are contained in all sheets. Jan. 16, 2007 36 The “Hello World” Task The init(ChainData) and Test(ChainData) Methods Init() simply saves its input for later, “dataChain” is provided by Task. test() has nothing to do, so simply return the input.
37
AWP.TRG.SWCTR-TO4.ADE-CAVE(Lx)-01.00/02.00 Rev. A This document includes data that shall not be duplicated, used, or disclosed – in whole or in part – outside the Government for any purpose other than to the extent provided in contract DG133W-05-CQ-1067. However, the Government shall have the right to duplicate, use, or disclose the data to the extent provided in the contract. This restriction does not limit the Government’s right to use information contained in this data if it is obtained from another source without restriction. The data subject to this restriction are contained in all sheets. Jan. 16, 2007 37 The “Hello World” Task The Execute() Method –All the action takes place here Use the logger to record the message All Tasks return the dataChain.
38
AWP.TRG.SWCTR-TO4.ADE-CAVE(Lx)-01.00/02.00 Rev. A This document includes data that shall not be duplicated, used, or disclosed – in whole or in part – outside the Government for any purpose other than to the extent provided in contract DG133W-05-CQ-1067. However, the Government shall have the right to duplicate, use, or disclose the data to the extent provided in the contract. This restriction does not limit the Government’s right to use information contained in this data if it is obtained from another source without restriction. The data subject to this restriction are contained in all sheets. Jan. 16, 2007 38 The “Hello World” Task – Using Eclipse Using the Eclipse Class Creation Wizard to create the basic class.
39
AWP.TRG.SWCTR-TO4.ADE-CAVE(Lx)-01.00/02.00 Rev. A This document includes data that shall not be duplicated, used, or disclosed – in whole or in part – outside the Government for any purpose other than to the extent provided in contract DG133W-05-CQ-1067. However, the Government shall have the right to duplicate, use, or disclose the data to the extent provided in the contract. This restriction does not limit the Government’s right to use information contained in this data if it is obtained from another source without restriction. The data subject to this restriction are contained in all sheets. Jan. 16, 2007 39 The “Hello World” Task – Using Eclipse At this point, you compile and deploy EDEX Once deployed, test the task in a uEngine script
40
AWP.TRG.SWCTR-TO4.ADE-CAVE(Lx)-01.00/02.00 Rev. A This document includes data that shall not be duplicated, used, or disclosed – in whole or in part – outside the Government for any purpose other than to the extent provided in contract DG133W-05-CQ-1067. However, the Government shall have the right to duplicate, use, or disclose the data to the extent provided in the contract. This restriction does not limit the Government’s right to use information contained in this data if it is obtained from another source without restriction. The data subject to this restriction are contained in all sheets. Jan. 16, 2007 40 The “Hello World” Task – Test Script Enter the test script as before, and click “Get Image”. Check the system log to see the message.
41
AWP.TRG.SWCTR-TO4.ADE-CAVE(Lx)-01.00/02.00 Rev. A This document includes data that shall not be duplicated, used, or disclosed – in whole or in part – outside the Government for any purpose other than to the extent provided in contract DG133W-05-CQ-1067. However, the Government shall have the right to duplicate, use, or disclose the data to the extent provided in the contract. This restriction does not limit the Government’s right to use information contained in this data if it is obtained from another source without restriction. The data subject to this restriction are contained in all sheets. Jan. 16, 2007 41 BREAK
42
AWP.TRG.SWCTR-TO4.ADE-CAVE(Lx)-01.00/02.00 Rev. A This document includes data that shall not be duplicated, used, or disclosed – in whole or in part – outside the Government for any purpose other than to the extent provided in contract DG133W-05-CQ-1067. However, the Government shall have the right to duplicate, use, or disclose the data to the extent provided in the contract. This restriction does not limit the Government’s right to use information contained in this data if it is obtained from another source without restriction. The data subject to this restriction are contained in all sheets. Jan. 16, 2007 42 Summary Future Evolution of the uEngine Design
43
AWP.TRG.SWCTR-TO4.ADE-CAVE(Lx)-01.00/02.00 Rev. A This document includes data that shall not be duplicated, used, or disclosed – in whole or in part – outside the Government for any purpose other than to the extent provided in contract DG133W-05-CQ-1067. However, the Government shall have the right to duplicate, use, or disclose the data to the extent provided in the contract. This restriction does not limit the Government’s right to use information contained in this data if it is obtained from another source without restriction. The data subject to this restriction are contained in all sheets. Jan. 16, 2007 43 Resources On the ADE 0.1 DVD: –micro_engine_task_readme.pdf –micro_engine_scripting_readme.pdf –generic message format.pdf –AWIPS_ADE_EDEX_Build_Procedure.pdf –JavaDoc documentation for plug-ins is available. On the Web: –Apache Commons Digester project: http://jakarta.apache.org/commons/digester // –Apache Jakarta Commons project: http://jakarta.apache.org/commons/ // –Apache Ant project: http://ant.apache.org/
44
AWP.TRG.SWCTR-TO4.ADE-CAVE(Lx)-01.00/02.00 Rev. A This document includes data that shall not be duplicated, used, or disclosed – in whole or in part – outside the Government for any purpose other than to the extent provided in contract DG133W-05-CQ-1067. However, the Government shall have the right to duplicate, use, or disclose the data to the extent provided in the contract. This restriction does not limit the Government’s right to use information contained in this data if it is obtained from another source without restriction. The data subject to this restriction are contained in all sheets. Jan. 16, 2007 44 BREAK
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.