Wednesday, February 21, 2007

Know-How by Ram Charan

I just finished reading Ram Charan's Know-How (The 8 Skills That Separate People Who Perform From Those Who Don't). I had previously read his books Execution and What the CEO Wants You To Know. He makes points illustrated with good examples from the many contacts he has with many top Fortune companies.

I will simply post his summary at the end of the book. I thought it was a very practical and focused book. Especially about setting goals and focussing on a few key priorities to achieve them.

The Eight Know-Hows

1. Positioning and Repositioning: Finding a central idea for business that meets customer demands and that makes money.
2. Pinpointing External Change: Detecting patterns in a complex world to put the business on the offensive.
3. Leading the Social System: Getting the right people together with the right behaviors and the right information to make better, faster decisions and achieve business results.
4. Judging People: Calibrating people based on their actions, decisions, and behaviors and matching them to the non-negotiables of the job.
5. Molding a Team: Getting highly competent, high-ego leaders to coordinate seamlessly.
6. Setting Goals: Determining the set of goals that balances what the business can become with what it can realistically achieve.
7. Setting Laser-Sharp Priorities: Defining the path and aligning resources, actions, and energy to accomplish the goals.
8. Dealing with Forces Beyond the Market: Anticipating and responding to societal pressures you don't control but that can affect your business.

Personal Traits That Can Help Or Interfere With the Know-Hows

Ambition - to accomplish something noteworthy BUT NOT win at all costs.
Drive and Tenacity - to search, persist, and follow through BUT NOT hold on too long.
Self-confidence - to overcome the fear of failure, fear of response, or the need to be liked and use power judiciously BUT NOT become arrogant and narcissistic.
Psychological Openness - to be receptive to new and different ideas AND NOT shut other people down.
Realism - to see what can actually be accomplished AND NOT gloss over problems or assume the worst.
Appetite for Learning - to continue to grow and improve the know-hows AND NOT repeat the same mistakes.

Saturday, February 17, 2007

Some good sample BPEL examples!

There are some good BPEL examples to work from at
http://www.activebpel.org/samples/samples-3/samples.php

Just a note beforehand, you should read the instructions for each example before trying to run them. I encountered some errors that were frustrating but after reading the instructions I was able to get them running.

I think it is a guy thing that instructions are for wussies. ;-)

The 2 examples that I ran so far

complex_exchange:
For the complex exchange, I had to set the following environment variables.

I set up the following environment variables
AESAMPLES_LIB=D:\Collin\University\COMP689\project\bpel\lib
CLASSPATH=.


1. Make sure that it the complex_exchange.bpr file gets deployed correctly
ant deploy-bpr
2. Then you should be able to run the client correctly
ant client



custom_functions:


This example has instructions where you have to
- edit the aeEngineConfig.xml as noted in the instructions
- copy the aecf-xmlstring.jar to the activeBpel engine's \shared\lib directory
- restart tomcat

1. Make sure that it the complex_exchange.bpr file gets deployed correctly
ant deploy-bpr
2. Then you should be able to run the client correctly
ant client



There is a deployment issue when you try to deploy both applications.
The error can be seen by looking at the deployment log:

http://localhost:8080/BpelAdmin/deployment_log_detail.jsp

Due to a Duplicate service name: complexToBpelPartnerLinkService in both bprs.

Wednesday, February 7, 2007

Implementing a Complex Axis Web Service

Well, I really want to do something more elaborate with ActiveBPEL and that will require the ability to write complex web services. I ordered the electronic version of "Developing Web Services with Apache Axis" by Ka lok 'Kent' Tong. I like it because it is real straightforward with working examples. There are also some chapters on Axis Security and Encryption which will definitely be worth reading when I get some time.

Check out http://www.agileskills2.org/DWSAA/index.html for more information.
The code is downloadable without cost.

I had to rework some of the code but I am glad to say that I got the complex web service up and running in the ActiveBPEL environment.

You can download my project for this. It is not in a super tidy state but should get you going.
Download it from Here
There are 2 ant files that I use:

buildTheStubs.xml - This will build the stub java source files for the complex web service

buildAndDeployWS.xml - This will deploy the compile and deploy the web service to ActiveBPEL

I copied them into build.xml when I want to run them each.

There is a client java class StubClient.java which will be able to talk to the deployed webservice.

The web service implementation BizServiceSOAPImpl.java
exposes a method
public ProductQueryResultResultItem[] query(ProductQueryQueryItem[] queryRequest) throws java.rmi.RemoteException, InvalidQuery {
}

which is quite obviously complex in that it does not have any simple types as parameters or return types.


The client works fine except when I try to look at the wsdl for the webservice
http://localhost:8080/active-bpel/services/BizServiceSOAP?WSDL on my machine

I get the following error message that I will try and have a look into:

AXIS error

Sorry, something seems to have gone wrong... here are the details:Fault - makeTypeElement() was told to create a type "{http://foo.com}>>productQuery>queryItem", with no containing element

AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
faultSubcode:
faultString: makeTypeElement() was told to create a type "{http://foo.com}>>productQuery>queryItem", with no containing element
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}hostname:kepi

Thursday, February 1, 2007

Writing a simple Axis Web Service

If I am going to be doing any real BPEL development. I really have to be able to make my own web services. I basically stripped out the BPEL and JSP components of the loan approval example.

I created a simple java class that will be exposed as a web service:

Web Service:

package com.smith.ws;
import java.util.Date;

public class SimpleWebService {

public String simpleCall(String someString)
throws SimpleWebServiceProcessFault
{
String response = null;
try
{
System.out.println("Calling "+this.getClass());
//do some business logic
Date now = new Date();
response = "*"+someString+"*"+now;
}
catch (Exception e)
{
throw new SimpleWebServiceProcessFault("simpleCall", e.toString(),"99");
}
return response;
}
}


You then have to update the service.wsdd file to expose it as a web service:

Service.wsdd

Something like:

< name="SimpleWebService" provider="java:RPC">

< name="className" value="com.smith.ws.SimpleWebService">
< name="allowedMethods" value="*">

<>


The ant build creates a simplewebservices.wsr and copies it to the /bpr directory

Calling the web service:

Service service = new Service();
Call call = (Call)service.createCall();
String urlString = "http://localhost:8080/active-bpel/services/SimpleWebService";
call.setTargetEndpointAddress(new java.net.URL(urlString));
call.setOperationName("simpleCall");
call.addParameter("someString", org.apache.axis.Constants.XSD_STRING,ParameterMode.IN);
call.setReturnType(org.apache.axis.Constants.XSD_STRING);

String result = null;
try
{
result = (String)call.invoke(new Object[] {"My Call"});
}
catch (AxisFault af) {
if (SimpleWebServiceProcessFault.hasMagicFaultErrorCode(af))
result = "99";
else
result = af.toString();
}
catch (Exception e) {
result = "unexpected exception seen: " + e.toString();
}

System.out.println("Client result = " + result);


Basically taking the input argument and returning it dressed up with some asterisks and the current time.

Sample run:
Client result = *My Call*Thu Feb 01 20:13:33 MST 2007


You can download the sample simple web service bundle here:
1simplews.zip