Skip to main content
prabhakarank847990
May 6, 2024
Question

And gate or Dummy script task

  • May 6, 2024
  • 3 replies
  • 0 views

Instead of using And gate to run parallel flows is it ok to use dummy script task and branch it parallel flows ?

like this

3 replies

stefanhelzle0001
May 6, 2024

OK? It will technically work, but is less expressive and can be harder to understand. This increases your long term maintenance cost.

mikes0011
Brainy
May 6, 2024
less expressive and can be harder to understand

Yes, this is my usual objection to this approach.  There are cases in my older, more complex process models for instance, designed by less experienced devs, where a flow split occurs like this and I'm not quite sure whether it was intentional or accidental, since they didn't use an AND gateway to do the split.

My stance: there's very little cost to using an AND at the front of a split, and it's nearly always worth it in the long run.  If you're worried about the node performing some sort of calculation or pre-processing, the AND can simply be preceded with a script task that does this other work, with virtually zero additional cost.

shubhama926776
Brainy
May 6, 2024
is it ok to use dummy script task and branch it parallel flows

Yes, it is ok to use a dummy script task and branch it into parallel flows but And gate is better for parallel flows. It's simpler, faster, and easier to understand.
For straightforward parallel execution, stick with the And gate. Choose the dummy script task only if you specifically need to add logic to the branching process in the future.