Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 14 Next »

Creating a workflow for an admin panel with distinct roles for requesting and approving actions involves defining a series of steps and permissions. Below is a basic outline of the workflow, along with the roles and their respective responsibilities. Keep in mind that the actual implementation may vary depending on your specific requirements and the technology stack you are using.

Roles:

  1. Requester Role:

    • Can initiate actions or requests.

    • Submits necessary information for the requested action.

    • Limited permissions, primarily focused on initiating requests.

  2. Approver Role:

    • Reviews and approves/rejects requested actions.

    • Has broader permissions to manage approvals.

Workflow:

  1. Request Initiation:

    • The Requester logs into the admin panel.

    • Navigate to the section for initiating actions or requests.

    • Fills out a request form, providing all necessary details.

    • Submit the request.

  2. Request Review:

    • The system logs the request and notifies the Approver role.

    • The Approver logs into the admin panel.

    • Navigate to the pending requests section.

    • Review the details of the request.

  3. Approval Process:

    • The Approver has the option to approve or reject the request.

    • If approved, the system proceeds with the requested action.

    • If rejected, the system notifies the Requester with a reason for rejection.

  4. Action Execution:

    • If the request is approved, the system executes the requested action.

    • This may involve database updates, changes in configurations, or other relevant operations.

  5. Status Updates:

    • The system updates the status of the request to reflect whether it was approved, rejected, or is still pending.

  6. Notification:

    • Both the Requester and Approver receive notifications on the status of the request.

    • Notifications may be in-app alerts, emails, or any other preferred communication method.

Additional Considerations:

  • Logging and Auditing:

    • Maintain detailed logs of all actions, including who initiated requests and who approved them.

    • This helps with accountability and auditing.

  • Role-Based Access Control (RBAC):

    • Ensure that permissions are well-defined for each role to prevent unauthorized access.

  • User Interface:

    • Design a user-friendly interface that indicates the status of requests and provides necessary information for both roles.

  • Security:

    • Implement proper security measures to protect sensitive data and actions.

  • Scalability:

    • Design the system to scale as the number of requests and users increases.

  • Customization:

    • Allow for customization of approval workflows based on specific business needs.

Customize this basic outline according to your specific requirements, and consider involving stakeholders and end-users in the design process to ensure the workflow meets their needs effectively.

Workflow nodes

New Workflow:

Screenshot from 2024-01-14 18-43-40.png
  • Edit name for Workflow

  • Workflow JSON : …..

  • Select ‘Workflow Initial Component’ : ….

  • + Add param
    - Key:
    - Data type:

  • 'Enabled' toggle

1. userDecision [Flexible user decision]

Screenshot from 2024-01-14 18-56-57.png
  • Component: Web Component Selection

    Assignee User:
    Selection of the person to whom the task will be assigned by choosing a task solution in the Workspace - openTasks section. Only this user will see the creation of the task.

    Assignee Role:
    Only users with the selected role will be assigned to choose a solution for a task in the Workspace - openTasks section.

    Assignee Permission:
    Only users with selected access will be assigned to select a solution for a task in the Workspace -openTasks section.

    Params Key:
    Specify the key in which the data will be displayed when selecting a decision for the open task. By default, it is initialData

    Outport N:
    A solution to the given task that will progress to the next node in the chain.

    • Name: The name of the solution

    • Primary: The button will be painted in the basic color of the platform (oriented towards a positive decision)

    • Danger: The button will be painted in red (oriented towards request rejection)

    • + Add Out Port: Adding additional options for solving the problem

    In: This signifies the connection of the previous node and the transfer of data regarding the task.

    Out Port: This port serves as the departure point for the request to move to the next connected node or exit. Multiple ports may exist, depending on the options created for problem resolution.

  1. actionCall [Call any action of any service]

Screenshot from 2024-01-14 19-07-20.png
  • Action: A functionality accessible within the GraphQL endpoint of the project, which can be invoked with the provided parameters.

    Params Key: The key containing the data passed to the function call. Default is initialData.

    Result Key: A key containing data from the function — standard result.

    In: Connects the previous node and transfers data.

    Success: Connects to the next node upon successful execution of the function.

    Error: Connects to the next node when execution fails.

  1. CheckPermissions [Check permissions]

Screenshot from 2024-01-14 19-10-50.png
  • Params Key: Specifies the key containing the employee's permissions whose access needs to be checked. The default is initialMeta.permissions

    Permissions: Selection of permissions that will determine the transition to the true port.

    In: Connects the previous node and transfers data.

    True: Connects to the next node if the selected accesses match the selected employee's access.

    False: Connects to the next node if the selected accesses do not match the selected employee's access.

  1. checkRoles [Check roles]

Screenshot from 2024-02-21 12-49-29.png
  • Params Key: Specifies the key containing the ID of the employee whose roles need to be checked. The default is initialMeta.user.id

    Roles: The selection of roles will determine the transition to the true port.

    In: Connects the previous node and transfers data.

    True: Connects to the next node if the selected roles match the role of the selected user.

    False: Connects to the next node if the selected roles do not match the selected user's role.

  1. copy [Copy data]

