Skip to main content

Integration flows

Update

Introduction

Soffid provides a workflow to modify and/or delete a user in the final system. In it, we can see each of the steps of which this process is composed. 

Diagram


image-1659448091093.png


Step by Step

In this document, we will explain the process that Soffid performs to modify a user for the SQL connector.

1. UpdateUser

First of all, Soffid checks if the user exists in Soffid and then checks the operation to perform, update or delete. 

1.1. If the user does not exist in Soffid, the process finishes [10. End]

1.2. If the user exists in Soffid, the process continues [2. User to remove?].

2. User to remove?

2.1. If the user is marked for Deletion, Soffid will ask for user consent to continue with the flow or to cancel it. If the answer is Yes, the flow follows the branch of Yes, [3. Delete branch].

image-1659534714096.png

2.2. If the user is marked for Update, it continues with the flow following the branch of No, [4. Insert or Update branch].

3. Delete branch

3.1. When the operation to perform is to delete a user, first of all, Soffid has to check if the user exists in the target system. To do this, Soffid executes the property check of the Account or User object.

3.1.1. If the user does not exist, there are no actions to perform in the target system, so the process finishes [10. End].

3.1.2. If the user exists, the flow continues executing the Pre-delete triggers if there is anyone configured. More than one script can be configured. These scripts are executed just before the main action, remove the user, and the result (true or false) determines if the main action will be performed or not.

3.1.2.1. False: if the response is false for one or more of these triggers, the process finishes [10. End].

3.1.2.2.True: if the response is true for all of these triggers, Soffid continues the process.

3.1.3. Soffid removes the user. To do that, Soffid executes the property delete of the Account or User object.

3.1.3.  Then Soffid executes the post-delete triggers if any. These triggers can be used to perform a specific action just after performing the remove user operation on the target object.

3.1.3.  Then the process finishes [10. End].

4. Insert or Update branch

4.1. When the operation to perform is to update a user, first of all, Soffid generates the columns values.  That is, Soffid creates an object with the mapping values.

4.2.Then Soffid asks if the user exists in the target system to decide if the action to execute will be an update or an insert. Soffid executes the property check of the Account or User object.

4.2.1. If the user does not exist in the target system, the process continues for the insert user branch

4.2.2. If the user exists in the target system, the process continues for the update user branch.

5. Insert user branch

5.1. Soffid executes the pre-insert triggers if there is anyone configured 

5.1.1. False: if the response is false for one or more of these triggers, the process finishes [10. End] and the user is not created

5.1.2. True: if the response is true for all of these triggers, Soffid continues the process.

5.2. Soffid creates the user. To do that, Soffid executes the property insert of the Account or User object

5.3. Then Soffid executes post-insert triggers if any. These triggers can be used to perform a specific action just after performing the create user operation on the target object.

5.4. Then the process continues with [7. Grants].

image-1660058697175.png

6. Update user branch

6.1. Soffid fetches the current values of the user.

6.2. Then compute delta changes  ¿¿¿¿

6.3. And finally execute the pre-update triggers.

6.3.1. False: if the response is false for one or more of these triggers, the process finishes [10. End] and the user is not updated

6.3.2. True: if the response is true for all of these triggers, Soffid continues the process.

6.4. Soffid updates the user. To do that, Soffid executes the property update of the Account or User object

6.5. Then Soffid executes the post-update triggers if any. These triggers can be used to perform a specific action just after performing the update user operation on the target object.

6.6. Then the process continues with [7. Grants].

image-1660058603884.png

7. Grants

At this point, soffid runs the actions relative to the grants .........................................

7.1. Generate account column value

7.2. Soffid Fetchs current grants for the user.  Soffid executes the property selectByAccount of the grantedRole object

7.3. Parse grant rows

7.3. Then the process continues with [8. Grant to add]

8. Grant to add

This is a loop while there are grants to check.

8.1. If there are No grants to add, the process goes to [9. Grant to Remove].

8.2. Yes, there are grants to add:

8.2.1. Generate grant column valuesvalues: check 

8.2.2. Soffid executes the pre-insert triggers if there is anyone configured:  

8.2.2.1. False: if the response is false for one or more of these triggers, the process  goes to [8. Grant to add] and the grant is not inserted.

8.2.2.2. True: if the response is true for all of these triggers, Soffid continues the process.

8.2.3. If the result of the triggers is true, then Soffid creates the grant. To do that, Soffid executes the property insert of the grantedRole object.

8.2.4. Then Soffid executes the post-insert triggers if any. These triggers can be used to perform a specific action just after performing the create grant operation on the target object.

8.2.5. Flow goes to [8. Grant to add].

9. Grant to remove

This is a loop while there are grants to check.

9.1 No: If there are No grants to add, the process goes to [10. End].

9.2. Yes,  there are grants to remove:

9.2.1. Soffid executes the pre-delete triggers if there is anyone configured:

9.2.1.1. False: if the response is false for one or more of these triggers, the process finishes [10. End] and the grant is not deleted.

9.2.1.2. True: if the response is true for all of these triggers, Soffid continues the process.

9.2.2. If the result of the triggers is true, then Soffid deletes the grant. To do that, Soffid executes the property delete of the grantedRole object. This operation can return a true or false result.

9.2.2.1. False: the delete action could not be performed and the process check for another grant [9. Grant to remove].

9.2.2.2. True: the delete action could be performed properly. Soffid continues the process.

9.2.3. Then Soffid executes the post-delete triggers if any. These triggers can be used to perform a specific action just after performing the delete grant operation on the target object.

9.2.4. Flow goes to [9. Grant to remove].

10. End

The process finishes and the log is displayed.