Package org.wso2.carbon.bpel.skeleton.ode.integration.mgt.services

Examples of org.wso2.carbon.bpel.skeleton.ode.integration.mgt.services.ProcessManagementException


            return serviceEPRs.toArray(new String[serviceEPRs.size()]);
        }

        String errMsg = "Cannot find service for process: " + processId;
        log.error(errMsg);
        throw new ProcessManagementException(errMsg);
    }
View Full Code Here


                if (service == null) {
                    String errorMsg = "Error in <provide> element for process " +
                            processInfo.getName() + " partnerlink" + plinkName +
                            " did not identify an endpoint";
                    log.error(errorMsg);
                    throw new ProcessManagementException(errorMsg);
                }
                if (log.isDebugEnabled()) {
                    log.debug("Processing <provide> element for process " + processInfo.getName() +
                            ": partnerlink " + plinkName + " --> " + service.getName() + " : " +
                            service.getPort());
                }

                QName serviceName = service.getName();
                EndpointRef_type0 eprType = new EndpointRef_type0();
                eprType.setPartnerLink(plinkName);
                eprType.setService(serviceName);
                ServiceLocation sLocation = new ServiceLocation();
                try {
                    String url = Utils.getTryitURL(serviceName.getLocalPart(), getConfigContext());
                    sLocation.addServiceLocation(url);
                } catch (AxisFault axisFault) {
                    String errMsg = "Error while getting try-it url for the service: " + serviceName;
                    log.error(errMsg, axisFault);
                    throw new ProcessManagementException(errMsg, axisFault);
                }
                eprType.setServiceLocations(sLocation);
                eprsType.addEndpointRef(eprType);
            }
            pInfo.setEndpoints(eprsType);
View Full Code Here

                        dd = ISO8601DateParser.parse(Filter.getDateWithoutOp(ddf));
                    } catch (ParseException e) {
                        // Should never happen.
                        String errMsg = "Exception while parsing date";
                        log.error(errMsg, e);
                        throw new ProcessManagementException(errMsg, e);
                    }

                    CollectionsX.remove_if(confs, new MemberOfFunction<ProcessConf>() {
                        @Override
                        public boolean isMember(ProcessConf o) {
View Full Code Here

                                 TenantProcessStoreImpl tenantProcessStore)
            throws ProcessManagementException {
        if (pconf == null) {
            String errMsg = "Process configuration cannot be null.";
            log.error(errMsg);
            throw new ProcessManagementException(errMsg);
        }

        info.setPid(pconf.getProcessId().toString());
        // TODO: ACTIVE and RETIRED should be used separately.
        // Active process may be retired at the same time
View Full Code Here

        try {
            return bpelDb.exec(callable);
        } catch (Exception ex) {
            String errMsg = "Exception during database operation ";
            log.error(errMsg, ex);
            throw new ProcessManagementException(errMsg, ex);
        }
    }
View Full Code Here

    private OMElement getProcessDefinition(ProcessConf pConf) throws ProcessManagementException {
        if (pConf == null) {
            String errMsg = "Process configuration cannot be null.";
            log.error(errMsg);
            throw new ProcessManagementException(errMsg);
        }

        String bpelDoc = pConf.getBpelDocument();
        List<File> files = pConf.getFiles();

        for (final File file : files) {
            if (file.getPath().endsWith(bpelDoc) ||
                    file.getPath().endsWith(bpelDoc.replaceAll("/", "\\\\"))) {
                XMLStreamReader reader;
                FileInputStream fis = null;
                OMElement bpelDefinition;
                try {
                    fis = new FileInputStream(file);
                    XMLInputFactory xif = XMLInputFactory.newInstance();
                    reader = xif.createXMLStreamReader(fis);
                    StAXOMBuilder builder = new StAXOMBuilder(reader);
                    bpelDefinition = builder.getDocumentElement();
                    bpelDefinition.build();
                } catch (XMLStreamException e) {
                    String errMsg = "XML stream reader exception: " + file.getAbsolutePath();
                    log.error(errMsg, e);
                    throw new ProcessManagementException(errMsg, e);
                } catch (FileNotFoundException e) {
                    String errMsg = "BPEL File reading exception: " + file.getAbsolutePath();
                    log.error(errMsg, e);
                    throw new ProcessManagementException(errMsg, e);
                } finally {
                    if (fis != null) {
                        try {
                            fis.close();
                        } catch (IOException e) {
                            log.warn("Cannot close file input stream.", e);
                        }
                    }
                }

                return bpelDefinition;
            }
        }

        String errMsg = "Process Definition for: " + pConf.getProcessId() + " not found";
        log.error(errMsg);
        throw new ProcessManagementException(errMsg);
    }
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.bpel.skeleton.ode.integration.mgt.services.ProcessManagementException

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.