2 - Defining Inputs

Unknown macro: {scrollbar}

There are three types of parameters that Action Sequence documents understand; inputs, outputs and resources.  Inputs and outputs are variables of a specific data type like string or property-map (see valid data types.)  Resources are similar to inputs except they specify a mime-type and path.  A default value cannot be specified for resources.  Typically resources represent large amounts of data like report definitions or images (see valid resource types.) 

Parameters can come from four sources; runtime, request, session, global and default

  • Runtime parameters are parameters that are stored in the Runtime Context.  Remember, the Runtime Context stores the inputs and outputs from previous instances and makes them available to future executions of the same runtime instance id.
  • Request parameters are the name-value pairs specified on a URL
  • Session parameters are variables that are stored in the user's session and may contain unique values for each user.
  • Global parameters are similar to session parameters except they have the same values for all users.
  • Default values are specified in the Action Sequence document and are used as a last resort.

Session and Global parameters can be used to provide secure filtering of data within the Action Sequence.  A session parameter gets initialized by executing an action sequence when the user logs onto the system.  The Action Sequence called upon login can be set up to perform a query using the user's login name in the where clause.  The result is stored in the user's session and is available to subsequent Action Sequences.  Global parameters are initialized when the system starts up and are available for all users.  See Using System Actions to Control Data Access for information on how to set up the filters and use them.

Here is an example of the inputs section of an Action Sequence document:

<inputs>
    <region type="string">
        <sources>
            <request>REGION</request>
            <runtime>aRegion</runtime>
        </sources>
        <default-value>Central</default-value>
    </region>
</inputs>

This example indicates that the Action Sequence document requires a parameter named region (case sensitive.)  When executed, the Runtime Context will first look to see if there was a parameter named REGION in the request.  If the Action Sequence was launched from a URL, and there was a parameter REGION=xxx specified, then the value xxx would be substituted for the region input.  If it didn't find the parameter in the request, it would look in its own runtime data for a parameter named aRegion.  If it didn't find it in the Runtime Context Data, the value Central would be used.  The Runtime Context always looks in the sources in the order in which they are specified and takes the default value last.  If no default was specified, then the Action Sequence would throw an error and return.  

There are two implicit parameters, instance-id and solution-id, that are always available and do not need to be specified as inputs or outputs. 

Unknown macro: {scrollbar}