Timing of Actions Vs Workflows

I have a concern about the timing of workflows versus actions and would like to know if my concerns are valid and how to avoid problems.

I am designing a process whereby a user selects DaySheets from a list view and an Action adds UserEmail() to the [Select] Column of the DaySheets worksheet - this works well so far

Then I have a Group Action that does the following:

  1. It allocates an Invoice number to the [Invoice Num] field of the selected DaySheets - this works well
  2. It then Edits the value of the [UpdateStatus] field in my Orders table to “Run Invoicing”. The intent here is to trigger a Workflow that will create and send an email with required information for invoicing and attach a PDF copy of selected DaySheets. The Action works and during testing the workflow is triggered.
    3.It then reinitialises the value of [UpdateStatus] back to blank. The Action works.
  3. It then reinitialises the [Select] field in the DaySheets worksheet back to blank. The Action works.

My concern comes from research I did yesterday that shows that my Actions and Workflows are triggered from different locations, namely the Client and the Server. For my mechanism to work the Workflow needs to be triggered immediately after step 2, and certainly before step 4 is completed. If it is triggered after step 4 has finished, there won’t be any records with a valid [Select] flag.

Am I right to be worried, and if so, how can I fix it? Invoicing is too important not to be reliable.

I would say, the behavior you seen on action/workflow is as it is. That s how Appshee action and workflow behaive.

Very much roughly to say, Action is a job on the client side. while the workflow is server-side jobs.

When you hit the action to change data etc, you will immidiately see the changed value as it is happening on the client side. Then app start to push the data to your backend data source, so it is always time lag between your device and server.

To the contrary, once the data change is reaching out to your data table, then workflow is firstly triggered as this data change event is only detected at server side.

To make sure that all the arrangements you made to works as you expected, I would sugget you try first not to include the last action to chagne the value to a group action. Just remove it.
Then on your workflwo setting, you have to send email workflow first. Then add second task/action after that, to change the value . Firing your action not from Action, but fire from workflow.
Im not sure how workflow will behaive, async nature or not, but it s worth testing.

As a matter of time Automation will be in full swing. Then you probably have another option to call process (to send email) first and chain another process to change the value under a single bot to do the same job. For this Automation, following process should not be executed, meaning the second process to change the value of your data will not happen untill the first process of sending email to executed. I m not perfectly sure but bot with the chained process will act in async nature.

Just invite Automation specialist for opinions.

@prithpal

4 Likes

Thanks so much for confirming my fears and providing a solution.

That means I will need to change my Workflow trigger, or I won’t be able to process a new batch until the previous one’s email has been triggered. Still, not too much more work.

Thanks again

Correct, and as @tsuji_koichi points out, in Automation you can invoke a server side process(es) directly from the app view through “grouped action”

Pardon my ignorance, but what is this Automation you are referring to?

As to the suggested approach of resetting my trigger variable from the Server, I can understand how to set it up but I am unsure what trigger to use.

My original approach was to flag a variable and have the Workflow run against all records with that flag. However, given the problem identified, I need to work out a way to set a Trigger value and have a Workflow only deal with records matching that Trigger value before moving on to another trigger value.

What suggestions do you have for setting a trigger value that I can set using client side Actions and then Act on and reset using Server side actions? Does a Server side Workflow event run to completion before subsequent updates in the same sync are processed? Otherwise I could end up merging results for multiple groups of independent records into one group because they all have a flag set. I would need a different value flag for each group, wouldn’t I?

I m just started to learn new Automation , so just little knowledge over it.
But my understanding you can pass the variables, like row keys, to the next Process within the bot. On the 1st process you do some sort of jobs which currently Workflow does. On this process, you push RETURN step to hold the variables returned by this particualr process. On the subsequent process, you can reach out this variable, then pass to the process, formally called as workflow.

1 Like

Thanks. I will investigate and see if it is something I can make use of, but it sounds like it is still in its infancy. I am working on a Pro Plan. Is this feature currently available on the Pro Plan or do I need to upgrade to a Business or Enterprise Plan? I couldn’t find reference to Automation in the pricing structure.

In the meantime, is there another way around my issue, or do I need to wait till the email is processed before I start the next Action sequence? I can’t think of any way around this.

Automation is still beta/preview state, we need to wait for further development to see the full picture.

2 Likes

Hi @tsuji_koichi ,

Your responses in this thread have been insightful and worth bookmarking for a reference on a few salient points on actions and workflows behavior.

4 Likes

Thanks tsuji_koichi. Appreciate your advice and input on this one. I have found a way to accomplish what I need for now. Hopefully the Automation will soon become a viable alternative

2 Likes