Hi there,
is it possible to configure the Engine to raise an error when Service Tasks of a certain type (say, ‘shell’) are declared?
Thanks!
Hi there,
is it possible to configure the Engine to raise an error when Service Tasks of a certain type (say, ‘shell’) are declared?
Thanks!
Hi,
Yes, it is possible. Just replace shell task behavior in the behavior factory.
Regards
Martin
Thank you very much, I’ll give it a try.
Can you point out to some code sample?
Regards.
If I got it right, I should be setting my own subclass of org.flowable.engine.impl.bpmn.parser.factory.DefaultActivityBehaviorFactory
in my configuration via setActivityBehaviorFactory()
.
What should be the method body of the override method in my own class, instead of https://github.com/flowable/flowable-engine/blob/93748d3f139840d246312819a0570db3f485280d/modules/flowable-engine/src/main/java/org/flowable/engine/impl/bpmn/parser/factory/DefaultActivityBehaviorFactory.java#L324-L329 if I just want to reject?
Hi,
That’s one possibility. Another is to use your own custom parser and change behavior when process definition is parsed. https://flowable.com/open-source/docs/bpmn/ch18-Advanced/#hooking-into-process-parsing
If you want to throw an exception (BPMN error, increase counter, send email… ), do it.
Regards
Martin
Thank you very much, I’ll proceed as suggested.
Regards.