Package org.uengine.processmanager

Examples of org.uengine.processmanager.ProcessManagerFactoryBean


    String instanceId = instanceIdExpression.valueOf(workItemAcceptRequest);
    String tracingTag = tracingTagExpression.valueOf(workItemAcceptRequest);
    String endpoint = endpointExpression.valueOf(workItemAcceptRequest);

    ProcessManagerFactoryBean processManagerFactory = new ProcessManagerFactoryBean();
    ProcessManagerRemote pm = null;

    InitialContext context = new InitialContext();
    UserTransaction tx = (GlobalContext.useManagedTransaction ? (UserTransaction) context.lookup(GlobalContext.USERTRANSACTION_JNDI_NAME) : null);

    String responseEndPoint = null;

    try {
      pm = processManagerFactory.getProcessManager();

      if (tx != null)
        tx.begin();

      responseEndPoint = workflowService.workItemAccept(instanceId, tracingTag, endpoint, pm);
View Full Code Here


    String tracingTag = tracingTagExpression.valueOf(completeWorkitemRequest);

    List elementProcessVariableList = completeWorkitemRequest.getChildren("processVariable", WORKFLOW_NAMESPACE);
    HashMap processVariableMap = ElementToObject.makeProcessVariableMap(elementProcessVariableList);

    ProcessManagerFactoryBean processManagerFactory = new ProcessManagerFactoryBean();
    ProcessManagerRemote pm = null;

    InitialContext context = new InitialContext();
    UserTransaction tx = (GlobalContext.useManagedTransaction ? (UserTransaction) context.lookup(GlobalContext.USERTRANSACTION_JNDI_NAME) : null);

    String completedTaskId = null;
    List nextTaskList = null;

    try {
      pm = processManagerFactory.getProcessManager();

      if (tx != null)
        tx.begin();

      completedTaskId = workflowService.completeWorkitem(endpoint, instanceId, taskId, tracingTag, processVariableMap, pm);
View Full Code Here

    String instanceId = instanceIdExpression.valueOf(setProcessVariableRequest);

    List elementProcessVariableList = setProcessVariableRequest.getChildren("processVariable", WORKFLOW_NAMESPACE);
    HashMap processVariableMap = ElementToObject.makeProcessVariableMap(elementProcessVariableList);

    ProcessManagerFactoryBean processManagerFactory = new ProcessManagerFactoryBean();
    ProcessManagerRemote pm = null;

    InitialContext context = new InitialContext();
    UserTransaction tx = (GlobalContext.useManagedTransaction ? (UserTransaction) context.lookup(GlobalContext.USERTRANSACTION_JNDI_NAME) : null);

    try {
      pm = processManagerFactory.getProcessManager();

      if (tx != null)
        tx.begin();

      instanceId = workflowService.setProcessVariable(instanceId, processVariableMap, pm);
View Full Code Here

    String initiator = initiatorExpression.valueOf(startProcessRequest);

    List elementProcessVariableList = startProcessRequest.getChildren("processVariable", WORKFLOW_NAMESPACE);
    HashMap processVariableMap = ElementToObject.makeProcessVariableMap(elementProcessVariableList);

    ProcessManagerFactoryBean processManagerFactory = new ProcessManagerFactoryBean();
    ProcessManagerRemote pm = null;

    InitialContext context = new InitialContext();
    UserTransaction tx = (GlobalContext.useManagedTransaction ? (UserTransaction) context.lookup(GlobalContext.USERTRANSACTION_JNDI_NAME) : null);

    String instanceId = null;
    List nextTaskList = null;

    try {
      pm = processManagerFactory.getProcessManager();

      if (tx != null)
        tx.begin();

      instanceId = workflowService.startProcess(type, alias, initiator, processVariableMap, pm);
View Full Code Here

    String _pageCount = pageCountExpression.valueOf(getWorkListRequest);
    int pageCount = Integer.parseInt(UEngineUtil.isNotEmpty(_pageCount) ? _pageCount : "10");
    String _currentPage = currentPageExpression.valueOf(getWorkListRequest);
    int currentPage = Integer.parseInt(UEngineUtil.isNotEmpty(_currentPage) ? _currentPage : "1");

    ProcessManagerFactoryBean processManagerFactory = new ProcessManagerFactoryBean();
    ProcessManagerRemote pm = null;

//    InitialContext context = new InitialContext();
//    UserTransaction tx = (GlobalContext.useManagedTransaction ? (UserTransaction) context.lookup(GlobalContext.USERTRANSACTION_JNDI_NAME) : null);

    List workList = null;

    try {
      pm = processManagerFactory.getProcessManagerForReadOnly();

      workList = workflowService.getWorkList(endpoint, filter, pageCount, currentPage, pm);
    } catch (Exception e) {
      e.printStackTrace();
    } finally {
View Full Code Here

    String instanceId = telnetMessage.getInstanceId();
    String eventParentDivName = telnetMessage.getEventParentDivName();
    String eventDivName = telnetMessage.getEventDivName();
   
    if (!UEngineUtil.isNotEmpty(instanceId)) {
      ProcessManagerFactoryBean processManagerFactory = new ProcessManagerFactoryBean();
      ProcessManagerRemote pm = null;

      InitialContext context = null;
      UserTransaction tx = null;
      try {
        context = new InitialContext();
        tx = (GlobalContext.useManagedTransaction ? (UserTransaction) context.lookup(GlobalContext.USERTRANSACTION_JNDI_NAME) : null);
      } catch (NamingException e2) {
        e2.printStackTrace();
      }

      try {
        pm = processManagerFactory.getProcessManager();

        if (tx != null)
          tx.begin();

        String processDefinition = telnetMessage.getProcessDefinition();
View Full Code Here

    }

    roleMapping.setName(roleName);
   
   
    ProcessManagerFactoryBean processManagerFactory = new ProcessManagerFactoryBean();
    ProcessManagerRemote pm = null;

    InitialContext context = new InitialContext();
    UserTransaction tx = (GlobalContext.useManagedTransaction ? (UserTransaction) context.lookup(GlobalContext.USERTRANSACTION_JNDI_NAME) : null);

    boolean isSuccess = false;
   
    try {
      pm = processManagerFactory.getProcessManager();

      if (tx != null)
        tx.begin();

      isSuccess = workflowService.putRoleMapping(instanceId, roleMapping, pm);
View Full Code Here

      MessageProcessorBean.queueMessage(getMessage(), instance.getInstanceId(), null);
    } else if ( WAITING_TYPE_WHILE.equals(howWait) ){
      final Thread waiter = new Thread(){

        public void run() {
          ProcessManagerFactoryBean pmfb = new ProcessManagerFactoryBean();
          ProcessManagerRemote pm = null;
          ProcessInstance instance = null;
         
          try {
            pm = pmfb.getProcessManager();
            instance = pm.getProcessInstance(instanceId);
          } catch (Exception e2) {
            try {
              pm.remove();
            } catch (RemoteException e) {
              e.printStackTrace();
            } catch (RemoveException e) {
              e.printStackTrace();
            }
            return;
          }

          try {
            Thread.sleep(getMilliSecond());
            fireComplete(instance);
            pm.applyChanges();
          } catch (Exception e) {
            try {
              pm.cancelChanges();
              pm.remove();
             
              pm = pmfb.getProcessManager();
              instance = pm.getProcessInstance(instanceId);

              fireFault(instance, e);
             
              pm.applyChanges();
View Full Code Here

//  boolean bRetry = false;
 
  ProcessManagerRemote pmb = null;
  try
  {     
    pmb = (new ProcessManagerFactoryBean()).getProcessManager();
   
    System.out.println ("WorkProcessor::onMessage() called...");
   
    MapMessage message = (MapMessage)omessage;
 
View Full Code Here

     */
    public void setInitializeProc(HttpServletRequest request) throws Exception {
      ProcessDefinitionRemote pdr = null;

    // useBean
    ProcessManagerFactoryBean processManagerFactory = new ProcessManagerFactoryBean();

    pm = processManagerFactory.getProcessManager();

    instanceId = decode(request.getParameter("instanceId"));
   
    processDefinition = decode(request.getParameter("processDefinition"));
    tracingTag = request.getParameter("tracingTag");
View Full Code Here

TOP

Related Classes of org.uengine.processmanager.ProcessManagerFactoryBean

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.