How webcon-bps/bpsext-teams works
Project Type & Purpose
• This is an integration plugin that extends WEBCON BPS functionality by leveraging Microsoft Teams capabilities.
• Its primary actions are:
• CreateTeamsChannel – to automatically create a team’s channel and add users.
• AddAttachmentsToChannel – to add workflow attachments to a Microsoft Teams channel.
• The integration relies on Microsoft Graph API calls, as indicated by the presence of helper classes like GraphApiProvider, GraphApiTeamHelper, and GraphApiAttachmentsHelper.
Main Components
a. WEBCON BPS Platform:
• This as the originating system or client that triggers these custom actions.
b. Plugin Core:
• The central integration module (WebCon.BpsExt.Teams) which contains two submodules:
• CreateTeamsChannel
• AddAttachmentsToChannel
• Each submodule includes configuration files, helper logic, and custom action implementations.
c. Microsoft Graph API:
• A critical external dependency used for carrying out tasks in Teams.
• A component to represent the Graph API interactions (GraphApi, GraphApiProvider, etc.).
d. Supporting Components:
• Models: A component for shared data models.
• Common Utilities: Helper classes (e.g., AttachmentsHelper, BpsApiHelper) that assist in data handling and integration with external services.
• Configuration/Metadata: Represent any configuration (e.g., CreateTeamsChannelConfig.cs, AddAttachmentToChannelConfig.cs and the JSON file) that drives custom action behavior.
Relationships & Interactions
• Workflow Instance in WEBCON BPS triggers one of the two plugin actions.
• Each action communicates with the Microsoft Graph API to perform operations on Teams (either channel creation or attachment action).
• The Graph API component acts as an intermediary between the plugin’s custom actions and Microsoft Teams.
• Utility/helper classes support these processes by preparing and formatting data.
• Flow from the input (a workflow request from WEBCON BPS) through the custom action modules and then out to Microsoft Teams via Graph API calls.
Architectural Patterns & Design Principles
• The project is modularized by separating each custom action into its own directory structure, following a principle of separation of concerns.
• Utilize a layered approach:
• UI/Workflow trigger layer (WEBCON BPS)
• Service layer (CustomActions like CreateTeamsChannel and AddAttachmentsToChannel)
• Integration layer (GraphApi and related helpers)
• This setup not only organizes code but also clarifies the responsibilities and data flow between components.