Package de.danet.an.workflow.api

Examples of de.danet.an.workflow.api.WorkflowServiceFactory


    private static WorkflowService wfsCache = null;

    private WorkflowService workflowService() {
  if (wfsCache == null) {
      try {
    WorkflowServiceFactory wfsf
        = WorkflowServiceFactory.newInstance ();
    wfsCache = wfsf.newWorkflowService();
      } catch (FactoryConfigurationError e) {
    throw new IllegalStateException (e.getMessage());
      }
  }
  return wfsCache;
View Full Code Here


    /**
     * Initialisierung.
     */
    protected void setUp() throws Exception {
  try {
      WorkflowServiceFactory wfsf
    = WorkflowServiceFactory.newInstance ();
      workflowService = wfsf.newWorkflowService();
  } catch (FactoryConfigurationError e) {
      throw new IllegalStateException (e.getMessage());
  }
    }
View Full Code Here

    private static WorkflowService wfsCache = null;

    private WorkflowService workflowService() {
  if (wfsCache == null) {
      try {
    WorkflowServiceFactory wfsf
        = WorkflowServiceFactory.newInstance ();
    wfsCache = wfsf.newWorkflowService();
      } catch (FactoryConfigurationError e) {
    throw new IllegalStateException (e.getMessage());
      }
  }
  return wfsCache;
View Full Code Here

      if (wfs == null) {
          if (logger.isDebugEnabled()) {
              logger.debug ("Creating connection to workflow service");
          }
          // Get workflow service
                WorkflowServiceFactory wfsf
                    = WorkflowServiceFactory.newInstance ();
                Object req = FacesContext.getCurrentInstance()
                    .getExternalContext().getRequest();
                if (req instanceof PortletRequest) {
                    String wejn = ((PortletRequest)req).getPreferences()
                        .getValue("workflowEngineJndiName", "");
                    if (wejn != null && wejn.length() > 0) {
                        wfsf.setProperty("de.danet.an.workflow.engine", wejn);
                    }
                    String icf = ((PortletRequest)req).getPreferences()
                        .getValue("initialContextFactory", "");
                    String icu = ((PortletRequest)req).getPreferences()
                        .getValue("initialContextUrl", "");
                    if (icf != null && icf.length() > 0
                        || icu != null && icu.length() > 0) {
                        Hashtable env = new Hashtable ();
                        if (icf != null && icf.length() > 0) {
                            env.put(Context.INITIAL_CONTEXT_FACTORY, icf);
                        }
                        if (icu != null && icu.length() > 0) {
                            env.put(Context.PROVIDER_URL, icu);
                        }
                        wfsf.setProperty
                            ("javax.naming.InitialContext.Environment", env);
                    }
                }
    wfs = wfsf.newWorkflowService();
      }
      return wfs;
  } catch (FactoryConfigurationError e) {
      logger.error (e.getMessage(), e);
      throw new EvaluationException (e.getMessage(), e);
View Full Code Here

    /**
     * Initialisierung.
     */
    protected void setUp() throws Exception {
  try {
      WorkflowServiceFactory wfsf
    = WorkflowServiceFactory.newInstance ();
      workflowService = wfsf.newWorkflowService();
  } catch (FactoryConfigurationError e) {
      throw new IllegalStateException (e.getMessage());
  }
    }
View Full Code Here

      if (wfs == null) {
          if (logger.isDebugEnabled()) {
              logger.debug ("Creating connection to workflow service");
          }
                // Get workflow service
                WorkflowServiceFactory wfsf
                    = WorkflowServiceFactory.newInstance ();
                Object req = FacesContext.getCurrentInstance()
                    .getExternalContext().getRequest();
                if (req instanceof PortletRequest) {
                    String wejn = ((PortletRequest)req).getPreferences()
                        .getValue("workflowEngineJndiName", "");
                    if (wejn != null && wejn.length() > 0) {
                        wfsf.setProperty("de.danet.an.workflow.engine", wejn);
                    }
                    String icf = ((PortletRequest)req).getPreferences()
                        .getValue("initialContextFactory", "");
                    String icu = ((PortletRequest)req).getPreferences()
                        .getValue("initialContextUrl", "");
                    if (icf != null && icf.length() > 0
                        || icu != null && icu.length() > 0) {
                        Hashtable env = new Hashtable ();
                        if (icf != null && icf.length() > 0) {
                            env.put(Context.INITIAL_CONTEXT_FACTORY, icf);
                        }
                        if (icu != null && icu.length() > 0) {
                            env.put(Context.PROVIDER_URL, icu);
                        }
                        wfsf.setProperty
                            ("javax.naming.InitialContext.Environment", env);
                    }
                }
                wfs = wfsf.newWorkflowService();
      }
      return wfs;
  } catch (FactoryConfigurationError e) {
      logger.error (e.getMessage(), e);
      throw new EvaluationException (e.getMessage());
View Full Code Here

    /**
     * Initialisierung.
     */
    protected void setUp() throws Exception {
  try {
      WorkflowServiceFactory wfsf
    = WorkflowServiceFactory.newInstance ();
      workflowService = wfsf.newWorkflowService();
  } catch (FactoryConfigurationError e) {
      throw new IllegalStateException (e.getMessage());
  }
    }
View Full Code Here

      out.close ();

            int tries = 20;
            for (; tries > 0; tries--) {
                try {
                    WorkflowServiceFactory wfsf
                        = WorkflowServiceFactory.newInstance ();
                    WorkflowService wfs = wfsf.newWorkflowService();
                    ProcessDefinitionDirectory pdd
                        = wfs.processDefinitionDirectory();
                    pdd.importProcessDefinitions(out.toByteArray());
                    break;
                } catch (FactoryConfigurationError e) {
View Full Code Here

    /**
     * Initialisierung.
     */
    protected void setUp() throws Exception {
  try {
      WorkflowServiceFactory wfsf
    = WorkflowServiceFactory.newInstance ();
      workflowService = wfsf.newWorkflowService();
  } catch (FactoryConfigurationError e) {
      throw new IllegalStateException (e.getMessage());
  }
    }
View Full Code Here

    /**
     * Import the process definitions from a XPDL file
     * unsing the ProcessDefinitionDirectory bean.
     */
    public void importProcessDefinitions() throws Exception {
  WorkflowServiceFactory wsf = WorkflowServiceFactory.newInstance();
  WorkflowService ws = wsf.newWorkflowService();
  pdd = ws.processDefinitionDirectory();
  InputStream is = getClass().getResourceAsStream("/load/processes.xml");
  assertTrue (is != null);
  BufferedReader br = new BufferedReader
      (new InputStreamReader(is, "ISO-8859-1"));
View Full Code Here

TOP

Related Classes of de.danet.an.workflow.api.WorkflowServiceFactory

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.