# BPM Editor ## Description BPM is a technology that allows modeling, implementing, and executing processes automatically to enhance efficiency and productivity in support of enterprise goals.

Soffid includes a BMP (Business Process Management) in its Smart Engine to provide useful workflows integrated with the processes and the policies of the Soffid core.

> The BPM Editor Addon allows you to create, configure and publish business processes very easily for the Soffid administrators. The workflows were implemented with an external programming tool, and it required knowledge of the Soffid core and programming languages. After installation of the addon, you could find BPM editor in the section: `Administration > Configure Soffid > Workflow settings > BPM editor` The BPM Editor addon provides some templates to create new workflows, these templates depend on the process type selected when you are adding a new business process. Nowadays there are the following templates available: - User management ([User.pardef](https://bookstack.soffid.com/attachments/7)). - Permission management ([Permissions+request.pardef](https://bookstack.soffid.com/attachments/8)). - Account reservation ([Account+reservation.pardef](https://bookstack.soffid.com/attachments/10)). - Permission request.

You can find additional information by visiting [Process types chapter](https://bookstack.soffid.com/books/bpm-editor/chapter/process-types "Process types") or visiting a specific process type:

- 1. [User management](https://bookstack.soffid.com/books/bpm-editor/page/user-management "User management") - 2. [Permissions management](https://bookstack.soffid.com/books/bpm-editor/page/permissions-management "Permissions management") - 3. [Account reservation](https://bookstack.soffid.com/books/bpm-editor/page/account-reservation "Account reservation") - 4. [Permission request](https://bookstack.soffid.com/books/bpm-editor/page/permission-request) Once a workflow is published with the proper configuration, the users with the correct permissions could start, approve or observe the workflow from the "My Request" option. You can find more información on [My Request page](https://bookstack.soffid.com/books/soffid-3-reference-guide/page/my-requests "My requests") When a workflow is deleted, that workflow continues to be available to be executed. If you do not want workflow will be executed, you must disable that process on the Business process definition index page. If you disable a workflow, processes initiated and pending can be finalized, but no longer than workflow could be started. A workflow could be updated with a new version. Processes started with the previous version, will be performed with the previous definition (previous version). And processes start with the new version, which will be performed with the new version.

We will use two concepts to explain that process, identity, and end-user. Identity will be the identity or user that will be created, updated, or deleted in Soffid Console. The **end-user** is referred to an user of Soffid that will request processes using the self-service portal.

## Screen overview ## Custom attributes ### Process editor That area of the form displays the general information about the business workflow and the main operations to perform. The actions to perform are defined by flowing that link [Process editor actions](#bkmrk-new-bpm%C2%A0) - **Process name**: identifier name of the workflow. This name will be used to label the workflow for the end-user. BPM editor allows you to manage the process into folders, you can type the folder name following by "/" . `Folder 1 / Update my data` `Folder X / Process Name 1` `Folder X / Process Name 2` [![image-1661337550708.png](https://bookstack.soffid.com/uploads/images/gallery/2022-08/scaled-1680-/image-1661337550708.png)](https://bookstack.soffid.com/uploads/images/gallery/2022-08/image-1661337550708.png) - **Process type**: allows categorizing the process. There are three different types of processes, each one with its own template. - **Use management**: used to create and update identities and their attributes. - **Permissions management**: used to create, update and remove permissions and account to identities. - **Account reservation**: to use privileges account. In this case, initiators must be -nobody-, that is nobody can start the process directly. - **Description**: a brief description of the workflow. When an end-user starts a workflow, this text will be displayed in the Actions log tab. - **Initiators**: here you could configure the roles or the identities that could start a new workflow from the Console and Selfservice. E.g. "admin" identity, "SOFFID\_ADMIN" role, both separated by comma ',' as "admin,SOFFID\_ADMIN" or if you want to publish the workflow to everyone, you can use the text "tothom" or the character '\*' . When you are configuring an Account reservation process, that value must be -nobody-, that is nobody can start the process directly. - **Managers**: here you could configure the roles or the identities that could perform tasks in the workflow as approve permissions or cancel the workflow. - **Observers**: here you could configure the roles or the identities that could open the workflows in read-only mode. ### Steps There are some available step types to define the properties and behavior of the process. Depending on the selected type, there are common properties to all types and specific properties for each one of them. The workflows have default steps defined, those steps can be deleted or updated, and other steps can be added. Each step has detail to set up its properties and its behavior. The default steps are below: - **Start**: this step is used to define the beginning of the workflow. - **Screen**: this step is used to define a form that must be filled in by the end-user. - **Apply changes**: this step is used to show the manager a form with the changes that must be approved. - **End**: this step is used to define the finish of the workflow. Other available steps to custom your business process: - **Detect duplicated user**: this step is used to detect duplicated users. - **Grant approval**: this step is used to show the manager a form with the changes that must be approved. - **Custom**: this step allows to add a script to be executed. - **Mail**: this step is used to configure sending mail. - **Fork**: the process is splited into two or more paths that are run in parallel, allowing multiple activities to run simultaneously. - **Join**: two or more parallel sequence flow paths are combined into one sequence Flow path. #### Step details All steps have some detailed data: - **Step name**: identifier name of the step. - **Step type**: step to be configured. - **Description**: a brief description of the step. ### Attributes The Attributes tab is allowed for creating custom attributes to be used to configure the workflow. The defined attributes will be used in the Steps tab to be mapped with the Soffid data. There are customized templates depending on the Process Type selected, those give you default attributes that you can customize. - **Code**: code is used internally as an identifier by the system. Try to create a short one without spaces and with uppercase to separate words. - **Label**: label displayed on the web page. This may be a name or a short description. - **Data type**: data type of the value of the metadata attribute. The data type includes: - Basic data types as String or Boolean. - Extended data types as Photo or E-mail. - Default Soffid objects as User or Group. - Your own custom objects are created in Soffid. - **Multiple values**: (Optional) If this flag is enabled, the metadata may contain more than one value. - **Size**: (Optional) Set the maximum length of the value. - **Values**: (Optional) Allows creating a set of values to provide to the user as a list. Use the button with the plus icon (+) to create new values. ## Actions #### BPM editor actions
**Add new** Allows you to add a new workflow to Soffid. You can choose that option on the hamburger menu or click the add button (+). Second, you need to set a name and select the process type and accept. Then Soffid opens the Process editor, which allows you to configure the process. And finally, save the process configuration, or save and publish. If you cancel that operation, Soffil will not save the process definition.
**Import** Allows you to import a workflow from a .pardef file. That functionality is very useful for next scenarios: - To restore a workflow from a backup (a workflow previously exported). - To deploy a workflow from one environment to another (for instance from Test to Live). - To start a new workflow from a template. You can choose that option on the hamburger menu. Then you can pick up a .pardef file, and save the process or save and publish. Soffid will ask you for confirmation, If you confirm, finally, Soffid will import the process definition. If you cancel that operation, Soffil will not upload and save the process definition.

Be in mind with this option only can upload workflows defined by BPM editor.

**Edit process** Allows you to edit a workflow to update it. You can choose that option, selecting the pencil icon located close to the process name that you want to update. Then you can update the process definition and save, or save and publish the updates.
**Remove process** Allows you to delete a workflow. You can choose that option, selecting the subtraction icon located close to the process name When a process is deleted, that process continues to be available to be executed. If you want that process is not available, you must disable that process on the [Business process definition](https://bookstack.soffid.com/books/addons/page/business-process-definition-index "Business process definition index")[ index](https://bookstack.soffid.com/books/addons/page/business-process-definition-index "Business process definition index") page
**Export process** Allows you to export a workflow to a .pardef file. You can choose that option, selecting the export icon located close to the process name. Automatically Soffid will download a .pardef file with the process definition.
#### Process editor actions The action that can be performed in the process are detailed below
**Save** Allows you to save all changes included in the workflow. That workflow can be a new or an updated workflow.
**Save and Publish** Allows you to save the changes performed in the workflow setup and also publish the workflow to be used in Soffid. After this action, the last version of the workflow will be available for the end-user (with the proper permissions) in the Soffid Console and Self-service portal.
**Cancel** Allows you to quit the process editor without saving changes. Soffid will ask you for confirmation to exit without saving updates
##### Steps section actions
**New step** Allows you to add a new step to the workflow. When a new step is added, it will be mandatory to configure it.
**Delete step** Allows you to delete an existing step. To delete a step you must click on the subtract icon (-) close to the step that you want to delete.
##### Fields
**New field** Allows you to add a new field on the Fields tab. You need to click the "New field" button and Soffid will show a new row to fill in. For each new field you may define: - Label: allows you to give a name to that field. That label will be shown on the process form to final users. - Name: allows you to select an identity attribute or specific attribute defined for that process. That will be the field type (e.g. selector, input field, date field...) - ReadOnly: allows you to determine if this field could be updated. - Validation: this allows you to add a custom script with validation rules. - Visibility: this allows you to add a custom script to determine the visibility of that field.
**Delete field** Allows you to delete a field. To delete a field you must click on the subtract icon (-) that is at the end of the same line.
**Validation** Allows you to add a new customized script with validation rules
**Visibility** Allows you to add a new customized script to determine the visibility of that field.
**Order** Allows you to sort the fields using drag and drop.
##### Triggers
**New trigger** Allows you to add a new trigger to perform actions.
**Delete trigger** Allows you to delete a trigger. To delete a trigger you must click on the subtract icon (-) that is at the end of the same line.
**Action** Allows you to add a new customized script.
##### Incoming transition
**New transition** Allows you to add a new incoming transition. You need to click the "New transitions" button, then Soffid will show a new row to fill in. For each new incoming transition you may define: - From: this allows you to select where the workflow comes from. - Incoming transition: brief name to identify the transition. - To: current step. - Action: allows creating a custom script to perform specific actions.
**Delete transition** Allows you to delete an incoming transition. To delete an incoming transition you must click on the subtract icon (-) that is at the end of the same line.
**Action** Allows you to add a new customized script by clicking the pencil icon.
##### Outgoing transition
**New transition** Allows you to add a new outgoing transition.
**Delete transition** Allows you to delete an outgoing transition. To delete an outgoing transition you must click on the subtract icon (-) that is at the end of the same line.
**Action** Allows you to add a new customized script by clicking the pencil icon.
##### Attributes section actions
**Add attribute**Allows you to add a new attribute to use to configure the step.
**Delete attribute**Allows you to delete an attribute. To delete an attribute you must click on the subtract icon (-) that is at the end of the same line.
**Add value**Allows you to add a new value to the attribute.
**Delete value**Allows you to delete a value. To delete a value you must click on the subtract icon (-) that is at the end of the same line.