jadex.bpmn.features.impl.BpmnMonitoringComponentFeature Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jadex-kernel-bpmn Show documentation
Show all versions of jadex-kernel-bpmn Show documentation
The Jadex BPMN kernel provides a workflow kernel for the standardized business process modeling notation. The kernel relies on annotated BPMN diagrams, which include detailed execution information.
package jadex.bpmn.features.impl;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import jadex.bpmn.features.IBpmnComponentFeature;
import jadex.bpmn.features.IInternalBpmnComponentFeature;
import jadex.bpmn.runtime.ProcessThread;
import jadex.bridge.IInternalAccess;
import jadex.bridge.component.ComponentCreationInfo;
import jadex.bridge.component.impl.MonitoringComponentFeature;
import jadex.bridge.service.types.monitoring.IMonitoringEvent;
/**
* Overrides the monitoring feature to add the logic for current state.
*/
public class BpmnMonitoringComponentFeature extends MonitoringComponentFeature
{
/**
* Create the feature.
*/
public BpmnMonitoringComponentFeature(IInternalAccess component, ComponentCreationInfo cinfo)
{
super(component, cinfo);
}
/**
* Get the current state as monitoring events.
*/
public List getCurrentStateEvents()
{
List ret = super.getCurrentStateEvents();
if(ret==null)
ret = new ArrayList();
IInternalBpmnComponentFeature bcf = (IInternalBpmnComponentFeature)getComponent().getComponentFeature(IBpmnComponentFeature.class);
for(Iterator it= bcf.getTopLevelThread().getAllThreads().iterator(); it.hasNext(); )
{
ret.add(bcf.createThreadEvent(IMonitoringEvent.EVENT_TYPE_CREATION, it.next()));
}
return ret;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy