With-items iterates action in parallel


(Deepchandna) #1

Is there any way i can run actions in sequence or in order . with-items executes action in parallel.

Sample code is below.

iterate_transaction:
            with-items:
                - transaction_name in <% $.transaction_list %>
                - transaction_parameters in <% $.transaction_param_list %>
                - timeLimit in <% $.timeout_value %>
            action: pack.execute_tr1
            input:
                transaction_name: <% $.transaction_name %>
                transaction_parameters: <% $.transaction_parameters %>
                timeLimit: <% $.timeLimit %>
            publish:
                stdout: <% task(iterate_transaction).result.stdout %>
                status_message: "Workflow execution started iterate_transaction----------"
            on-success:
                - automation_com

Any advice please.


(Tomaz Muraus) #2

You can specify concurrency: 1 attribute for with-items operation - st2/mistral-with-items-concurrency.yaml at master · StackStorm/st2 · GitHub, st2/orquesta-with-items-concurrency.yaml at master · StackStorm/st2 · GitHub.


(Deepchandna) #3

thanks :slight_smile: