An exclusive gate way right after start event

Is there any way to implement an exclusive gate way right after start event?

For example, I have start, task1, task2. When started, the flow could be go to task1 then task2, or directly go to task2 without task1.

I did not find how to configure 2 outcome of start event, so have no idea about how to proceed.

When user click “Start Event”, I need the user to choose next user task. This “next task” can only be decided when the user click “start event”, is it possible?

Or if it can support two start events, it is also ok, is this possible?

Or make the user task after “start event” optional, is it possible?

you can do the following:

  1. Create a custom start process form. On that form add a component that will be used for a decision.
  2. Save the decision in a process variable when the process is started (a custom start process form example can be found here, a desription is here)
  3. put an exclusive gateway right after the start event and make this gateway analyze the process variable value you’ve passed from your custom start form.

Thanks Max.
Unfortunely, we are using cuba6.6.4; I tried to build your example with cuba 6.9.0, but failed to download some jars like jquery-file-upload-9.12.1.cuba.0.jar which required by cuba-web:6.9.0, I did not find any maven repo which contains it. I did not find it even from cuba repo.

Even I use the repo included by default in your project, there are many failures about can’t download jars.

After I use the repo provided in How to link remote Bintray repo to Artifactory, still fails about can’t download jquery-file-upload-9.12.1.cuba.0.jar

Hi Max,
Finally I managed to run your demo, but it is not I want. I don’t want to select the actor(actually, my project can support select actor:) )

I want to select the task. Your example is one same task after startprocess but different actor.

I meant another thing in this sample. Take a look how process variable automaticApprovalPeriod is set in the form. Later this variable is used in the model. You may use a value of the process variable from the start form in a condition for the flow nodes of your exclusive gateway.

Got you.

  1. custom start process form and return variable accordingly - I understand.
  2. add an exclusive gateway after start process - I understand.
  3. make this gateway analyze the process variable - I understand but how? I can’t configure flowoutput as previous task has no outcome.
  4. Even the gateway can analyze, then it should then choose the flow, how to implement this?


Hi Max,
How about below way:

start process goes to task1 then task2; I can cancle task1 by signal, right? By adding a boundry signal event to task1; if got the signal, cancel task1, else, task1 behave as normal. Is this doable?

But I did not find how to send signal to task1 from the mannual book - i m using cuba6.6.4. Do you have guide or example?

You can specify a condition for the flow node explicitly.

  1. Select the flow node
  2. Click the “Show advanced properties” button
  3. Click the “Flow condition” property value
  4. In the dialog window specify a condition that will analyze a process variable vlaue