Depending on your runtime strategy (except per request which is destoryed after each request) you could to following workaround:
- singleton
- add new process instance that you can start with parameters that will use script task to insert the object into working memory - since it’s singleton ksession all processes will share the same ksession and thus it will trigger conditional event
- then start everytime you need to insert new facts new instance of that process
- per process instance
- add to your process definition event sub process with signal start event and data mapping to set fact as process variable that then can be inserted into ksession as part of this event subprocess
- then signal your process instance to trigger that event sub process - make sure you pass the actual fact as event of the signal
with that you use processes to insert facts into working memory
Hope this helps