You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a7a56e5
Browse filesBrowse the repository at this point in the historyBrowse files
### Description
- Moving `ProcessStateMetadata` logic to factory/extension to try to
keep clean existing core components
- Adding check of step name when adding new steps/processes to process -
names must be unique so when applying saved state it propagates
properly. Currently there are issues if multiple steps have the same
name
- State versioning initial support:
- Processes with 1:1 step match previous and new version (step name
change and/or step logic change) - minor changes on process steps and
not in root process itself
Fixing #9358
#### Out of scope but will be addressed in next PRs
- Processes with N:M steps (process flow changed and potentially also
step logic changed)
- New samples showcasing how to make use of N:M mapping
### Contribution Checklist
<!-- Before submitting this PR, please make sure: -->
- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄
---------
Co-authored-by: Chris <[email protected]>
Copy file name to clipboardExpand all lines: dotnet/samples/GettingStartedWithProcesses/README.md
+50Lines changed: 50 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -271,6 +271,56 @@ flowchart RL
271
271
end
272
272
```
273
273
274
+
## Concepts
275
+
276
+
### Components
277
+
278
+
-**Process:** A sequence of steps designed to achieve a specific goal. These steps are interconnected in such a way that they can communicate by sending and receiving events. The connections between the steps are established during the process creation.
279
+
-**Steps:** Individual activities within a process, each with defined inputs and outputs, contributing to the overall objective. Existing processes can be utilized as steps within another process. There are two main types of steps:
280
+
-_Stateless Steps_: These steps do not retain any information between executions. They operate independently without the need to store state data.
281
+
-_Stateful Steps_: These steps maintain a state that can be persisted, allowing the state to be reused and updated in subsequent runs of the process. The state of these steps can be stored and serialized.
282
+
283
+
In general, both processes and steps are designed to be reusable across different processes.
284
+
285
+
### Versioning
286
+
287
+
Once stateful steps/processes have been deployed, versioning becomes a crucial aspect to understand.
288
+
It enables you to tweak and improve processes while maintaining the ability to read step states generated by previous versions of the steps.
289
+
290
+
Stateful processes involve steps that maintain state information.
291
+
When these processes are updated, it's important to manage versioning effectively to ensure continuity and compatibility with previously saved states.
292
+
293
+
There are two primary scenarios to consider when addressing process state versioning:
294
+
295
+
1.**Minor SK Process Improvements/Changes:**
296
+
297
+
In this scenario, the root process remains conceptually the same, but with some modifications:
298
+
299
+
-_Step Renaming:_ Some step names may have been changed.
300
+
-_Step Version Updates:_ New versions of one or more steps used by the root process or any steps in a subprocess may be introduced.
301
+
302
+
**Considerations:**
303
+
304
+
- Ensure backward compatibility by mapping old step names to new step names.
305
+
- Validate that the new step versions can read and interpret the state data generated by previous versions.
This scenario involves significant modifications to the root process, which may include:
315
+
316
+
-_Step Refactoring_: Multiple steps may be refactored and replaced. However, some properties of the replaced steps can be used to set properties of the new steps.
317
+
-_Custom Mappings:_ Custom equivalent mappings may be required to translate the previous stored state to the current process state.
318
+
319
+
**Considerations:**
320
+
321
+
- Develop a detailed mapping strategy to align old and new process states.
322
+
- Implement and test custom mappings to ensure data integrity and process continuity.
323
+
274
324
## Running Examples with Filters
275
325
Examples may be explored and ran within _Visual Studio_ using _Test Explorer_.
Copy file name to clipboardExpand all lines: dotnet/samples/GettingStartedWithProcesses/Step03/ProcessesStates/FishSandwichStateProcessSuccessLowStock.json
0 commit comments