Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set data issues #129

Open
artkinx opened this issue Aug 11, 2020 · 2 comments
Open

Set data issues #129

artkinx opened this issue Aug 11, 2020 · 2 comments

Comments

@artkinx
Copy link

artkinx commented Aug 11, 2020

I have been able to set up the plugin in my own custom interface but I am having issues loading the saved JSON data from sqlserver.
I have saved fine but on reloading the page, the setdata function doesn't work.

This is a sample of the JSON data as is from my db:

{
"operators": { "0": { "properties": { "title": "

                                        "DESK_OFFICER"
                                    
                                ",        "inputs": {          "input_0": {            "label": "Input 1"          }        },        "outputs": {          "output_0": {            "label": "Output 1"          }        }      },      "left": 200,      "top": 520    },    "1": {      "properties": {        "title": "

                                    
                                        
                                        "HOD"
                                    
                                ",        "inputs": {          "input_0": {            "label": "Input 1"          }        },        "outputs": {          "output_0": {            "label": "Output 1"          }        }      },      "left": 190,      "top": 230    },    "2": {      "properties": {        "title": "

                                    
                                        
                                        "ECTECH"
                                    
                                ",        "inputs": {          "input_0": {            "label": "Input 1"          }        },        "outputs": {          "output_0": {            "label": "Output 1"          }        }      },      "left": 190,      "top": 0    },    "3": {      "properties": {        "title": "

                                    
                                        
                                        "EVC"
                                    
                                ",        "inputs": {          "input_0": {            "label": "Input 1"          }        },        "outputs": {          "output_0": {            "label": "Output 1"          }        }      },      "left": 380,      "top": 80    },    "4": {      "properties": {        "title": "HOU"
                                    
                                ",        "inputs": {          "input_0": {            "label": "Input 1"          }        },        "outputs": {          "output_0": {            "label": "Output 1"          }        }      },      "left": 190,      "top": 380    }  },  "links": {    "0": {      "fromOperator": 2,      "fromConnector": "output_0",      "fromSubConnector": 0,      "toOperator": 3,      "toConnector": "input_0",      "toSubConnector": 0    },    "1": {      "fromOperator": 3,      "fromConnector": "output_0",      "fromSubConnector": 0,      "toOperator": 1,      "toConnector": "input_0",      "toSubConnector": 0    },    "2": {      "fromOperator": 4,      "fromConnector": "output_0",      "fromSubConnector": 0,      "toOperator": 0,      "toConnector": "input_0",      "toSubConnector": 0    },    "4": {      "fromOperator": 1,      "fromConnector": "output_0",      "fromSubConnector": 0,      "toOperator": 4,      "toConnector": "input_0",      "toSubConnector": 0    }  },  "operatorTypes": {}}
@artkinx artkinx changed the title Great job for this awesome plugin. Great job for this awesome plugin. Aug 11, 2020
@artkinx artkinx changed the title Great job for this awesome plugin. Set data issues Aug 11, 2020
@orkhanmeh
Copy link

I also have some issues with the setData method. Some links cannot be drawn after setting new data.

@artkinx
Copy link
Author

artkinx commented Aug 20, 2020

I have solved this issue using uricomponent.

I encoded the stringified data from the workflow and then save it in the database, then when opening my workflow builder I used decode.uricomponent to decode the data as it comes from the database and then sent it into the view. Problem solved!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants