Questo contenuto non è disponibile nella lingua selezionata.

8.6. Registering Service Handlers


Service handlers must be registered to execute domain-specific services as custom service tasks, this happens because the process only contains a high-level description of the service that needs to be executed; accordingly, a handler is responsible for invoking the service.
Service handlers are registered by adding a configuration file that specifies the implementation of class for each of the handlers to the classpath. You can specify which configuration files are loaded in a drools.session.conf file by using the drools.workItemHandlers property as a list of space delimited file names:
drools.workItemHandlers = CustomerWorkItemHandlers.conf
Copy to Clipboard Toggle word wrap
These file names should contain a Map of entries, the name and the corresponding WorkItemHandler instance that should be used to execute the service. The configuration file is using the MVEL script language to specify a map of type Map<String,WorkItemHandler>:
[
   "log" : new org.jbpm.process.instance.impl.demo.SystemOutWorkItemHandler(),
]
Copy to Clipboard Toggle word wrap
The implementation classes (and dependencies) also need to be added to the classpath of the server war.

Torna in cima
Red Hat logoGithubredditYoutubeTwitter

Formazione

Prova, acquista e vendi

Community

Informazioni sulla documentazione di Red Hat

Aiutiamo gli utenti Red Hat a innovarsi e raggiungere i propri obiettivi con i nostri prodotti e servizi grazie a contenuti di cui possono fidarsi. Esplora i nostri ultimi aggiornamenti.

Rendiamo l’open source più inclusivo

Red Hat si impegna a sostituire il linguaggio problematico nel codice, nella documentazione e nelle proprietà web. Per maggiori dettagli, visita il Blog di Red Hat.

Informazioni su Red Hat

Forniamo soluzioni consolidate che rendono più semplice per le aziende lavorare su piattaforme e ambienti diversi, dal datacenter centrale all'edge della rete.

Theme

© 2025 Red Hat