Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejava
firstline1
titleAccessing the IAuditEngine in a service
linenumberstrue
@AquimaService("EXAMPLE_SERVICE")
public class ExampleService implements IService {
  @Override
  public IServiceResult handle(IServiceContext serviceContext) throws ServiceException, Exception {
 	 final varIAuditEngine auditEngine = serviceContext.getAuditEngine();

     return new ServiceResult("Success");
   }
}

...

Code Block
languagejava
firstline1
titleAccessing the IAuditEngine in a container
linenumberstrue
@AquimaExpander("EXAMPLE_CONTAINER")
public class ExampleContainer implements IContainerExpander {
  @Override
  public Container expand(Container container, ContainerDefinition containerDefinition,
      IContainerContext containerContext) throws Exception {
    final varIAuditEngine auditEngine = containerContext.getAuditEngine();

    return container;
  }
}

...

You can simply call the audit method on the IAuditEngine with an implementation of IAuditMessage.

The message obbject object must be wrapped inside a Supplier object. The easiest way to do this is by instantiating your IAuditMessage instance inside a lamba.

...

Dynamic case management auditing

When you your application uses dynamic case management you might want to know how to access certain information such as process, case and task information.

...