Defining the application business logic through processes
BMC Helix Innovation Studio provides Process designer, a graphic-based interface, to create and customize business processes of a Digital Service application. Processes are the named services of an application. Business logic is the core of each application and a process is an application service that performs application business logic and achieves the application purpose. You can invoke business logic for an application by calling processes of that application. Each process has a name, inputs, and outputs. For example, Approval is the sole service of Approval application, that can be invoked by calling Approval process through REST API or through metadata.
You can design processes meant to accomplish a business goal by using the Process designer. You can also use RESTful APIs to modify processes. APIs give you more power and control over managing processes and performing actions that might not be possible through the UI.
Application business analysts can customize the objects developed in their own applications and that are marked customizable by the developers, but cannot customize the objects developed in com.bmc.arsys. For example, objects in core BMC applications like Foundation, Approval, and Assignment cannot be customized.
Before you create a process, ensure the following:
- You have an understanding about the process objective, required inputs, and desired output.
- You have all the elements required to create or modify your process. If the required element in not available, you may request your developer to create and deploy it. For more information about process elements and an example of a process created in BMC Helix Innovation Studio, see Process designer elements.
Best practices for designing a process
Following are some of the best practices that you should follow when designing a process:
- Do not create big process with lot of steps and actions. Process definitions are to visually represent a business procedure. When the process definition becomes too big, it starts to lose the benefit of a visual workflow. Use a modular approach to divide the steps in smaller sub processes. You can do this using the Sub Process or Call Activity element.
- Ensure that you have properly thought through between writing code (using @Action) and creating a process definition. Consider the following scenarios when selecting the correct option to write code or use Process designer:
- If the business logic needs to be visually described or if your users can configure it, design a process using the Process designer.
- Using service task to perform self sustained unit of work, and let process manage states.
- You can write the code if it is faster to implement a complicated logic than using the Process designer.
- When you create a new process, concentrate on laying out the flow first. Do not focus too much on configuring each element. When the flow is completed, save the process and then continue to configure each element one by one.
Workflow for creating a process
The following image shows the stages involved in creating a process:
To access the Process designer and create a process
- Log in to BMC Helix Innovation Studio and navigate to the Workspace tab.
- Select the application in which you want to create a process.
- In the application, click the Processes tab.
- Click New to create a new process definition that will represent your process.
The Start and End elements appear on the canvas by-default. A process can have only one Start and End element. If you want to configure the Start event or the End event), select the element and enter the required properties in the Properties panel.
To configure a process
You can configure process definition properties such as the process name, permissions for users who can run the process, and variables associated with the process.
Perform the following steps to configure a process:
On the Process designer console, navigate to the Properties panel as shown in the following image:
Configure the properties as described in the following table:
Property Description Name Name the process such that the purpose can be easily identified. For example, Employee On Boarding process.
Note: Process name should only alphanumeric characters, hyphens, dashes and spaces.
Description Provide description that briefly explains the process objective. Scope/Customization Options
Option to define the scope for a process definition. This option further contains the following options:
- Application/Library (default)—To limit the use of the definition within the same Digital Service application or library.
- Public—To enable the definition to be used by all the smart applications or library and allow customizations for this definition.
Enabled Select this option if you want to users to start using the process. Run as Allows all process Service Tasks to execute with the permission of the selected user role
At the top right corner of the Process designer console, click Save.
To add a process permission
You can set process permissions for a group and individual role. You have two levels of permissions for processes - Read and Execute. Following are the details about the permissions levels:
- Read: This permission gives you the privilege of viewing the process definition details. You can can view each flow element and the data bound with that element. Anyone who can view the process definition can also execute the process.
- Execute: This permission allows you to run the process. However, you cannot necessarily be able to view the detailed configuration of the process definition.
Assign the process Read permission to a user, such as manager, who needs to view the business process details of your application. The manager may not always be an administrator. For users other than the manager, assign the process Execute permission.
Perform the following steps to add process permissions:
- Click Edit in the Permissions section.
- In the Edit Permissions for window, click Add Permission.
The Edit Permissions for window appears as shown in the following image:
- In the Type column, select Role or Group as required.
- In the Group column, select the particular role or group.
- Select the type of permission - Execute or Read.
- To add another permission, repeat steps 2 through 5.
- Click Save.
To add a process variable
A process has the following parameters that you have to configure depending on the purpose of your process:
Parameter values that you need to provide when starting a process instance. An input variable can be optional or required.
|Parameter that a process instance returns on process completion.
Perform the following steps to add process parameters:
- In the Properties section, click Add/Remove Variables.
- In the Add/Remove Variables window, click Add Variable.
The following image shows the Add/Remove Variables window:
Enter the variable field details as described in the following table:
Field Name Description Name Specify a suitable name for the variable. Variable ID Specify an unique ID for the variable. This value must be numeric. Variable Type
Specify if the variable is an input/output parameter or a local variable. For an input parameter, if you select the Variable Type as Input Required and Data Type as Text or Record, a context key is set automatically. See context key.
Process input parameters and output parameters are the interface of a process. When starting a process, data is passed to the input parameters and when the process is complete, data is received from the output parameters. The only exception to this is Record data type.
Process local variable facilitates process execution. It can be used to capture the result of a process activity such as signal input of a Receive Task or loop data item for a multi-instance loop.
Description Provide a description that clearly indicates the purpose of this variable. Data TypeFrom the dropdown list, select the required data type for the variable.
- If you select Record as the Data Type, you must select a Record definition that you want to associate with the parameter.
- If you choose Selection as the Data Type, you must specify the options that are displayed in the selection list.
- (Optional) If you select Object as the Data Type, you can select the Document definition that you want to associate with the parameter.
Default Value Specify a value that you want to appear by default for the parameter.
If you want to create a list of attachments or texts, select the List toggle key .
- (Optional) To add more parameters, repeat step 2 through step 3.
- Click Save.
Process variable data types
The data types Boolean, Date, Date/Time, Decimal, Floating, Integer, Object, Record, Selection, Text, Time, and Document are supported for the process variables.
The following table describes the record data type, the object data type, and the document data type:
Use the Record datatype to hold a record instance. For the Record data type, a parameter is passed by reference. When a parameter is passed by reference, the caller and the receiver use the same variable for the parameter. If the receiver modifies the parameter variable, the effect is visible to the caller variable.
|Use the Object datatype to hold an object. For the object data type, a parameter is passed by value. When a parameter is passed by value, the caller and the receiver have two independent variables with the same value. If the receiver modifies the parameter variable, the effect is not visible to the caller.
|(Optional) Object associated with Document
Use a Document to hold a JSON schema for an object. When you associate document with an Object type variable, you can expand the Object variable as per the Document schema and use the individual attributes (such as simple object, nested object, or array of objects) in a process expression. For more information, see Defining a document schema.
The following images demonstrate how to access individual attributes within a simple objects or an array of objects.
Accessing attributes in a simple object:
Accessing attributes in an array of objects:
It is a composite data type that allows you to create a list of primitive data types. Currently, you can create a list of only attachment and text data type.
You can also use the List type of variable in a multi-instance loop to iterate over its elements. To populate a list, you can also use the Create List element.
To add a process element
Process designer elements are the building blocks of any process. These elements perform certain actions depending on their configuration. You drag the elements onto the canvas. For information about using Process designer elements, see Process designer elements.
Adding capabilities to your process
After you create the process, consult the following topics for additional capabilities you can add to your process.
|Create process steps from start to end to create a business process flow, provide the process flow order, loop through a data list, and control the execution of a process flow.
Integrate with other applications, refactoring a large process in smaller readable components, model a user performing a task so that a process resumes once the task is complete.
|Add wait states, compute expression value to use the expression value in a process flow, add text annotations that provide additional information about a process, and notify process users.
|Create or update record instances and define a relationship between the record instances in a process flow.
|Create a document instance and an array node in the document instance.
|Analyze the tone of a written document, email, or chat conversation.
|Configuring tone analysis in applications
|Handle errors in a process.
|Handling errors in a process
View the process dashboard and manage process execution such as start a process, stop a process, or resume a process.
|Managing processes by using the Manage Processes dashboard