Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [alf-dev] Availability of POC infrastructure pieces?

Hi Matt,

I have downloaded the ALF Event Manager code from CVS, integrated with
the latest activeBPEL engine, and have got the Event Manager to kick off
activeBPEL's asyncEcho.  No, it's not a full-blown ALF implementation,
but it's a babystep in the right direction and good to tinker with.

Here's a thumbnail How-to:

1) In the Catalina home where you installed activeBPEL create the dirs
"alfeventmgr/WEB-INF" under webapps.

2) Add a web.xml file to WEB-INF dir in 1) that defines the event mgr
servlets and a param value for property files.  Here's a snippet of what
goes in there:

<web-app>
 <context-param>
   <param-name>alfPropertiesHome</param-name>
   <param-value>/WEB-INF/</param-value>
  </context-param>

  <display-name>ALF Event Notification</display-name>
  <description>
      ALF Event Notification Web Services.
  </description>

    <!-- Define services that are included in the example application
-->
    <servlet>
	<servlet-name>ALFEventManager</servlet-name>
	
<servlet-class>org.eclipse.alf.eventManager.ALFEventManager</servlet-cla
ss>
    </servlet>
		
    <servlet-mapping>
	<servlet-name>ALFEventManager</servlet-name>
	<url-pattern>/services/ALFEventManager</url-pattern>
    </servlet-mapping>
</web-app>


3) Add three files to your WEB-INF dir:
	alf_logging.properties => log4j properties file
      alf_messages.properties => not needed now, I just put empty file
here
	EventActionMap.xml => Not really needed for baby prototype (see
step 4), but I used dummy contents below:

<?xml version="1.0" encoding="UTF-8"?>
<ALFEventRule xmlns:p="http://www.eclipse.org/ALF/XMLSchema/EventRule";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
  <Conditions>
    <EventType>Successful Completion</EventType>
    <ObjectType>Test</ObjectType>
    <Product>SilkCentral</Product>
    <ProductVersion>8.1</ProductVersion>
    <ProductInstance />
    <Action>
      <ServiceFlow>
 
<Endpoint>http://localhost:8080/active-bpel/services/AsyncEchoCallerServ
ice</Endpoint>
      </ServiceFlow>
    </Action>
  </Conditions>
</ALFEventRule>        

4) Change ALFEventManager.java for babystep:

   in processMessage(SOAPMessage soapMessage) I put this after second
line in method:

		SOAPElement elementInput = (SOAPElement)
body.getElementsByTagName("input").item(0);
		if(elementInput.getValue() != null)
		{
			logEvent("Processing Asnyc Echo Request...");
			processHelloWorldEvent(soapEnvelope);
			return;
		}

And processHelloWorldEvent() looks like:

private void processHelloWorldEvent(SOAPEnvelope soapEnvelope) {
		EventAction eventAction = new EventAction();
	
eventAction.addServiceFlow("http://localhost:8080/active-bpel/services/A
syncEchoCallerService");
		invokeService(soapEnvelope, eventAction);
	}

The idea here is to capture message from activeBPEL soap client and send
out to activeBPEL engine, then look at logs and congratulate ourselves
(and Serena!)

5) Clean ALF project, make jar file of all classes, place jar lib dir
under WEB-INF dir of 1)

6) Add axis jars to a lib dir of 5)

7) Start tomcat (and thus activeBPEL engine), go to activeBPEL soap
client:
http://localhost:8080/soap_client/index.jsp (assume port 8080)

enter service URL:
http://localhost:8080/alfeventmgr/services/ALFEventManager

paste message content to alf event mgr into form:
<ns1:asynctestRequest
    xmlns:ns1="urn:active-endpoints.resources.wsdl.2005-10.async_echo">
  <ns1:input>The string to echo.</ns1:input>
</ns1:asynctestRequest>

click "invoke"

8) Look at logs in catalina_home/temp to verify or
caltalina_home/bin/alf_event.log

9) Enjoy babystep & tinker more!


-Bob


Bob Brady, Ph.D.
Senior Software Engineer
Segue Software
201 Spring Street
Lexington, MA 02421
t: 781-402-5975
f: 781-402-1097
e: rbrady@xxxxxxxxx
w: www.segue.com

-----Original Message-----
From: alf-dev-bounces@xxxxxxxxxxx [mailto:alf-dev-bounces@xxxxxxxxxxx]
On Behalf Of Matthew Laudato
Sent: Wednesday, April 12, 2006 5:09 PM
To: 'ALF Developer Mailing List'
Subject: RE: [alf-dev] Availability of POC infrastructure pieces?

> Mark Phippard wrote on 3/8/2006:
> 
> I think the main issue is that sometime in the not too 
> distant future, 
> there needs to be a reasonable set of instructions for 
> setting up an ALF 
> test environment.  This is especially true if you want people 
> from the 
> open source community to be able to get involved.
> 

Has there been any progess on this front?  I've built the basic AccuRev
web
services interface, but there's no way currently to test this with ALF.
The
environment I'm using is similar to the list posted on this thread
earlier:

Present and used:
Apache 2.0.55 (Windows)
Tomcat 5.5
Axis 1.3
Eclipse 3.1.1 with WTP (but the WTP stuff wasn't very helpful...I pretty
much punted on these and used Axis)

The Tomcat common and shared libs together have everything one needs to
run
Axis (especially activation.jar).

Present but currently unused:
ActiveBPEL 1.2 
Oracle BPEL Designer Eclipse plugin

These are unused because I have no ALF war file to drop in for testing
purposes, so I haven't taken a look at them yet.

I took the approach of hand-coding WSDL and then using the Axis
WSDL2Java to
generate stubs/skels, etc.  Writing the implementation and client test
code
was straight-forward from there.  I also hand-built the war directory
inside
of Eclipse and pointed my default Tomcat context to this directory.
Pretty
easy to do once I was done mud wrestling with the tools.  Currently
there
are two supported methods:

AccuRevCommand_execute - this is a big bucket method along the lines of
what
Steve Taylor did for Openmake.
UpdateReferenceStream_execute - this updates a specified AccuRev
reference
stream.  A ref stream is a read-only copy of a stream (the AccuRev term
for
a collection of versioned elements) that is often used by our customers
(and
by us, for that matter) for nightly builds.

There is ongoing work by AccuRev to extend this set, along the lines of
whatever comes out of the ALF SCM Vocabulary meetings that we are
participating in.

As I have mentioned in earlier posts, I have built the Event Manager,
but
without without the property files, the various XML files, and really,
the
whole ALF war file (assuming such a thing exists?), it is not much help
(but
it is a good read!)

Anxiously awaiting ALF at AccuRev!

Thanks,
 - matt



_______________________________________________
alf-dev mailing list
alf-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/alf-dev


Back to the top