The Infinity Process Platform provides the Service Provider Interface IRuntimeEnvironmentMonitor to monitor process execution. Please refer to the according JavaDoc IRuntimeEnvironmentMonitor for detailed information on the interface.
import org.eclipse.stardust.common.annotations.SPI;
import org.eclipse.stardust.common.annotations.Status;
import org.eclipse.stardust.common.annotations.UseRestriction;
import org.eclipse.stardust.engine.core.runtime.beans.IAuditTrailPartition;
@SPI(useRestriction = UseRestriction.Public, status = Status.Stable)
public interface IRuntimeEnvironmentMonitor
{
/**
* Propagate creation of a new audittrail partition.
*
* @param partition The new partition.
*/
void partitionCreated(IAuditTrailPartition partition);
/**
* Propagate deletion of an audittrail partition.
*
* @param partition The deleted partition.
*/
void partitionDropped(IAuditTrailPartition partition);
}
The interface has several methods for propagating runtime environment events:
To implement the IRuntimeEnvironmentMonitor interface and publish the implementation to the engine, a file named by the interface's factory has to be created in the /META-INF/services folder of the jar. Perform the following steps:
package org.eclipse.stardust.example;
import org.eclipse.stardust.engine.core.runtime.beans.IAuditTrailPartition;
import org.eclipse.stardust.engine.core.spi.monitoring.IRuntimeEnvironmentMonitor;
public class RuntimeEnvironmentMonitorImpl implements IRuntimeEnvironmentMonitor {
@Override
void partitionCreated(IAuditTrailPartition partition) {
}
@Override
void partitionDropped(IAuditTrailPartition partition) {
}
}