Showing posts with label Tools. Show all posts
Showing posts with label Tools. Show all posts

Run eScript dynamically on the fly without compiling < 8.0

In our lives as developers, we face daily situtaions where we have to meet business process automation challenges.

In the Siebel essentials course, we are trained into the Siebel mantra of exhausting all declarative alternatives before resorting to using script.

But to be a successful Siebel consultant, we have to be adept in more than just one discipline.

We cannot sell ourselves as declarative config specialists.

We can dream up solutions of using fancy calculated fields (within calculated fields) and funky links based on twisted joins, that rely on sort orders to work, but this tends to be less maintainable then writing nicely encapsulated code, that can be reused.

Writing eScript is a neccessary part of life, but the process is quite cumbersome. You have to write the code, wait for it to compile, and then wait for the client to launch and test it.

As any curious developer would do, I thought there must be a better way, there should be a way to access Siebels eScript engine externally.

The breakthrough came from T.Mueller, a colleague who had the idea to build his own eScript engine.

At first, this sounds really hardcore, what kind of geek is willing to re-implement the eScript engine which has been around since the 90s?, but anyone with a strong background in ECMA/Javascript can achieve this, (a little Java background would defintely come in handy, but not neccessary).

This guide is aimed at the advanced developer, so I will outline the main concepts of this implementation.

Here is the solution overview.

  1. Install Java Developemnt Kit/Java IDE
  2. Import ECMA scripting engine
  3. Use Java Databean to connect to Siebel
  4. Pass Siebel Java application object into ECMA engine
  5. Create a class abstraction layer to translate Java methods into eScript language

You might be wondering, wether it is worth your while to build this tool, since in Siebel 8 we have Fix and Go for the ST engine. The answer depends on how close you are to using version 8.

For those who cant see 8 on the horizon, or are geeky enough to try this, then you will be priviledged to have a new Scripting tool in your arsenal.

Also remember, that even if you are using 8 now, the next project you end up on might be pre 8 =). I know of a couple of places still using 6, but hopefully none of us end up there.

Here are the advantages of this tool:

  1. Run eScript dynamically on the server without compile
  2. Quickly prototype solutions
  3. Rapid debugging and testing of scripts
  4. Highlight script and syntax problems before they are checked-in

In the next article in the series, I will show you how to build this tool, so stay tuned.