Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0
Wiki Markup
{scrollbar}

The

...

architecture

...

is

...

designed

...

so

...

that

...

each

...

component

...

only

...

needs

...

to

...

do

...

the

...

smallest

...

amount

...

of

...

work

...

necessary

...

to

...

perform

...

its

...

job.

...

A

...

component

...

does

...

not

...

need

...

to

...

know

...

anything

...

about

...

schedulers,

...

workflow

...

engines,

...

audit

...

logs,

...

or

...

other

...

components.

...

Control

...

Flow

...

BI

...

Components

...

are

...

executed

...

as

...

a

...

result

...

of

...

someone

...

or

...

something

...

requesting

...

the

...

Pentaho

...

Solution

...

Engine

...

to

...

execute

...

an

...

action

...

sequence.

...

Action

...

sequences

...

can

...

be

...

executed

...

by

...

users,

...

schedulers,

...

web

...

services,

...

workflow

...

engines

...

and

...

API

...

calls.

...

In

...

all

...

cases

...

the

...

caller

...

can

...

provide

...

parameters

...

to

...

the

...

action

...

sequence.

...

The

...

action

...

sequence

...

can,

...

in

...

addition

...

to

...

parameters

...

from

...

the

...

request,

...

define

...

parameters

...

that

...

are

...

fulfilled

...

from

...

other

...

places

...

such

...

as

...

a

...

session.

...

This

...

section

...

and

...

chart

...

describes

...

the

...

order

...

of

...

events

...

as

...

an

...

action

...

sequence

...

is

...

executed.

...

Image Added

  1. Start.

...

  1. A

...

  1. call

...

  1. is

...

  1. made

...

  1. to

...

  1. an

...

  1. object

...

  1. in

...

  1. the

...

  1. services

...

  1. layer

...

  1. requesting

...

  1. execution

...

  1. of

...

  1. an

...

  1. action

...

  1. sequence.

...

  1. These

...

  1. objects

...

  1. use

...

  1. a

...

  1. request

...

  1. handler

...

  1. object

...

  1. that

...

  1. implements

...

  1. org.pentaho.core.services.IActionRequestHandler,

...

  1. create

...

  1. an

...

  1. instance

...

  1. of

...

  1. org.pentaho.solution.SolutionEngine,

...

  1. or

...

  1. use

...

  1. the

...

  1. helper

...

  1. methods

...

  1. in

...

  1. org.pentaho.core.solution.SolutionHelper.

...

  1.   In

...

  1. each

...

  1. of

...

  1. these

...

  1. cases,

...

  1. parameters

...

  1. providers

...

  1. are

...

  1. passed

...

  1. to

...

  1. the

...

  1. solution

...

  1. engine.

...

  1. The

...

  1. request

...

  1. handlers

...

  1. and

...

  1. solution

...

  1. helper

...

  1. create

...

  1. an

...

  1. instance

...

  1. of

...

  1. the

...

  1. SolutionEngine

...

  1. and

...

  1. call

...

  1. its

...

  1. 'execute'

...

  1. method

...

  1. specifying

...

  1. the

...

  1. path

...

  1. and

...

  1. name

...

  1. of

...

  1. the

...

  1. action

...

  1. sequence

...

  1. to

...

  1. be

...

  1. executed

...

  1. and

...

  1. the

...

  1. parameter

...

  1. provider.

...


  1. Examples

...

  1. of

...

  1. objects

...

  1. that

...

  1. do

...

  1. this

...

  1. are:

...

    • Servlet:

...

    • org.pentaho.ui.servlet.ViewAction

...

    • UI

...

    • Component:

...

    • org.pentaho.ui.component.ActionComponent

...

    • Web

...

    • Service:

...

    • org.pentaho.ui.servlet.HttpWebService

...

    • Scheduler:

...

    • org.pentaho.plugin.quartz.QuartzExecute

...

    • API:

...

    • org.pentaho.core.solution.SolutionHelper

...

  1. The

...

  1. Solution

...

  1. Engine's

...

  1. 'execute'

...

  1. method:

...

    • Checks

