adding READ ME main processes

This commit is contained in:
mr 2024-08-30 15:14:45 +02:00
parent 8180fe5e99
commit af18dba556
2 changed files with 46 additions and 0 deletions

View File

@ -1,2 +1,47 @@
# oc-lib # oc-lib
## SPECIAL FLOWS IN OC-LIB RESUME :
### WORKFLOW AS ITS OWN WORKSPACE
A workflow on post, put, delete, manage a workspace with resources.
This workspace is deeply related to workflow by sharing its naming such as : "<workflow_name>_worspace"
### WORKFLOW GENERATE ITS OWN EXECUTION
A workflow on post, put, delete, with a schedule && schedule_active to "true", must manage execution by adding, deleting execution
depending on change (update -> involved delete into add)
If schedule_active is set to "false" execution will be deleted.
### WORKFLOW GENERATE ITS OWN BOOKING ON PEERS
A workflow on post, put, delete, with a schedule && schedule_active to "true", must manage booking by adding, deleting execution
with http requests on peers
depending on change (update -> involved delete into add)
If schedule_active is set to "false" booking will be deleted.
### SHARED WORKSPACE : WORSPACE & WORKFLOW
You can create a share workspace with workspace & workflow.
When a share workspace is post, put, delete it update workspace or workflow <shared> field.
Workspace can be shared on one share workspace
Workflow can be shared in multiple workspace
### SHARED WORKSPACE SHARE TO PEER
When writing a shared workspace, it set up to date on peers involved in shared workspace
It create or delete shared workspace in remote peers by http requests on oc-shared (update -> involved delete into add)
It create or delete workspace involved in shared workspace by http requests on oc-workspace (update -> involved delete into add)
It create or delete workflow involved in shared workspace by http requests on oc-workflow (update -> involved delete into add)
### WORKFLOW WRITE BUT SHARED
On delete & update & post, workflow will send to peer in <shared> field by http request on oc-workflow
### WORKSPACE WRITE BUT SHARED
On delete & update & post, workspace will send to peer in <shared> field by http request on oc-workspace

View File

@ -259,6 +259,7 @@ func (wfa *workflowMongoAccessor) StoreOne(data utils.DBObject) (utils.DBObject,
if err != nil { if err != nil {
return nil, code, err return nil, code, err
} }
wfa.share(res.(*Workflow), false, wfa.Caller) // share the creation to the peers
//store the executions //store the executions
if code, err := wfa.execution(res.GetID(), res.(*Workflow), false); err != nil { if code, err := wfa.execution(res.GetID(), res.(*Workflow), false); err != nil {
return nil, code, err return nil, code, err