Getting started with App Connect Flow

I’m just experimenting with the new feature. It looks great but I haven’t quite managed to get started yet.

I’ve attached this flow to a button and would expect a modal to appear, but nothing happens.

It must be something very basic. I would be grateful for any suggestions.

Hi Tom,
How do you run the flow? I.e. did you create it in the app connect tree and call it via a dynamic onclick event?
Or did you create it inline using the flow button?

Are there any errors in the console?

Maybe you can try using the page flow component instead of the inline flow.
Just add the flow component - define the flow and then in a dynamic event - call its run action

3 posts were split to a new topic: Inline flows generate wrong quotation

Great - that works. I hadn’t noticed the flow component.

I edited the inline version according to the component version and it works. I think there is perhaps a bug - the inline version doesn’t wrap expressions in {{}}

Well that is a difference between the inline and the component version.
Inline had to use the back ticks for expressions, while the component flow uses the curly braces

Will check the back ticks syntax if there is a problem. Seem the flow actions run well - it is just calling the external actions

I’m glad you found the problem. I expect I’ll prefer to use the flow component anyway - the code is easier to read apart from anything else.

When you say flows can be ‘reused’, I imagine you only mean on the page - eg from different buttons or events, sending different parameters perhaps. Is it possible to store a flow externally, and call it from different pages?

Also, I see parameters can be sent to flows from buttons, which will be a very useful feature - but I’m not sure of the process. Perhaps after a bit more fiddling with it I’ll understand.

I think you were right when you said this could be a game-changer :slightly_smiling_face:

1 Like

Yes you can reuse flows on the same page. Usually handy when calling the same action from different places. And with different parameters you can give it different swirls.

As for external site flows, we even have more plans on that. Those will be web worker based, so you can start them as background page processes to do heavy lifting work.

4 Likes

Can you point me to the documentation of how to use the Flow component?

I don’t believe there is any documentation up yet. I too am waiting for it.

3 Likes

I seem to have hit a similar issue as @TomD

I have a simple modal opening from a Click event -:

This works fine.

If I convert this to a flow it no longer works -:

I tried with and without the back ticks and also tried generating the flow instead of the initial action and then converting it…

There are no errors in the debug console.

If you remove the single quotes rather than the back ticks it should work - but you’ll then get an error message if you try to edit it in the Flow Editor. I expect this will be resolved on Thursday.

also tried generating the flow instead of the initial action and then converting it…

If you create a flow and then run that using a dynamic event - eg attached to a button - that should work fine. There’s no need to convert it.

Unfortunately not for me.

Agreed, but ultimately I want to use a flow so I can make this conditional. If I simply create the dynamic event, then click the flow button, it asks if I want to convert it automatically.

You can do this now. I wouldn’t have thought the problem converting dynamic events is relevant. You first add a flow component, with whatever conditions you need, and then attach it to a button. The button can optionally pass parameters to the flow, which might be used in relation to the conditions. I’ve only tried passing single parameters but it seems you can also pass multiple parameters - I imagine as arrays or perhaps JSON; hopefully some documentation will cover this at some point. No conversion is involved at any stage.

My understanding of the new flow feature is pretty minimal - I don’t think it’s quite what I imagined it was going to be - but I think the above is correct.

Yes, that’s what I’m trying to do, but it requires flows to work, right? That’s why I want to use a flow - as far as I understand I can’t have a conditional action? Or is that wrong (sorry - I’m quite new to using Wappler - just 1 week).

No - I agree. I was simply using that as an example of the fact that flows aren’t working. I’ve taken a standard, working, dynamic event, and pressed the Flow button so Wappler converts it to a flow with just this same single event, and it no longer works.

I totally agree that I could have done this without starting from a dynamic event - and I also tried that, but I figured that starting with an event that worked, and then having Wappler convert it should also work and it should have removed any possibility that I screwed something up?

Thanks. I’m totally in agreement with you - but it just doesn’t work for me at all. I also removed all my server side components and reloaded them thinking that maybe Wappler hadn’t updated to the latest 2.6.0 files, but that also didn’t help.

Unfortunately until I get this resolved I’m a bit stuck :frowning: .

I haven’t come across any problem using the Flow component itself, based on the little use I’ve made of it. Here’s a basic example of using conditions:

I have a dynamic table with a button in each row. Clicking the button runs a flow, sending the record ID as a parameter. Depending on the value of the ID one of two modals will appear:

Initially I wanted to check the branching by displaying the value of $param.id. However, it seems the scope of these variables is local to the flow (which makes sense). You could assign these variables to other variables if you need to display them etc.

It’s not a very useful example, but hopefully it will clarify matters.

Ok, thanks. I’ve fundamentally done something similar, when that didn’t work, I reduced it to the simple one line action I presented above, but that also doesn’t work.

Short of updating Wappler itself, is there anything else required to ensure the runtime files are also updated to the latest version? I assume Wappler updates local files (eg all the Server Connect PHP files) when updating the application?

I expect you have the right versions of App Connect - 1.9.0. I’m not using much else on this page - jquery-3.3.1 and the Table Generator and Modal extensions (and the current version of Bootstrap).

I think Wappler updates local files when relevant components are used. There is the odd issue with this however. You could delete this folder:
C:\Users\YOUR_USERNAME\AppData\Local\Wappler\Configuration
and restart Wappler or reinstall from scratch. I’ve never needed to do either of these.

Perhaps viewing the console output might help. Clicking a button described above, I see:

image

Thanks - that’s useful. I need to check later, but I don’t recall seeing anything in the console (although I may have only been looking at the error tab, so I will check later).

I remembered I have access to this now. This is all that is printed in the console when I click the button -:

I guess the obvious thing here is that you have your code wrapped in {{}} which I missed earlier, but this is likely the root cause.