Skip to content

Commit 430f5cc

Browse files
committed
Completes the EV charging station use case
Signed-off-by: Charles d'Avernas <[email protected]>
1 parent e3652c0 commit 430f5cc

File tree

2 files changed

+38
-17
lines changed

2 files changed

+38
-17
lines changed

use-cases/managing-ev-charging-stations/README.md

Lines changed: 38 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,38 +4,59 @@
44

55
### System
66

7-
The system is an IoT device management workflow specifically designed for Electric Vehicle (EV) charging stations. It utilizes the Serverless Workflow DSL to automate the monitoring, management, and maintenance of EV charging units, ensuring they operate efficiently and are available for users.
7+
This use case focuses on managing Electric Vehicle (EV) charging stations using a serverless workflow. The system is responsible for handling various events related to the charging process, including card scanning, charging session management, and error handling. The system interacts with the EV power supplier's API to perform necessary operations like starting or ending sessions, locking and unlocking slots, processing payments, and handling errors.
88

99
### Actors
1010

11-
- **EV Drivers:** Individuals who use electric vehicles and need charging services.
12-
- **Charging Station Operators:** Businesses or entities managing the charging stations.
13-
- **IoT Devices:** Sensors and controllers in the charging stations that provide real-time data.
14-
- **Cloud Services:** External systems for storing data and providing analytics.
11+
- **EV Owner:** The person using the charging station.
12+
- **Charging Station:** The physical unit where vehicles are charged.
13+
- **EV Power Supplier API:** The external system responsible for managing the charging process, slot availability, and session data.
1514

1615
### Goals
1716

18-
- **Automate Charging Management:** Streamline the management of charging sessions, including starting, stopping, and monitoring.
19-
- **Monitor Station Health:** Enable real-time monitoring of the charging stations to detect and address issues proactively.
20-
- **Enhance User Experience:** Provide seamless experiences for EV drivers while charging their vehicles.
17+
- **Automate Charging Station Operations:** Automate the process of handling charging sessions, from card scanning to payment processing and error management.
18+
- **Improve User Experience:** Provide a smooth and efficient charging experience by ensuring slots are managed effectively and errors are promptly addressed.
19+
- **Ensure System Integrity:** Implement robust error handling to maintain service continuity and prevent misuse or unauthorized access.
2120

2221
### Preconditions
2322

24-
- The workflow assumes that the charging stations are equipped with IoT devices that can send and receive events.
25-
- An appropriate cloud infrastructure is in place to handle the data from charging sessions and device statuses.
23+
- The charging station must be connected to the EV Power Supplier's network.
24+
- The card used for charging must be registered and valid.
25+
- The charging station has two available slots, each capable of handling one vehicle at a time.
2626

2727
## Scenario
2828

2929
### Triggers
3030

31-
The workflow is triggered when:
32-
33-
- An EV charging session starts.
34-
- An EV charging session ends.
35-
- The charging station reports an error.
31+
The workflow is triggered by two types of events:
32+
1. **Card Scanned Event:** Occurs when a user scans their card at the charging station.
33+
2. **Fault Event:** Occurs when the charging station reports an error or fault.
3634

3735
### Flow Breakdown
3836

37+
#### 1. **Initialization:**
38+
- Capture the event details and store them in the workflow context.
39+
40+
#### 2. **Handle Station Events:**
41+
- Depending on the event type, the workflow either attempts to manage a charging session or handles an error.
42+
43+
#### 3. **Try to Get Active Session:**
44+
- Check if there is an active session for the scanned card.
45+
46+
#### 4. **Handle Active Session:**
47+
- If a session is in progress, attempt to end it. If no session is in progress, try to acquire an available slot.
48+
49+
#### 5. **Try to Acquire Slot:**
50+
- If an available slot is found, start a new charging session. If no slots are available, make the station’s LED flicker red and end the workflow.
51+
52+
#### 6. **Start Session:**
53+
- Initialize a new charging session, lock the slot, and start the charging process.
54+
55+
#### 7. **End Session:**
56+
- End the charging session, process the payment, unlock the slot, and notify the user by flickering the LED.
57+
58+
#### 8. **Handle Error:**
59+
- Contact support, activate the red LED, and notify the system about the error.
3960

4061
### Visualization
4162

@@ -49,7 +70,7 @@ The following diagram represents the high-level flow of the workflow:
4970
document:
5071
dsl: '1.0.0'
5172
namespace: default
52-
name: managing-ev-charging-stations
73+
name: manage-ev-charging-stations
5374
version: '0.1.0'
5475
schedule:
5576
on:
@@ -235,4 +256,4 @@ do:
235256
236257
## Conclusion
237258
238-
This use case highlights the capabilities of Serverless Workflow in managing EV charging stations effectively. By automating charging sessions and monitoring station health, organizations can enhance user experiences for EV drivers while ensuring that their charging infrastructure operates efficiently. Leveraging Serverless Workflow enables responsive and scalable management solutions in the evolving landscape of electric vehicle infrastructure.
259+
This use case demonstrates the automation of key tasks in managing EV charging stations. By integrating with the EV Power Supplier API, the workflow efficiently handles charging sessions, processes payments, manages slot availability, and responds to errors. This ensures a seamless and user-friendly experience while maintaining operational integrity.
248 KB
Loading

0 commit comments

Comments
 (0)