Package org.wso2.carbon.bam.data.publisher.activity.mediation.services

Examples of org.wso2.carbon.bam.data.publisher.activity.mediation.services.ActivityPublisherAdmin


    public void testMultipleActivities2() {
        TestEventBrokerService eventBrokerService = new TestEventBrokerService();
        ActivityPublisherUtils.setEventBroker(eventBrokerService);

        ActivityPublisherAdmin admin = new ActivityPublisherAdmin();
        ActivityPublisherUtils.setActivityPublisherAdmin(admin);

        ActivityQueue queue = new ActivityQueue(new EventGenerator());
        queue.setThreshold(10);
        initSerialization();
View Full Code Here


public class ActivityCreationTest extends AbstractActivityTest {

    public void testActivityCreation1() {
        MessageContext synCtx = getTestContext();

        ActivityPublisherAdmin admin = new ActivityPublisherAdmin();
        ActivityPublisherUtils.setActivityPublisherAdmin(admin);

        MessageActivity activity = ActivityPublisherUtils.newActivity(synCtx, true);
        activity.setPayload(synCtx.getEnvelope().getBody().toString());
View Full Code Here

        synCtx.setProperty(ActivityPublisherConstants.PROP_TECHNICAL_FAILURE_DETAIL,
                           "Connection refused or failed for the test.wso2.com");
        synCtx.setProperty(ActivityPublisherConstants.PROP_REMOTE_ADDRESS, "10.8.0.1");
        synCtx.setProperty(ActivityPublisherConstants.PROP_MESSAGE_FORMAT, "soap");

        ActivityPublisherAdmin admin = new ActivityPublisherAdmin();
        ActivityPublisherUtils.setActivityPublisherAdmin(admin);

        MessageActivity activity = ActivityPublisherUtils.newActivity(synCtx, false);
        activity.setPayload(synCtx.getEnvelope().getBody().toString());
View Full Code Here

        synCtx.setProperty(ActivityPublisherConstants.PROP_APPLICATION_FAILURE_DETAIL,
                           "NumberFormatException in the quantity field");
        synCtx.setProperty(ActivityPublisherConstants.PROP_REMOTE_ADDRESS, "10.8.0.1");
        synCtx.setProperty(ActivityPublisherConstants.PROP_MESSAGE_FORMAT, "IDOC");

        ActivityPublisherAdmin admin = new ActivityPublisherAdmin();   
        ActivityPublisherUtils.setActivityPublisherAdmin(admin);

        MessageActivity activity = ActivityPublisherUtils.newActivity(synCtx, false);
        activity.setPayload(synCtx.getEnvelope().getBody().toString());
View Full Code Here

        // init queue
        ActivityQueue queue = new ActivityQueue(activityProcessor);
        ActivityPublisherUtils.setActivityQueue(queue);

        ActivityPublisherAdmin admin = new ActivityPublisherAdmin();
        ActivityPublisherUtils.setActivityPublisherAdmin(admin);

        Mediator mediator = new MessageActivityMediator();
        mediator.mediate(synCtx);
        try {
View Full Code Here

            activityQueue.setThreshold(1);
        }

        ActivityPublisherUtils.setActivityQueue(activityQueue);

        ActivityPublisherAdmin admin = new ActivityPublisherAdmin();
        ActivityPublisherUtils.setActivityPublisherAdmin(admin);

        log.info("BAM activity mediator bundle is activated");
    }
View Full Code Here

     * @return The end line number, or -1 if could not be determined
     */
    public int getEndLineNumber() {
      int ret=-1;
     
      ActivityInterface parent=getParent();
     
      if (parent != null) {
        int index=parent.getSubActivities().indexOf(this);
       
        if (index != -1) {
          if (index < (parent.getSubActivities().size()-1)) {
            ActivityInterface other=parent.getSubActivities().get(index+1);
           
            ret = other.getStartLineNumber()-1;
          } else {
            ret = parent.getEndLineNumber();
          }
        }
      }
View Full Code Here

     *
     * @param lineNumber The line number
     * @return The activity, or null if not found
     */
    public ActivityInterface getActivityAtLineNumber(int lineNumber) {
      ActivityInterface ret=null;
     
      int endline=getEndLineNumber();
     
      if (getStartLineNumber() <= lineNumber && (endline == -1 || endline >= lineNumber)) {
       
View Full Code Here

            int width = 0;
            int height = 0;
            dimensions = new SVGDimension(width, height);

            SVGDimension subActivityDim = null;
            ActivityInterface activity = null;
            Iterator<org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface> itr = getSubActivities().iterator();
            while (itr.hasNext()) {
                activity = itr.next();
                subActivityDim = activity.getDimensions();
                if (subActivityDim.getWidth() > width) {
                    width += subActivityDim.getWidth();
                }
                height += subActivityDim.getHeight();
            }
View Full Code Here

    protected Element getArrows(SVGDocument doc) {
        Element subGroup = null;
        subGroup = doc.createElementNS("http://www.w3.org/2000/svg", "g");

        if (subActivities != null) {
            ActivityInterface prevActivity = null;
            ActivityInterface activity = null;
            String id = null;
            org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates exitCoords = null;
            SVGCoordinates entryCoords = null;
            Iterator<org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface> itr = subActivities.iterator();
            while (itr.hasNext()) {
                activity = itr.next();
                if (prevActivity != null) {
                    exitCoords = prevActivity.getExitArrowCoords();
                    entryCoords = activity.getEntryArrowCoords();
                    id = prevActivity.getId() + "-" + activity.getId();
                    subGroup.appendChild(getArrowDefinition(doc, exitCoords.getXLeft(),
                        exitCoords.getYTop(), entryCoords.getXLeft(),
                        entryCoords.getYTop(), id, prevActivity, activity));
                }
                prevActivity = activity;
View Full Code Here

TOP

Related Classes of org.wso2.carbon.bam.data.publisher.activity.mediation.services.ActivityPublisherAdmin

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.