...

    • that

...

    • both

...

    • the

...

    • action

...

    • sequence

...

    • path

...

    • and

...

    • name

...

    • have

...

    • been

...

    • provided

...

    • Creates

...

    • an

...

    • instance

...

    • of

...

    • an

...

    • IRuntimeElement

...

    • and

...

    • an

...

    • IRuntimeContext.

...

    • The

...

    • details

...

    • of

...

    • the

...

    • creation

...

    • of

...

    • this

...

    • instance

...

    • are

...

    • added

...

    • to

...

    • the

...

    • audit

...

    • log

...

    • along

...

    • with

...

    • its

...

    • association

...

    • with

...

    • the

...

    • caller's

...

    • session.

...

    • The

...

    • Runtime

...

    • Element

...

    • stores

...

    • the

...

    • state

...

    • of

...

    • the

...

    • action

...

    • sequence

...

    • if

...

    • the

...

    • process

...

    • is

...

    • long

...

    • running,

...

    • and

...

    • the

...

    • Runtime

...

    • Context

...

    • will

...

    • handle

...

    • the

...

    • execution

...

    • of

...

    • the

...

    • components.

...

    • Calls

...

    • the

...

    • Solution

...

    • Repository

...

    • to

...

    • load

...

    • the

...

    • action

...

    • sequence.

...

    • If

...

    • the

...

    • action

...

    • sequence

...

    • cannot

...

    • be

...

    • found,

...

    • an

...

    • error

...

    • is

...

    • returned

...

    • to

...

    • the

...

    • caller

...

    • and

...

    • the

...

    • failure

...

    • is

...

    • audited.

...

    • Calls

...

    • the

...

    • Runtime

...

    • Context's

...

    • 'validateSequence'

...

    • method.

...

  1. The

...

  1. Runtime

...

  1. Context's

...

  1. 'validateSequence'

...

  1. method:

...

    • Sets

...

    • the

...

    • logging

...

    • level

...

    • of

...

    • the

...

    • action

...

    • sequence

...

    • to

...

    • the

...

    • desired

...

    • level

...

    • (can

...

    • be

...

    • specified

...

    • by

...

    • the

...

    • original

...

    • caller).

...

    • Creates

...

    • an

...

    • instance

...

    • of

...

    • a

...

    • component

...

    • for

...

    • each

...

    • action

...

    • defined

...

    • in

...

    • the

...

    • action

...

    • sequence.

...

    • If

...

    • the

...

    • sequence

...

    • includes

...

    • two

...

    • actions

...

    • which

...

    • use

...

    • the

...

    • EmailComponent,

...

    • two

...

    • instances

...

    • of

...

    • the

...

    • component

...

    • will

...

    • be

...

    • created.

...

    • The

...

    • same

...

    • instance

...

    • of

...

    • the

...

    • component

...

    • will

...

    • not

...

    • be

...

    • used

...

    • for

...

    • both

...

    • actions.

...

    • The

...

    • Runtime

...

    • Context

...

    • needs

...

    • BI

...

    • Components

...

    • to

...

    • have

...

    • a

...

    • default

...

    • constructor

...

    • that

...

    • accepts

...

    • no

...

    • parameters.

...

    • Provides

...

    • each

...

    • component

...

    • with

...

    • various

...

    • objects

...

    • such

...

    • as

...

    • the

...

    • caller's

...

    • session,

...

    • the

...

    • requested

...

    • logging

...

    • level,

...

    • and

...

    • the

...

    • Runtime

...

    • Context.

...

    • Calls

...

    • each

...

    • component's

...

    • 'validate'

...

    • method.

...

  1. The

...

  1. component's

...

  1. 'validate'

...

  1. method:

...

    • Calls

...

    • its

...

    • own

...

    • 'validateSystemSettings'

...

    • method

...

    • to

...

    • validate

...

    • any

...

    • system-wide

...

    • settings

...

    • it

...

    • needs.

...

    • Calls

...

    • its

...

    • own

...

    • 'validateAction'

...

    • method

...

    • to

...

    • validate

...

    • that