Screenshot from 2024-02-21 12-51-02.png
  • From: The key containing the data to be copied.

    To: The key where the data to be copied will be located.

    +Add Copy action: Creates additional keys whose data will be copied to other keys.

    In: Connects the previous node and transfers data.

    Out: Connects to the next node and transmits data.

  1. delete [Delete values]

Screenshot from 2024-02-21 12-56-00.png
  • Delete Item: A key with a value that will be deleted and passed on without this data.

    Add Delete action: Adds fields where the key for deleting data will be specified.

    In: Connects the previous node and transfers data.

    Out: Connects to the next node and transmits data.

  1. if [If condition]

Screenshot from 2024-01-14 19-38-00.png
  • Condition: Description of the condition under which the connection of the next node will be directed through the true output. For example, wallets.length > 0.

    In: Connects the previous node and transfers data.

    True: Connects to the next node and transfers data when the specified condition is met.

    False: Connects to the next node and transfers data if the specified condition is not fulfilled.

  1. set [Set values]

Screenshot from 2024-02-21 12-56-40.png
  • Key: The identifier where the transferred data in the Value field will be stored.

    Type: The data type to be saved:

    • String

    • Number

    • Boolean

    • Expression

    When selecting ‘Expression’, - concatenate strings with values to return a string type. For example, "Create a new currency: " + initialData.id, where initialData.id represents the ID of the new currency. The resulting value might be, for instance, "Create a new currency: USDT".

    Value: The data to be saved.

    Add Set action: Adds another block for setting data.

    In: Connects the previous node and transfers data.

    Out: Connects to the next node and transmits data.

  1. startNode [Starting point of any workflow]

Out: Establishes the connection to the next node and facilitates the transfer of data.

  1. endNode [End point of workflow]

In: Connects the previous node and completes the Workflow execution.

New workflow creation

In this guide, we'll explore the process of constructing a workflow system that incorporates both requester and approver employees, task creation, decision-making, and seamless workflow operation without requiring approval configuration from a super-admin. Additionally, we'll delve into the management of permissions for employee roles, auditing logs, and tracking runtimes during and after the approver's decision.

  1. To manage workflows effectively, an employee needs permission to editWorkflow and viewWorkflows for their role, including the ability to edit workflows and view existing workflows.

Screenshot from 2024-04-12 08-48-52.png
  1. The next step is to assign the appropriate role to the employee.

Screenshot from 2024-04-12 08-50-03.png

So, now an employee with the email qa@tunex.io has the role ‘superadmin’ with permissions ‘editWorkflow’ and ‘viewWorkflows’

  1. Login to Puppeteer with the credentials qa@tunex.io and navigate to the Configurations page. Once there, locate the "Workflows" sub-menu. Click on it to access the workflows section. Now, press the "+" button to initiate the creation of a new workflow. Let's embark on the journey of creating a process specifically designed for updating existing Currency configurations.

Screenshot from 2024-04-12 09-06-53.png

Give the workflow a unique name such as "updateCurrency." Next, select the initial component that should be used in the workflow.

  1. After successfully creating the workflow, there will automatically be a start node and an end node.

Screenshot from 2024-04-12 09-13-07.png
  1. In the following workflow, the first step is to check employee permissions. To determine the possibility of editing currency configurations or making requests for edits, the employee's role should have permission to viewCurrencies and editCurrency. Therefore, it makes sense to add a 'check permission' node where these permissions are verified. In the event that the employee lacks such permissions, the workflow will proceed to the 'end' node.

Screenshot from 2024-04-12 09-31-26.png
  1. If the workflow is simple enough and there is no need to check anything else except permissions, the next step is to add an action call that launches the expected result.

Screenshot from 2024-04-12 09-42-23.png

As observed in the following workflow: if the employee passes through the permissions check, the subsequent step will involve an action with currencies.updateCurrency. Afterward, the success and error flows will lead to the end node.

The audit logs for such workflow will be the following:

The runtimes for such workflow will be the following:

Creation Process

  1. Steps for Requester

    • Initiating a Creation Request

    • Providing Necessary Information

  2. Steps for Approver

    • Reviewing the Request

    • Approving or Rejecting the Request

Update Configurations

  1. Steps for Requester

    • Initiating an Update Request

    • Providing Details of Configuration Changes

  2. Steps for Approver

    • Reviewing the Update Request

    • Approving or Rejecting the Changes

Operations Approval

  1. Steps for Requester

    • Requesting Approval for Operations

    • Providing Context and Details

  2. Steps for Approver

    • Reviewing the Operation Request

    • Approving or Rejecting the Operation

Best Practices

  1. Tips for Effective Request Submission

  2. Guidelines for Approvers

Troubleshooting

  1. Common Issues and Solutions

  2. Error Messages and Their Meanings

Glossary

  1. Definitions of Key Terms Used in the Documentation

Appendix

  1. Additional Resources

  2. Contact Information for Support

  • No labels