Hello,
I am integrating Python and Django with Multichain using streams. What I am trying to achieve is the following:
- 3 participants are involved in this process. One of the participants merely views the data on the stream as the process progresses.
- Participant A initially fills in a web form with data. This data gets save to a stream. They will fill out, for example, 4 fields (4 keys). The entire dataset is about 12 keys and an attachment.
- Participant B gets a notification that a new stream has been created. Participant B looks at the data on the stream and will add information to the stream. Once done, a separate workflow engine sees the data entry as complete and notifies Participant A.
- Participant A reviews the data and may either accept the data as good, or enter into a "interaction loop" with Participant B back and forth with additional data. There is a point where the dataset is consider completed and marked as "complete".
Participant A and B may do this process for multiple data sets. However, each process needs to be grouped.
So, how I am going about this:
- When the process starts, a new stream is created in the chain called "ParA_B_1". The naming structure is basically the ID of both participants and an integer that identifies this data exchange process. There can also exist ParA_B_2, ParA_B_3, ParA_B_4 and so on.
- All data in the stream has the same key value (for example, the number 1) as a way of being able to group data in the stream. Ultimately, 12 entries with key 1 will exist.
The issue I am facing is that when these interactions (data entry into the stream with the same key) happens and when I retrieve data, even though I may have 20 records in the stream when I query the stream only the last series of inputs appears.
My question is:
- I am not understanding the technology and each interaction (or step in a workflow) must be assigned a key within the stream and use the stream as the container for the interaction? For example, in this 4 step process 3 pieces of data are captured per step. Should each step have their own key? i.e: Step 1 - Key 1, Step 2 - Key 2 or can I have a single key for all steps?
The idea of this application is to have these participants interact with data exchange while a 3rd independant participant can monitor the process and use the immutability of blockchain as to validate that all data entered during the process between both participants cannot be modified and is open to all parties involved in this data exchange or am I approaching this problem incorrectly?
Thanks,