...

    • the

...

    • inputs,

...

    • resources,

...

    • and

...

    • outputs

...

    • available

...

    • to

...

    • it

...

    • (as

...

    • defined

...

    • in

...

    • the

...

    • action

...

    • sequence)

...

    • are

...

    • sufficient

...

    • for

...

    • it

...

    • to

...

    • execute.

...


    • If

...

    • either

...

    • of

...

    • these

...

    • validations

...

    • fail

...

    • for

...

    • any

...

    • component,

...

    • the

...

    • execution

...

    • of

...

    • the

...

    • action

...

    • sequence

...

    • is

...

    • terminated

...

    • and

...

    • the

...

    • status

...

    • is

...

    • returned

...

    • to

...

    • the

...

    • caller.

...

  1. The

...

  1. Solution

...

  1. Engine's

...

  1. 'execute'

...

  1. method

...

  1. calls

...

  1. the

...

  1. Runtime

...

  1. Context's

...

  1. 'executeSequence'

...

  1. method.

...

  1. The

...

  1. Runtime

...

  1. Context's

...

  1. 'executeSequence'

...

  1. method:

...


  1. Steps

...

  1. and

...

  1. loops

...

  1. through

...

  1. the

...

  1. action

...

  1. definitions

...

  1. in

...

  1. the

...

  1. action

...

  1. sequence

...

  1. calling

...

  1. its

...

  1. 'executeAction'

...

  1. method

...

  1. for

...

  1. each

...

  1. action

...

  1. defined.

...

  1. The

...

  1. Runtime

...

  1. Context's

...

  1. 'executeAction'

...

  1. method:

...

    • Audits

...

    • the

...

    • start

...

    • of

...

    • component

...

    • execution.

...

    • Resolves

...

    • the

...

    • parameters

...

    • to

...

    • be

...

    • made

...

    • available

...

    • to

...

    • the

...

    • component

...

    • as

...

    • defined

...

    • in

...

    • the

...

    • action

...

    • sequence,

...

    • e.g.

...

    • from

...

    • the

...

    • request

...

    • parameter

...

    • provider

...

    • from

...

    • the

...

    • session

...

    • parameter

...

    • provider

...

    • or

...

    • from

...

    • the

...

    • outputs

...

    • of

...

    • other

...

    • components.

...

    • Calls

...

    • the

...

    • component's

...

    • 'init'

...

    • method.

...

  1. The

...

  1. component's

...

  1. 'init'

...

  1. method

...

  1. performs

...

  1. any

...

  1. initialization

...

  1. steps

...

  1. it

...

  1. needs.

...

  1. The

...

  1. Runtime

...

  1. Context's

...

  1. 'executeAction'

...

  1. method

...

  1. calls

...

  1. its

...

  1. 'executeComponent'

...

  1. method.

...

  1. The

...

  1. Runtime

...

  1. Context's

...

  1. 'executeComponent'

...

  1. method

...

  1. calls

...

  1. the

...

  1. components

...

  1. 'execute'

...

  1. method.

...

  1. The

...

  1. component's

...

  1. 'execute'

...

  1. method

...

  1. performs

...

  1. the

...

  1. steps

...

  1. it

...

  1. needs

...

  1. to

...

  1. complete

...

  1. its

...

  1. function.

...

  1. The

...

  1. Runtime

...

  1. Context's

...

  1. 'executeComponent'

...

  1. method

...

  1. calls

...

  1. the

...

  1. components

...

  1. 'done

...

  1. method.

...

  1. The

...

  1. component's

...

  1. 'done'

...

  1. method

...

  1. performs

...

  1. any

...

  1. clean-up

...

  1. steps

...

  1. it

...

  1. needs.

...

  1. The

...

  1. Runtime

...

  1. Context's

...

  1. 'executeAction'

...

  1. method

...

  1. audits

...

  1. the

...

  1. end

...

  1. of

...

  1. the

...

  1. component

...

  1. execution.

...

  1. The

...

  1. Solution

...

  1. Engine's

...

  1. 'execute'

...

  1. method

