# XOR  conditional output settings?

**URL:** <https://community.ofelia.com/t/xor-conditional-output-settings/6656>\
**Category:** Q&A\
**Created:** [10 November 2015 09:26 UTC](https://community.ofelia.com/t/xor-conditional-output-settings/6656 "2015-11-10T09:26:59Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![brian\_122](https://avatars.discourse-cdn.com/v4/letter/b/f07891/32.png) [@brian\_122](https://community.ofelia.com/u/brian_122)\
**Post date:** [10 November 2015 09:26 UTC](https://community.ofelia.com/t/xor-conditional-output-settings/6656/1 "2015-11-10T09:26:59Z")

</div>

I want to use an XOR as a simple yes no decision box but get the message " all output transitions from an XOR gateway must be default or conditional."

How do I set these conditional outputs?

![example][example]   
[example]: [brianhunt.org/example.png](http://brianhunt.org/example.png)

Bos file at [brianhunt.org/xor\_problem.bos](http://brianhunt.org/xor_problem.bos)

Thanks for any help.

---

<div class="post-metadata">

**Author:** ![Sean\_McP](https://dub1.discourse-cdn.com/flex013/user_avatar/community.ofelia.com/sean_mcp/32/932_2.png) [@Sean\_McP](https://community.ofelia.com/u/Sean_McP)\
**Post date:** [10 November 2015 12:02 UTC](https://community.ofelia.com/t/xor-conditional-output-settings/6656/2 "2015-11-10T12:02:04Z")

</div>

Click on the LINE leaving the gateway and add the condition for example

saleApproved == true

on the OTHER LINE

(I always add the opposite condition) saleApproved == false and then click Default Action

Choose whichever is the correct default as per your requirements

regards

---

<div class="post-metadata">

**Author:** ![brian\_122](https://avatars.discourse-cdn.com/v4/letter/b/f07891/32.png) [@brian\_122](https://community.ofelia.com/u/brian_122)\
**Post date:** [10 November 2015 12:46 UTC](https://community.ofelia.com/t/xor-conditional-output-settings/6656/3 "2015-11-10T12:46:34Z")

</div>

Thanks Sean

I’ve tried as shown in the images below

[![](http://s27.postimg.org/jd73hc5i7/Screen_Shot_2015_11_10_at_12_40_10.png)](http://postimg.org/image/jd73hc5i7/)

[![](http://s27.postimg.org/qf513j93z/Screen_Shot_2015_11_10_at_12_40_28.png)](http://postimg.org/image/qf513j93z/)

[![](http://s27.postimg.org/cwy4r8wyn/Screen_Shot_2015_11_10_at_12_40_40.png)](http://postimg.org/image/cwy4r8wyn/)

So I have to put the exit condition from the gate on the line? Not sure of the syntax for that - I note that you used saleApproved format

---

<div class="post-metadata">

**Author:** ![brian\_122](https://avatars.discourse-cdn.com/v4/letter/b/f07891/32.png) [@brian\_122](https://community.ofelia.com/u/brian_122)\
**Post date:** [10 November 2015 12:47 UTC](https://community.ofelia.com/t/xor-conditional-output-settings/6656/4 "2015-11-10T12:47:38Z")

</div>

Images reposted

[http://postimg.org/image/jd73hc5i7/](http://postimg.org/image/jd73hc5i7/)

[http://postimg.org/image/qf513j93z/](http://postimg.org/image/qf513j93z/)

[http://postimg.org/image/cwy4r8wyn/](http://postimg.org/image/cwy4r8wyn/)

---

<div class="post-metadata">

**Author:** ![brian\_122](https://avatars.discourse-cdn.com/v4/letter/b/f07891/32.png) [@brian\_122](https://community.ofelia.com/u/brian_122)\
**Post date:** [10 November 2015 09:28 UTC](https://community.ofelia.com/t/xor-conditional-output-settings/6656/5 "2015-11-10T09:28:26Z")

</div>

Image reposted as not showing [http://brianhunt.org/example.png](http://brianhunt.org/example.png)  
or ![example](http://brianhunt.org/example.png)

---

<div class="post-metadata">

**Author:** ![Sean\_McP](https://dub1.discourse-cdn.com/flex013/user_avatar/community.ofelia.com/sean_mcp/32/932_2.png) [@Sean\_McP](https://community.ofelia.com/u/Sean_McP)\
**Post date:** [10 November 2015 13:02 UTC](https://community.ofelia.com/t/xor-conditional-output-settings/6656/6 "2015-11-10T13:02:59Z")

</div>

Hi Brian,

(Always look…bet you get that a lot 🙂

You’re almost there…

1st I fixed the previous post the second saleApproved should have been false…

In the condition the left hand operator is a pool variable that should be set by something, either a human task or the service task (send file for checking)

So for example if a human task a person would click a check box - is the sale approved - Yes then as an output operation from the task you would set saleApproved = true or not true (false) based on whether the box was checked or not.

The condition is based on Java Speak so should be saleApproved == true is the right way to do it.

One of the routes needs to be default…so choose one. I put the condition in only as documentation so if I wonder what default is…I can easily read it. Think of a gateway with multiple conditions…temperature gt 1; gt 2; gt 3 etc…

In your diagram though you are sending a message, this is not necessary, to send data to this subprocess just create a mapping of your data variable from this process to the subprocess, click on the Caller and click General-\>Mapping. You can then pass data from the caller to the sub and return data from the sub to the caller.

In this case send the credit file, and return a boolean variable saleApproved…

regards

---

<div class="post-metadata">

**Author:** ![brian\_122](https://avatars.discourse-cdn.com/v4/letter/b/f07891/32.png) [@brian\_122](https://community.ofelia.com/u/brian_122)\
**Post date:** [10 November 2015 14:50 UTC](https://community.ofelia.com/t/xor-conditional-output-settings/6656/7 "2015-11-10T14:50:31Z")

</div>

Thanks Sean - I’ll have a play with that. I can see how powerful Bonita BPM is, but a lot to learn coming from a Visio world!

---

<div class="post-metadata">

**Author:** ![Sean\_McP](https://dub1.discourse-cdn.com/flex013/user_avatar/community.ofelia.com/sean_mcp/32/932_2.png) [@Sean\_McP](https://community.ofelia.com/u/Sean_McP)\
**Post date:** [10 November 2015 15:12 UTC](https://community.ofelia.com/t/xor-conditional-output-settings/6656/8 "2015-11-10T15:12:26Z")

</div>

Ahhhh Visio…

How deep did you go?

BPM is the design, to use BPM needs programming skills. Regardless of which system you use.

Visio, I used to program Excel, Word and Visio to create flowcharts etc.

---

<div class="post-metadata">

**Author:** ![brian\_122](https://avatars.discourse-cdn.com/v4/letter/b/f07891/32.png) [@brian\_122](https://community.ofelia.com/u/brian_122)\
**Post date:** [10 November 2015 16:17 UTC](https://community.ofelia.com/t/xor-conditional-output-settings/6656/9 "2015-11-10T16:17:21Z")

</div>

I do business process mapping - only coding I know is BASIC. It would be good if the coding error check could be switched off. Busy now, till Thursday but then I’ll dig into gaining a better understanding of how gateways work.

Cheers
