Adding/Editing Processes

The following section describes how to work with the editor of processes when adding a new process or editing an existing one. Processes are described in Processes as Links between User Interface and Business Logic.

The editor of processes can be started as described in the Working with Configuration Elements section. It has two tabs – Action Rules and Failure Rules. Properties of the process are displayed in the Element Properties window. Action and Failure Rules represent rule collections, which can be edited using the Rule Editor For details how to work with the Rule Collection see Working with Rule Collection Editor.

Action rules determine what the process will do (unless the process is implemented by a custom software component – see below). Failure rules deternine what happens (if anything) if a process fails. Failure rules are explained in the Process Failure Rules section.

The following properties can be specified for a process:

Specify the name of the process uniquely identifying it within the business space version. The following restrictions apply:

  • The name must start with a character (not digit) or underscore symbol. All other symbols must be characters (including underscore) or digits. Space symbols are not allowed.
  • The name must be unique among the names of other processes defined in the business space version.

Specify the description of the process. Providing a description is highly recommended. Any description if defined is included into the generated documentation for the business space version – see Generating Documentation.

You can group processes by category. Processes belonging to a particular category are grouped in the Elements Tree. Enter a new category or select from the list of existing ones. You can apply the same category to several processes at once if you paste them under this category in the Elements Tree.

Click on this property to bring up the “Process Input” dialog and specify business objects and/or business object groups (if any) required by the process.

Instances of the business objects that the process works with may come from two sources:

  1. The process itself may look for the instances of the business objects it needs by executing FIND action of the Rule Language.
  2. The instances of the business objects the process needs may be written into the Context just before the process starts (see Context of Rule Execution) so when the process starts these instances are immediately available for the process to use in its implementation rules. These are the instances of the business objects declared as process input.

To define business objects or business object groups as process input select the objects or groups in the left list box and press the Right arrow button to move the selected objects or groups into the right list box. Similarly if you want to delete certain business objects or groups from the process input select the objects or groups in the right list box and press the Left arrow button to move them into the left list box.

The following options are available:

  1. Rules – select this radio button if you will define rules that implement the process (at least one rule must be defined). Use Action Rules tab to define the rules – see Working with Rule Collection Editor.
  2. Custom Software Component – select this radio button if the process is implemented by a piece of code – see “Aware IM Programmer’s Reference”. If you select this option you will also need to provide the fully qualified name of the Java class that implements the process, for example “com.mycompany.MyClass”.

Enter any name that will be displayed to the user to represent a process. Currently only used in the list of active processes or when a process becomes a background process.

Aware IM will automatically add the Cancel button when a process runs, so that the user can abort the execution of the process. Sometimes it may be necessary to disallow the user to cancel a process. In this case you need to untick this checkbox.

Tick this box if you want the process to handle the “forgotten password” functionality. In this case the process will be called when the user clicks on the “Forgot your password” link on the login form, or if the “forgotten password” URL is invoked directly. The process can ask the user a security question, verify the answer and reset the password or do something else. Note, there can only be one process that handles the “forgotten password” functionality.

If a process takes a long time to execute (such as, for example, large import process or a process handling large queries in batches) it is possible to run such a process in the background. The user will be able to continue working with the system while the process is running in the background. The user will be notified when the process completes or when it requires interaction with the user. Here you can specify a number of seconds that the system has to wait before it starts running the process in the background. Note that this property should only be used for processes that the user starts explicitly, not for processes that are started from other processes.

This video tutorial explains how to deal with processes that take a long time to execute.

 

By default all intermediate process operations are performed in a popup window. For example, consider this process that allows user to create a new object and then redisplays its form for editing:

ENTER NEW Object
 VIEW Object 

The first and all subsequent actions except the last one are considered to be intermediate actions. Depending on the nature of the last action it can be treated as an intermediate one or as the final one. The last action that expects input from the user is still an intermediate action, but if the action just displays the results and does not expect input from the user, it is considered to be the final one. The VIEW action does not expect input from the user, so it is the final one in this case. In most cases intermediate actions are displayed in a popup window. The final action is displayed according to the designated output of the process, specified either in a form/query operation or a menu command (depending on where the process is used). You can also specify that intermediate actions be displayed in the current tab rather than a popup window. This option is useful for applications running on a mobile phone where popup windows can be problematic.

You can get Aware IM to display the process node in the Elements Tree under a node of some other process. If you want this select the process under which the current process should be displayed

This property allows specifying database transaction isolation level that will be used when the process executes. Transaction isolation level is an advanced subject and its description is beyond the scope of this document. You can read this article Isolation_(database_systems) for more details. If you don’t specify the isolation level, the default level (“read committed”) will be used.

If you click on the “Diagram” tab at the bottom of the process editor you will see the flow chart of the process rules as shown on the picture below.

The diagram shows conditions and actions of the rules of the process. You can click on the condition or action and edit it directly on the diagram (the full text of the action or condition is displayed at the bottom of the screen and you can edit it there).

If a process calls another process (sub-process) it is displayed as a blue box on the diagram. You can double click on this box (or click “Expand” at the bottom of the screen) to see the rules of the sub-process on the same diagram as shown on this picture:

To collapse the rules of the sub-process click on the “-” icon in the top right corner of the sub-process. You can also move actions and conditions around by pressing the arrow buttons in the toolbar and customize the appearance of the diagram by pressing the “Settings” button on the toolbar.

  • Last modified: 2022/12/15 03:42