---
title: "B.A.M. example"
canonical: "https://wiki.soft1.eu/space/SS5EN/189268046/B.A.M.%20example"
format: markdown
---
Follow the step-by-step instructions below to design a Business Process, concerning the approval of the amount of a transaction.

![image](media://a168a215-3432-4f63-87b6-85b1040e0e78)

Throughout the design process, be sure to save any changes. Further technical information on **SOFT1 B. A. M. ** can be found in the SOFT1 Tools list, which is available for certified partners at the SOFT1 Partners Portal.

## **Starting Step**

1. Set the Business Process status in** Design **mode, as all tools (toolbar buttons, steps, fields, variables, etc.) are only available in this mode.
2. Start **designing **the steps in the **flowchart**. Click on a step, and select the next one, either from the left table or from the "Add" button of the toolbar, e.g. Add Decision.

![image](media://26feb1e9-d418-4b45-ae3b-31fcb96771ee)

3. Define at each **step**, including the **Starting **step, the element that the Business Process will start from, e.g. from an Entity.

4. Select the event that will **trigger **the Business Process e.g. after inserting a record.

5. Type or select from the list the Entity that the Bus. Process will start from, e.g. Suppliers Other Transactions.

6. Specify the conditions that trigger the Business Process once the event occurs, e.g. if a record is registered in the Suppliers Other Transactions, using the 1000 Series and the Total Value of the Transaction is > 0. You are able to use any of,

- 
  - the > Macro (inline-media-image)

   of the entity or
  - the
    (e.g. SQL commands) and X.SYS parameters. The variables you enter at this point are initialized and can later be used at another stage of the Bus. Process.

7. Specify the next step of the Bus. Process, e.g. Decision.

8. In the "Advanced" section, write the Javascript code that will be executed in the before post-event, i.e. before the record is posted in Suppliers Other Transactions. This step is very useful as it stores a value in the StartID variable before the record is posted.> Macro (inline-media-image)



This value can be later used:

- to compare it with the next steps or
- in case you need to modify a value (e.g. SALDOC.APPRV = 0) and activate another flow, checking the results from modifying this value along with other conditions.

  


## **Decision Step (No)**

Proceeds to step "Amount Approval  > 100" in case the "LINSUPDOC.NETAMNT> 100" condition is true, otherwise, it proceeds with amount approval.

![image](media://bcc2db0c-f4e4-4bfe-9629-309a0b2fb258)

1. Click on "Decision" to fill in the Description.
2. The "Decision" step divides the flow into as many different steps as you wish. Select the next step, either from a table (left click) or from the "Add" button of the toolbar, e.g. Add a Job for "Automatic Approval of amount < 100”.
3. Declare the Condition.
4. Once you have created the step of the job, you can go back to the Decision to declare that the next step (if the conditions are met) will be the "Automatic Approval of amount < 100 €”.


## **Job Step: Automatic Approval of Amount < 100 €**

1. Click on "Job" to set the parameters.
2. Fill in / Modify the Description.
3. Select the Job Type "Insert - Update Record" which uses the SetData method to add or update records in entities. Based on the SetData parameters, proceed as follows.

![image](media://2ba6447a-c981-4449-ac55-3e3b7fb42359)

  


4.  Select the SOFT1 entity in which the approved record will be automatically added/updated. 

5. Specify the object id that will be updated using the variable that was initialized in the starting step. The variable you enter here is re-initialized. Alternatively, leave it blank in order to enter new records.

6.  Select a custom SOFT1 screen form, from Other Transactions, in case extra mechanisms need to be activated.  e. g.  a javascript. 

7. Specify the variables or fields that will be updated, along with the values they will take to complete the step.

To proceed, check out the steps below, for which we have designed and used the following variables.

![image](media://9b93e00d-b939-4ebd-bddc-61a69bc1762b)

## Next Design Steps

Use the below steps, as an example, in order to design the rest of the flow of the Business Process.

![image](media://1408ec0c-8929-44b0-97f1-63197b6d2459)

  


![image](media://0bb7e525-559b-470f-a1b0-581617343cd9)

  


![image](media://ed381839-210c-4d1b-a627-8798dcd4489e)

![image](media://30301349-1df4-41e3-b2d4-a4f8866d5bf9)

![image](media://ac26c180-80d9-4eb5-ad1a-65e39315d17d)

  


![image](media://8526b7f5-0243-4c8c-9802-57a24126530a)