Does there exist a way to make 'Connector In' and 'Connector Out' fields have a compulsory script for every task?

1
0
-1

I want my workflow designer to always use 'Connector In' and 'Connector Out' scripts at every station to check the inputs and outputs at the station. Is there a way to make a validation that checks this and prompts them accordingly?
If not, can I make an API call to the bpm so as to automatically make a boilerplate connector in and out groovy script whenever a new task is created?

Thanks

1 answer

1
0
-1

There is currently no solution to force the configuration of a connector on all tasks in a process definition.

The best solution I can think of is to use a feature only available in Enterprise Edition: event handlers. With event handlers you can run some code for all newly available tasks or all tasks that are done. With Community Edition the only solution would be to duplicate connectors manually (with copy paste feature of the Studio). Of course connector configuration can be centralized with parameters or even by creating a custom connector implementation.

Comments

Submitted by abizer.lokhandw... on Mon, 09/30/2019 - 16:03

When my diagram is being validated before I run my diagram, is it possible to add API checks in the script to see if each node contains a connector?
Also, how can we centralize connector configuration?

Thanks!

Submitted by antoine.mottier on Mon, 09/30/2019 - 16:25

Adding extra validation to run when a process diagram is being deployed or when a new process instance is being created is technically possible but would involved some deep down modification to Bonita source code (we don't have official extension point for that). You need to take a look (in the source code) at the Bonita Engine API called to deploy the process, follow the path up to the Engine service that process such request and create your own custom implementation.

For a single given process definition the easiest way to centralize the configuration would be to use parameters. If you need configuration shared among several process definition such feature is available using a Bonita Enterprise Edition module. BCD module allow to automate deployment and configuration of several processes (and associated applications, BDM...).

Notifications