use of org.wso2.ballerinalang.compiler.semantics.model.Scope in project carbon-business-process by wso2.
the class InstanceManagementServiceSkeleton method getActivityLifeCycleEventsFromScope.
private ActivityLifeCycleEventsListType getActivityLifeCycleEventsFromScope(ScopeDAO scope) throws InstanceManagementException {
final ActivityLifeCycleEventsListType activityLifeCycleEventsList = new ActivityLifeCycleEventsListType();
/*dbexec(new BpelDatabase.Callable<Object>() {
public Object run(BpelDAOConnection conn) throws InstanceManagementException {
ScopeDAO scope = conn.getScope(siid);
if (scope == null) {
String errMsg = "Scope " + siid + " not found.";
log.error(errMsg);
throw new InstanceManagementException(errMsg);
}
fillActivityLifeCycleEventsFromScope(activityLifeCycleEventsList, scope);
return null;
}
});*/
fillActivityLifeCycleEventsFromScope(activityLifeCycleEventsList, scope);
return activityLifeCycleEventsList;
}
use of org.wso2.ballerinalang.compiler.semantics.model.Scope in project carbon-business-process by wso2.
the class InstanceManagementServiceSkeleton method getCorrelationPropertires.
private CorrelationSets_type0 getCorrelationPropertires(ScopeDAO scope) {
CorrelationSets_type0 correlationSets = new CorrelationSets_type0();
for (CorrelationSetDAO correlationSetDAO : scope.getCorrelationDTOs()) {
CorrelationSet_type0 correlationset = new CorrelationSet_type0();
correlationset.setCsetid(correlationSetDAO.getCorrelationSetId().toString());
correlationset.setName(correlationSetDAO.getName());
for (Map.Entry<QName, String> property : correlationSetDAO.getProperties().entrySet()) {
CorrelationPropertyType prop = new CorrelationPropertyType();
prop.setCsetid(correlationSetDAO.getCorrelationSetId().toString());
prop.setPropertyName(property.getKey());
prop.setString(property.getValue());
correlationset.addCorrelationProperty(prop);
}
correlationSets.addCorrelationSet(correlationset);
}
return correlationSets;
}
use of org.wso2.ballerinalang.compiler.semantics.model.Scope in project carbon-business-process by wso2.
the class InstanceManagementServiceSkeleton method fillActivityLifeCycleEventsFromScope.
private void fillActivityLifeCycleEventsFromScope(ActivityLifeCycleEventsListType activityLifeCycleEventsList, ScopeDAO scope) {
// List<BpelEvent> events = scope.listEvents();
Set<EventDAOImpl> eventsEntities = ((ScopeDAOImpl) scope).getEvents();
List<BpelEvent> events = new ArrayList<BpelEvent>();
for (EventDAOImpl event : eventsEntities) {
events.add(event.getEvent());
}
ActivityLifeCycleEventsDocumentBuilder docBuilder = new ActivityLifeCycleEventsDocumentBuilder();
for (BpelEvent e : events) {
docBuilder.onEvent(e);
}
EventInfoListDocument infoList = docBuilder.getActivityLifeCycleEvents();
fillActivityLifeCycleEventsList(activityLifeCycleEventsList, infoList);
for (ScopeDAO childScope : scope.getChildScopes()) {
fillActivityLifeCycleEventsFromScope(activityLifeCycleEventsList, childScope);
}
}
use of org.wso2.ballerinalang.compiler.semantics.model.Scope in project carbon-business-process by wso2.
the class RestResponseFactory method createBinaryRestVariable.
public RestVariable createBinaryRestVariable(String name, RestVariable.RestVariableScope scope, String type, String taskId, String executionId, String processInstanceId, String baseUri) {
RestUrlBuilder urlBuilder = createUrlBuilder(baseUri);
RestVariable restVar = new RestVariable();
restVar.setVariableScope(scope);
restVar.setName(name);
restVar.setType(type);
if (taskId != null) {
restVar.setValueUrl(urlBuilder.buildUrl(RestUrls.URL_TASK_VARIABLE_DATA, taskId, name));
}
if (executionId != null) {
restVar.setValueUrl(urlBuilder.buildUrl(RestUrls.URL_EXECUTION_VARIABLE_DATA, executionId, name));
}
if (processInstanceId != null) {
restVar.setValueUrl(urlBuilder.buildUrl(RestUrls.URL_PROCESS_INSTANCE_VARIABLE_DATA, processInstanceId, name));
}
return restVar;
}
use of org.wso2.ballerinalang.compiler.semantics.model.Scope in project carbon-business-process by wso2.
the class ScopeImpl method getStartIconExitArrowCoords.
/**
* At the start: xLeft=0, yTop=0
* Calculates the coordinates of the arrow which leaves the start Scope Icon
*
* @return coordinates of the exit arrow for the start icon
* After Calculations(Vertical Layout): xLeft= Xleft of Icon + (width of icon)/2 , yTop= Ytop of the Icon +
* height of the icon
*/
protected SVGCoordinates getStartIconExitArrowCoords() {
int xLeft = 0;
int yTop = 0;
if (layoutManager.isVerticalLayout()) {
xLeft = getStartIconXLeft() + (getStartIconWidth() / 2);
yTop = getStartIconYTop() + getStartIconHeight();
} else {
xLeft = getStartIconXLeft() + getStartIconWidth();
yTop = getStartIconYTop() + (getStartIconHeight() / 2);
}
SVGCoordinates coords = new SVGCoordinates(xLeft, yTop);
return coords;
}
Aggregations