Form Workflow Action Order and Dependency

Form Workflow Action Order and Dependency

I'm trying to wrap my head around how the Creator workflow actions handle order. Is it expected behavior that the downstream actions do not have access to the upstream actions' input changes? And do downstream actions only start after the completion of upstream actions?

I set up a test with 5 workflow actions following each other. They each add their corresponding workflow number into a string field to test order and upstream action dependency. In workflow 2 and 4 I also added an API call to an external service and looped over 250 results and manipulated some data to add some lag. Below are actions 1-3, but 4 and 5 are the same as 2 and 3. 

Action 1:
  1. info "Action 1";
  2. input.actions = "1";

Action 2:
  1. response = invokeurl
  2. [
  3. url :"https://restcountries.com/v3.1/all"
  4. type :GET
  5. ];
  6. countries = 0;
  7. countries_with_a = 0;
  8. for each  country in response
  9. {
  10. name = country.get("name").get("common").replaceAllIgnoreCase("a","");
  11. if(name != country.get("name").get("common"))
  12. {
  13. countries_with_a = countries_with_a + 1;
  14. }
  15. countries = countries + 1;
  16. }
  17. info "Action 2. Countries: " + countries + ". Countries with 'a': " + countries_with_a;
  18. info "Previous attempt number was " + input.actions ;
  19. input.actions = input.actions + "2";
Action 3:
  1. info "Action 3";
  2. info "Previous attempt number was " + input.actions ;
  3. input.actions = input.actions + "3";
The results were not as I expected. The order of actions was preserved in the info logs. When I closed out the info windows, the first was "Action 5", then "Action 4", then "Action 3", then "Action 2", then "Action 1". However, the previous number was always an empty string, and the "actions" field only showed "5" instead of "12345". So while the order of actions seems to be preserved, each action only has access to the initial field value when the workflow was triggered (empty in this case). This whole workflow still executed under a second even with the api call and data manipulation (wish there was a sleep function to use in this test), so I can't be sure that downstream actions are triggered after the completion of upstream actions.

All this to say, It'd be great to be able to break out some of my deluge code across multiple actions that depend on upstream actions for readability and to utilize the action conditions. But it doesn't look like downstream actions can depend on upstream actions based on this test.

    Access your files securely from anywhere

        Zoho Developer Community




                                  Zoho Desk Resources

                                  • Desk Community Learning Series


                                  • Digest


                                  • Functions


                                  • Meetups


                                  • Kbase


                                  • Resources


                                  • Glossary


                                  • Desk Marketplace


                                  • MVP Corner


                                  • Word of the Day



                                      Zoho Marketing Automation


                                              Manage your brands on social media



                                                    Zoho TeamInbox Resources

                                                      Zoho DataPrep Resources



                                                        Zoho CRM Plus Resources

                                                          Zoho Books Resources


                                                            Zoho Subscriptions Resources

                                                              Zoho Projects Resources


                                                                Zoho Sprints Resources


                                                                  Qntrl Resources


                                                                    Zoho Creator Resources



                                                                        Zoho Campaigns Resources


                                                                          Zoho CRM Resources

                                                                          • CRM Community Learning Series

                                                                            CRM Community Learning Series


                                                                          • Kaizen

                                                                            Kaizen

                                                                          • Functions

                                                                            Functions

                                                                          • Meetups

                                                                            Meetups

                                                                          • Kbase

                                                                            Kbase

                                                                          • Resources

                                                                            Resources

                                                                          • Digest

                                                                            Digest

                                                                          • CRM Marketplace

                                                                            CRM Marketplace

                                                                          • MVP Corner

                                                                            MVP Corner





                                                                              Design. Discuss. Deliver.

                                                                              Create visually engaging stories with Zoho Show.

                                                                              Get Started Now