Syndesis: [Conditional Flow] I have to save the integration before adding the flow step

Created on 28 May 2019  路  7Comments  路  Source: syndesisio/syndesis

This is a...


[ ] Feature request
[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Documentation issue or request

Description

As a user I am forced to save the integration before adding the conditional flow step. This is already not good but what is worse is that if I save the integration previously, then I add another step which changes output data which goes to the conditional flow step I am not forced to save the integration again which means new conditional flow step thinks it gets different input data shape and the integration is broken from that point.

Reproducer

  1. Create an integration:
    Webhook -> log
    Add some json schema as webhook output
    {"author":"New Author","title":"Book Title"}

  2. Save the integration

  3. change the integration to:
    webhook -> database (sql insert: select * from contact) -> log
  4. add conditional flow step
    webhook -> database -> split -> conditional flow -> aggregate -> log

note that conditional flow thinks its input data is the json instead of database row

cabug grouui prip0 sourcqe

Most helpful comment

BTW saving when adding the conditional flow isn't necessary for the react codebase. Unless there's bugs of course :-)

All 7 comments

@gashcrumb does it still make sense to provide a fix in the angular code base for this? In case the answer is "no" I would suggest to reassign this one to you so you can have it on the desk for the react code base. Ok with you?

We are trying not to force the user to save anything on the React version of the editor. For the API Provider, for example, the save step isn't there anymore.

Wonder, what is the reason for saving the integration when adding a conditional flow in the Angular version?

+1 for not forcing the user to save anything

Opening and editing the conditional flows without saving simply did not work in Angular code base. I cannot really tell why. Maybe @gashcrumb can

So I suggested we should try and save was driven by when I POC'd the flow connector, I realized that getting to the point where you've added the step, maybe added the conditions etc. would be simply gone with a refresh.

I'd say the main problem though preventing this working without saving is the loading code in edit-page.component.ts and the way it basically makes the current flow service re-initialize. The root of the editor always fetches an updated integration, and we've been adding checks here and there to ignore those updates, but as we know, it's a tricky part of the code where the original assumption was when you go to the page, it fetches and loads the integration into the current flow. It probably just needs a bit of an overhaul to make it work, but I'd still be concerned about the refreshing problem.

BTW saving when adding the conditional flow isn't necessary for the react codebase. Unless there's bugs of course :-)

@gashcrumb can we push this issue to done state then?

I did, really we can close this.

Was this page helpful?
0 / 5 - 0 ratings