processCommand Element

Top  Previous  Next

For each Process Command used in a page, a processCommand configuration element must be provided in the corresponding page configuration file.

  <processCommand name="ProductsForm.DeleteProductCommand">
    <processTemplate name="processTemplateName"/>
    <nextPage>nameOfTheNextPage</nextPage>
    <errorPage>nameOfTheErrorPage</errorPage>
    <continuePage>nameOfTheContinuePage</continuePage>
    <method>[Post|Get]</method>
    <precond></precond> (since v4.2)
    <log logger="" level=""/> (since v5.0, "debug" element deprecated)
  </processCommand> 

The name attribute of the processCommand element should contain the name of the Process Form that this command is located in and the name of the command itself using the notation processFormName.processCommandName.

Nested Elements

processTemplate (Accepts MScript)

The name attribute of this element must specify the configuration name of the processTemplate element . See Addressing other configuration elements. MScript can be used in the name attribute. e.g. <processTemplate name="@vof(s:template)" />

nextPage (Accepts MScript)

The name of the page to be displayed if the execution of the process template is successful. If the maximum completion code (_maxcc)  is <= 4, then the Process Manager assumes that the overall execution is successful and displays the page specified in this element.

The value for this element can be a page name or an URL. If it is an URL and if the URL definition ends with string "_rand=" then a unique identity is appended at the end of URL before redirecting the response to it.

If MScript is used in the value, e.g. <nextPage>@vof(v:nextPage)</nextPage>, it is resolved after (not before) the execution of the process template.

The page name assigned with this element can be overridden by the processes using MScript. The following MScript code will override the current next page definition.

@set(_nextpage,'Products')

 

Redirection with a GET Request (since v5.0)

If nextPage value starts with "redir " definition then it has a special meaning. If that is the case then ProcessManager makes a redirection to display.doms service with a GET method using the provided parameters. Note that only the parameters defined here will be included in the GET request.

Caution! Only the parameters defined here will be included in the GET request. Since the POST request and its parameters will terminate all request based memory storage (Variable Pool, and request ADOMs) will not be available in the new GET request. It should be thought that a brand new request is created when processing of the processes completed with the parameters defined here.

Syntax:

redir page-name[&parameter=value][&parameter=value][..][_rand=] (Accepts MScript)

page-name
The name of the page to be displayed next.

 

parameter
The name parameter to include in the redirection request

 

value
The value of the parameter. A special symbol "?" can be used as the value to use the value of the same parameter in the POST request.

 

_rand=
An integer time value is appended as the value. 

 

Examples:

redir %vof(PAGE_NAME)&ID=?&_rand=

redir mppa/index&CUST_ID=@vof(v:CUST_ID)&_rand=

redir lou/SGA/Details&ID=?&SGA_ID=@vof(P:SGA)&_rand= 

 

errorPage (Accepts MScript)

The name of the page to be displayed if the execution of the process template is not successful. If the maximum completion code (_maxcc) is > 8, then the Process Manager assumes that the overall execution was failed.

The value for this element can be a page name or an URL. If it is an URL and if the URL definition ends with string "_rand=" then a unique identity is appended at the end of URL before redirecting the response to it.

If MScript is used in the value it is resolved after (not before) the execution of the process template.

The page name assigned with this element can be overridden by the processes using MScript. The following MScript code will override the current next page definition.

@set(_errorpage,'ErrorPage1')
 

continuePage (Accepts MScript)

This element defines the name of the page to be displayed after the error page is displayed. This value is used as the hyperlink value of "Click here to continue" link on the error page.

If MScript is used in the value it is resolved after (not before) the execution of the process template.

The page name assigned with this element can be overridden by the processes using MScript. The following MScript code will override the current next page definition.

@set(_continuepage,'index')

 

method (Accepts MScript)

The value of this element is used by the Process Manager to check the submit method of the process form for the security purpose. If value of this element is "Post" then the submit method of the process form must also be "Post". Otherwise the Process Manager stops the execution with a Service Exception.
 

precond (Accepts MScript) (since v4.2)

Execution precondition as MScript expression. The command can be executed only if this element is empty or the evaluation result of the expression defined with this element is true.

log (since v5.0, "debug" element deprecated)

This element defines a logger and a log level. The logger attribute (Accepts MScript) contains the name of a logger configuration. If this attribute is omitted the console logger is used to print the log records to the system console. The level attribute (Accepts MScript) specifies the detail level of the logging.

Note that logging of the processes are requested individually in the processTemplate configuration.