This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Workflow with CustomUIs - problems...:(
after trying a lot on myself in addition with the fact that I am a total beginner to editorial and Python I am asking for your brains here.
thanks a lot in advance for wasting your time on my problems :)
want to start a workflow in which opens a CustomUI ('starting level') offering me several buttons for different functions. depending on which button I tap a CustomUI from the '2nd level' should be opened with functions.
'starting UI' should be close/in background and another UI displayed in the same workflow since I use global variables for storing information out of those UIs.
what I have so far
I can start the workflow and it displays the 'starting' UI.
After pressing a button for one of the 2nd level UIs nothing happened.
Tried to use 'DismissUI' command after pressing the button in 'starting' UI but then the complete workflow stops.
Guess I am just starting this whole issue the wrong way. Not sure.
So far I used workflow commands together with CustomUI and some small Python scripts in those UIs.
Any help highly appreciated! :)
Thanks a lot.
Myabe this workflow I created will help you understand how the UI system works?
Thanks a lot!
Seems I have to spend some time on that :)
What I saw at a first glance is that you have a main function as one workflow step which then starts the examples.
Maybe you could point me to a scenario where you have that first workflow (WF) step opening an UI (UI 1). then press a button there which leads to an output of that first WF step. based on this output there is an IF... THEN next WF step from where I can start a 2nd UI (UI 2.x). my idea was to have 2 or 3 of those '2nd level' UIs (2.1, 2.2, 2.3 etc) in the overall WF which I want to run. depending on the button pressed from that first step (in UI 1) I either open UI 2.1 or 2.3 or .... I like to have UI 1 disappear and e.g. UI 2.2 appear.
that is my actual problem. I can start with UI 1 and then press a button there and the output on WF level is according to the pressed button. so the IF...THEN part works as well. but where to put the 'dismiss UI' command? after UI 1 finished? guess then the output would never reach the rest of my WF.
will scrutinize your example and I get better understanding. maybe my whole approach should be different.
I wanted to use as much of the pre-configured 'WF pieces' and as less Python code as possible to build the small 'app'. but maybe I have to build my 'app' from Python only which would be hard for me since I am a real novice there.
again thanks for your time on this.
The way this workflow works is that the whole workflow is stopped by default. If you want to see how one workflow works, just drag it above the "Stop" action.
This way you can test each workflow action at a time.
For example, if you want to know how to use delegates, drag the "Delegates" action above the "Stop" action then press the play button.
As for your request:
Version 1.2 has inspired me to get back to making Editorial workflows, so I will take a stab at making an example workflow for you. If you want, I can make a few Custom actions (pre-configued pieces) that you can easily customize yourself.
That is more I could ask for!
Thank you very much in advance.
Seems like I take double advantage from Oles update :)
Have you tried using the "Sub-Workflow" action?
You could say that when a button is pressed, run a sub workflow. These sub-workflows can be ran as copies or as a link to other workflows. If it is ran as a copy, the user does not have to have the additional workflow installed on their device in order for it to work.
so far I tried to have one workflow for all. I am going to try to put the 2nd level UIs into sub-workflows.
How does the UIs interact?
I guess my biggest problem at the moment is to understand the dependencies within one workflow when CustomUIs are used.
Is the first CustomUI created/used the parent view for all other UIs used later in this same workflow? or are they all independent views with no overall parent view?
does the workflow itself create a parent view for all CustomUIs used in this workflow? if yes - how to access it to be able to browse the child views to be able to close one particular?
Questions over questions... :)
Hope I am not stressing your patience too much.
Again thanks for trying to help me and spending your time!
I found an example where used a custom UI and sub-workflow to display one workflow on top of another. I made the sub workflow a snapshot copy, so this workflow is sorta embedded in the sub-workflow action.
again. thank you.
that workflow crashes when I try to run it. editorial itself crash.
guess the sub workflow is missing in your example. cannot see it when I try to look at your code.