...

    • Audits

...

    • the

...

    • end

...

    • of

...

    • the

...

    • action

...

    • sequence

...

    • execution

...

    • Returns

...

    • the

...

    • Runtime

...

    • Context

...

    • to

...

    • the

...

    • caller.

...

  1. End.

...

  1. The

...

  1. caller

...

  1. can

...

  1. use

...

  1. the

...

  1. Runtime

...

  1. Context

...

  1. to

...

    • Get

...

    • the

...

    • final

...

    • status

...

    • of

...

    • the

...

    • execution

...

    • Get

...

    • the

...

    • output

...

    • objects

...

    • of

...

    • the

...

    • action

...

    • sequence

...

    • Get

...

    • the

...

    • debug

...

    • or

...

    • error

...

    • messages

...

Solution

...

Engine

...

Runtime

...

Context

...

BI

...

Component

1.

...

start
The request handlers and solution helper create an instance of the SolutionEngine and call it's 'execute' method specifying the path and name of the action sequence to be executed and the parameter provider.

1. start
The request handlers and solution helper create an instance of the SolutionEngine and call it's 'execute' method specifying the path and name of the action sequence to be executed and the parameter provider.

1. start
The request handlers and solution helper create an instance of the SolutionEngine and call it's 'execute' method specifying the path and name of the action sequence to be executed and the parameter provider.

2. execute()

  • Checks that an action sequence path and name have been provided
  • Creates an instance of an IRuntimeElement and an IRuntimeContext.
  • Calls the Solution Repository to load the action sequence.
  • Calls the Runtime Context's 'validateSequence' method.

 

 

 

3. validateSequence()

  • Sets the logging level.
  • Creates an instances components.
  • Provides each component with various system objects it needs.
  • Calls each component's 'validate' method.

 

 

 

4. validate()

  • Calls its 'validateSystemSettings' method to validate any system-wide settings it needs.
  • Calls its 'validateAction' method to validate that the inputs, resources, and outputs.

5. execute()
Calls the Runtime Context's 'executeSequence' method.

 

 

 

6. executeSequence()
Steps and loops through the action definitions in the action sequence calling 'executeAction'

 

 

7. executeAction()
Audits the start of a component execution.  Resolves the parameters
Calls the component's 'init' method.

 

 

 

8. init()
Method performs any initialization steps it needs to.

 

9. executeAction()
Calls 'executeComponent'.

 

 

10. executeComponent()
Calls the component's 'execute' method.

 

 

 

11. execute()
Performs the steps it needs to complete its function.

 

12. executeComponent()
Calls the components 'done method.

 

 

 

13. done()
Performs any clean-up steps it needs to.

 

14. executeAction()
Audits the end of the component execution.

 

15. execute()
Audits the end of the action sequence execution.
Returns the Runtime Context to the caller.

 

 

16. end

  • The caller can use the Runtime Context to
  • Get the final status of the execution
  • Get the output objects of the action sequence
  • Get the debug or error messages

 

 

As you can see from the diagram there are only a few levels of method calls between the 'execute' of the Solution Engine and the 'execute' of the components. This lightweight framework is very powerful but does not impose a heavy processing load on the system.

BI Components are not cached between calls to the Solution Engine and must be thread safe.

If a BI Component needs to create any global resources or call any static initialization methods, a class that implements IPentahoSystemListener should be written and registered in 'system/pentaho.xml'. See org.pentaho.plugin.kettle.KettleSystemListener

...

and

...

org.pentaho.plugin.jfreereport.JFreeReportSystemListener

...

for

...

examples.

...

Each

...

BI

...

Component

...

needs

...

to

...

know

...

the

...

parameters

...

that

...

it

...

needs

...

to

...

perform

...

its

...

duties.

...

For

...

example

...

a

...

scripting

...

component

...

needs

...

to

...

be

...

provided

...

the

...

script

...

to

...

be

...

executed

...

whereas

...

a

...

report

...

component

...

needs

...

to

...

be

...

provided

...

the

...

report

...

template

...

and

...

the

...

data

...

to

...

be

...

included.