Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

There are two major functions that a Component gets called to do - validate and execute.  Validate is called to verify that the inputs are valid and all resources required to execute are available.  Execute actually performs the action. 

The action-definition node in the Action Sequence document defines how the component should function.  It is the place to define and map inputs, outputs and any other metadata or settings the component will require when it is executed.  The name of the component that executes the action definition is identified using the component-name node.  The name is the name of a Java class that is dynamically loaded at runtime.  When referring to the built in Pentaho components, the fully qualified name of the component should not be used, just the class name. For example, use EmailComponent instead of org.pentaho.plugin.email.EmailComponent. 

...

Action-inputs

The action-inputs and action-resources define the parameters that will be passed into the component when it executes.  Some components have required inputs that must be available or runtime error will occur.  Some inputs may be specified but are optional.  For example, the Email Component requires a to but the cc is optional.  There are several ways to satisfy a required input. It can be provided as a passed parameter with the same name to the component. It can be mapped to a different name and passed to the component. It can be hard coded with a constant value or in some cases it could be prompted for.  By default the email component should have an action input that looks like:

...

Some components will generate a prompt for certain parameters that they require.  The prompt will be generated by the runtime if the calling mechanism permits it.  For example, the above mentioned Email Component requires a to parameter in order to know where to send the email.  If the to parameter is specified as an action-input but it has a null value, the Email Component will ask the runtime if prompting is allowed.  If the Action Sequence being executed has been launched from a web browser, the runtime will respond with true and the Email Component will ask the runtime to prompt the user for the to email address.  If the Action Sequence was running via a web service call, the runtime would reply with false and the Email Component would generate a parameter not found error and return.

...

Action-outputs

The action-outputs define what parameters will be saved in the Runtime Context and be made available to other Components when that component finishes executing.  Like an action-input, an action-output can be mapped to another variable name using the mapping attribute.

...

Component-definition

The component-definition node provides a place for any Component specific options or parameters. 

...