Back Forward Activity form
Completing the Parameters tab

About Activity rules

Show all 

Use the Parameters tab to identify any variables used as input parameters to, or results from, the activity.

Understanding activity parameters

This tab is optional; not every activity has parameters. When the activity is called, the system places parameter names and values on a nameless, classless page known as the parameter page, and noted by the prefix keyword param. For example, param.depth refers to the depth parameter.

The declared type of a parameter (such as Integer, Double, or DateTime) indicates the format of a value. When evaluating expressions, Process Commander follows the same casting and type conversion operations as for properties.

Parameter names are not properties, and are not defined by a property rule:

Tip03-02 Recording an activity's outputs or results on the parameter page is only useful when the parameter page is passed into this activity by reference, using the Pass current parameter page? checkbox in the Call instruction. When checked, one parameter page is shared between the calling and called activity. Otherwise, parameters on the called activity's parameter page are not available to the calling activity after a return.

Notes on Out parameters

OLSOK 3/11/05The Call instruction in an activity examines the In/Out value of each parameter in the called activity:

CautionAccordingly, do not list a local variable as the destination for an Out parameter. Do not pass a parameter reference as the destination for an Out parameter, unless passing the entire parameter page. MAYED

In a chain of calling activities (activity Alpha calls Beta which calls Gamma), a property passed by reference from Alpha to Beta can also be passed by reference to Gamma, and changes to the Out parameter made within Gamma can be passed all the way back to Alpha. This corresponds to the behavior of call-by-reference in many programming languages.

Automatic parameters for Utility, Notify, and Assign activity types

When a flow calls an Integrator, Utility, Notify, or Assign activity (or calls another flow), it provides eleven parameters to the activity, beyond those declared in the Parameters tab.  from PRKB-8820 and MARIK 4/20/05

See How to create activities for flows.

Completing the Parameters array

Complete a row of this array to define parameters for this activity. Within the activity, you can reference parameters with the keyword param followed by a period and the parameter name.

Field

Description

Parameters
Name

Enter a name of your choice for a parameter. A parameter name must be a valid Java identifier. See How to enter a Java identifier. BUG-2035

NoteDon't use a name that starts with pz. Don't choose any of the reserved names. If this activity is to be referenced in a flow rule, don't choose a name that matches any of the system-supplied parameters.

Description

Enter a text description of this parameter, for information only. This description appears when a developer completes parameter values.

Data Type

Parameters have a type similar to Single Value properties.C-471 Choose the type of data that is expected as the value for the parameter: C-1821 MARIK R-17005

String A Java String value
Boolean A Boolean value
Integer An integer value
Double A double value, may use exponential notation
Page Name A page structure mentioned in the Pages & Classes tab
Java Object An arbitrary Java object R-10344
DateTime A value matching the format of a Process Commander DateTime property value
Date A value consistent with a Process Commander Date property value
Time of Day A value consistent with a Process Commander TimeofDay property value
Decimal A decimal value including a decimal point
True or False Synonym for BooleanOLSOK 3/11 MARIK 3/9/05

B-2149 If the type is Page Name, include the parameter name and page class on the Pages & Classes tab.

NoteWhen entering parameters to call an activity, the values for Boolean and True or False parameters are the same as for properties of that type:

  • The preferred values are the text constants "true" and "false"
  • The following are equivalent to "true": any non-zero numeric value (integer or double), the text constants "on", "yes", "t", or any value starting with a "y" in any case
  • Any other value corresponds to "false"
Required?

Choose Yes or No to indicate whether this parameter is required to have a non-null value when this activity starts.

On the Call panel, parameters you mark as required appear with an asterisk Required.

NoteFor a parameter with a Data Type of Boolean, the false value is sometimes correctly indicated by a blank or null value. Don't choose Yes in this field for a Boolean parameter, because a form may return a blank value for "false", which Process Commander may consider a missing property. OLSOK 3/11/05 and 9/15/04

NoteDon't select Required? for an Out parameter, a parameter where In/Out is set to Out.

In/Out

Select In or Out to indicate whether the parameter is used for input to the called activity or output from the activity.

Parameters you identify as In are marked with a green image In in the Call panel. Parameters you identify as Out are marked with a red image Out.

The system does not prevent setting the value of an In parameter. A called activity can access and change both In and Out parameters on the parameter page.

See Notes on Out parameters above regarding storing activity results on the parameter page.

Prompt Default Value

Optional. You can enter a literal constant value that appears as the default parameter value when the system presents a parameter prompt form for this activity to a user. R-10125 SR-3 B-14862 null value B-20578 not type-validated on Save

Click the triangle at the right of a row to review or enter additional details for this parameter. Click the Red triangletriangle to hide the detail area.

Type for SmartPrompt

Optional. For some parameters, you can configure SmartPrompt facilities to list a set of values for the parameter that a person running the activity can choose from. (This is not important if this activity is to be called from another activity with computed parameter values.)

The values listed by SmartPrompt must be a key part to a concrete class with one to three key parts.

To enable SmartPrompt operation, enter a class name here (such as Rule-Obj-FieldValue or Data-Party-Gov) to create configuration that, at runtime, allows a user to enter this parameter using SmartPrompt.

Validate As

Optional. KHATV 6/23/04 Identify a property for SmartPrompt operation.

If you selected Rule-Obj-FieldValue in the SmartPrompt Rule field, enter here the second key part of the field value rules to appear at runtime in SmartPrompt lists.

If you selected another class in the SmartPrompt Rule field, identify a property that is a key part of the indicated class, if the class key contains more than one key part.

Reviewing System Parameters

Several input parameters are automatically available for activities used in flow processing — that is, activities with an Activity Type on the Security tab set to Connect, Utility, Route, Notify and Assign. PROJ-1301 5.4 Your activity cannot alter the value of these system-maintained parameters, but can use them as inputs, using the normal Param.Name notation.

For example, system parameter Param.pyDraftMode is true when the flow is in draft mode.

Click Show System Parameters to review the names and descriptions of these parameters. This button is not visible for other activity types. Click Hide System Parameters to hide this area. See How to create activities for flows for information on these and other system parameters.

Completing the Local Variables array

Use the Local Variables section to create scalar variables. Local variables are stored together as fields in the Java class that Process Commander generates to implement the activity. These require less memory and execute faster than regular parameters. They are often used to pass information from step to step.

OLSOK 3/15/05Local variables do not appear on the parameter page.

A local variable of type StringBuffer may be assembled in multiple steps, as a Property-Set on a StringBuffer appends the value to the StringBuffer.

Use the Local keyword to reference a local variable in a Property-Set method.

B-2407 OLSOK TURBT 12/10/03 NoteTo avoid Java null pointer exceptions, the system initializes String local variables to the empty string, and the StringBuffer local variable as:

public StringBuffer aBuffer = new StringBuffer();

Field

Description

Local Variables  
Name

Enter the name you choose for the local variable, any legal Java identifier. See How to enter a Java identifier. Don't choose a name that starts with pz or any of the reserved names.

Description

Enter a text description of this local variable, for information only.

Data Type

SmartPromptSelect the type of data that is expected as the value for the variable. Choose:

  • String for a Java.lang.string object
  • String Buffer for a Java StringBuffer object
  • int for a Java int
  • double for a Java double
  • boolean for a Java boolean
  • char for Java char
  • BigDecimal for the BigDecimal class
  • Object for any Java object OLSOK 3/11/05

Three standard methods manipulate String Buffer local variables. See:

Up About Activity rules