Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
{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 ADD LINK TO 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 ADD LINK TO for 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 if the inputs section of an Action Sequence document:
{code:xml}
<inputs>
        <region type="string">
   
        <sources>

               <request>REGION</request>
                <runtime>aRegion</runtime>
            </sources>
            <default-value>Central</default-value>

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

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.&nbsp; They are the... well I'm sure you can guess what they are.

----
{scrollbar}