ludc
2025-01-16 986aa62ed00bee39363bab41b4eeb8259d446efd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package org.jbpm.pvm.internal.cmd;
 
import org.jbpm.api.JbpmException;
import org.jbpm.api.cmd.Command;
 
/**
 * abstract extensible session facade.  Developers can use this directly or 
 * extend one of the implementations with custom methods.
 * Developers should be encouraged to use this interface as it will 
 * be kept more stable then direct usage of the API (which is still 
 * allowed).
 * All the method implementations should be based on commands.
 * Each of the method implementations will have a environment block.
 * Then the command is executed and the environment is passed into the 
 * command.
 */
public interface CommandService {
  
  String NAME_TX_REQUIRED_COMMAND_SERVICE = "txRequiredCommandService";
  String NAME_NEW_TX_REQUIRED_COMMAND_SERVICE = "newTxRequiredCommandService";
 
  /**
   * @throws JbpmException if command throws an exception.
   */
  <T> T execute(Command<T> command);
}