Synchronize Business Processes
Problem Summary
While designing solution using WorkFusion BPM it's useful to use synchronization design pattern.
Assume you have 2 Business Processes and is BP1 is in run, you can not run BP2 in parallel. Both BPs could run on schedule and BP2 should automatically detect if BP1 is running and if it is, BP2 flow is simply goes to it's end.
BP1

Set Sync Flag
<?xml version="1.0" encoding="UTF-8"?>
<config charset="UTF-8">
<var-def name="sync_datastore">sync_bp</var-def>
<var-def name="sync_variable">sync_bp_flag</var-def>
<var-def name="sync_variable_set_value">BUSY</var-def>
<datastore name="${sync_datastore}" max="1">
<template>
update @this set ${sync_variable}='${sync_variable_set_value}'
</template>
</datastore>
<export include-original-data="true"></export>
</config>
Long-lasting Task
<?xml version="1.0" encoding="UTF-8"?>
<config charset="UTF-8">
<script></script>
<export include-original-data="true">
</export>
</config>
Drop Sync Flag
<?xml version="1.0" encoding="UTF-8"?>
<config charset="UTF-8">
<var-def name="sync_datastore">sync_bp</var-def>
<var-def name="sync_variable">sync_bp_flag</var-def>
<var-def name="sync_variable_set_value">AVAILABLE</var-def>
<datastore name="${sync_datastore}" max="1">
<template>
update @this set ${sync_variable}='${sync_variable_set_value}'
</template>
</datastore>
<export include-original-data="true"></export>
</config>
BP2

Read Sync Flag
<?xml version="1.0" encoding="UTF-8"?>
<config charset="UTF-8">
<var-def name="sync_datastore">sync_bp</var-def>
<var-def name="sync_variable">sync_bp_flag</var-def>
<var-def name="syncRecord">
<datastore name="${sync_datastore}" max="1">
<template>
select * from @this
</template>
</datastore>
</var-def>
<export include-original-data="true">
<var-def name="value">
<xpath expression='/row/${sync_variable}/text()'>
<var name="syncRecord"/>
</xpath>
</var-def>
<single-column name="${sync_variable}" value="${value}"/>
</export>
</config>
Concurrent Long-lasting Task
<?xml version="1.0" encoding="UTF-8"?>
<config charset="UTF-8">
<script></script>
<export include-original-data="true">
</export>
</config>
Simple Synchronization Data Store

Test Execution
If you put both BPs into WF instance and create this simple Data Store, sync could be tested as following:
- Execute BP1 - it will set flag and 'sleep' 1 minute on 2nd Bot Task
- Right away execute BP2 - notice that flow transitioned into end without executing 'Concurrent Long-lasting Task'
- After minute execute BP2 again - notice this time it goes to 'Concurrent Long-lasting Task'