Package org.jbpm.api

Examples of org.jbpm.api.ProcessEngine.execute()


    ProcessEngine processEngine = new ConfigurationImpl()
        .skipDbCheck()
        .buildProcessEngine();
   
    try {
      processEngine.execute(new Command<Object>(){
        private static final long serialVersionUID = 1L;
        public Object execute(Environment environment) throws Exception {
          Session session = environment.get(Session.class);
          DbHelper.executeSqlResource("create/jbpm."+database+".create.sql", session);
          PropertyImpl.createProperties(session);
View Full Code Here


    ProcessEngine processEngine = new ConfigurationImpl()
      .skipDbCheck()
      .buildProcessEngine();
 
    try {
      JbpmVersion jbpmVersion = (JbpmVersion) processEngine.execute(new Command<Object>(){
        private static final long serialVersionUID = 1L;
        public Object execute(Environment environment) throws Exception {
          Session session = environment.get(Session.class);
          if (!PropertyImpl.propertiesTableExists(session)) {
            try {
View Full Code Here

      if (jbpmVersion == JbpmVersion.V_4_2) {
        throw new JbpmException("jBPM schema is already up to date");
      }

      if (jbpmVersion.isEarlier(JbpmVersion.V_4_1)) {
        processEngine.execute(new Command<Object>(){
          private static final long serialVersionUID = 1L;
          public Object execute(Environment environment) throws Exception {
            Session session = environment.get(Session.class);
            DbHelper.executeSqlResource("upgrade-4.0-to-4.1/jbpm." + database + ".upgrade.sql", session);
            return null;
View Full Code Here

          }
        });
      }

      if (jbpmVersion.isEarlier(JbpmVersion.V_4_2)) {
        processEngine.execute(new Command<Object>(){
          private static final long serialVersionUID = 1L;
          public Object execute(Environment environment) throws Exception {
            Session session = environment.get(Session.class);
            DbHelper.executeSqlResource("upgrade-4.1-to-4.2/jbpm." + database + ".upgrade.sql", session);
            PropertyImpl.upgradeProperties(session);
View Full Code Here

            DbHelper.executeSqlResource("upgrade-4.1-to-4.2/jbpm." + database + ".upgrade.sql", session);
            PropertyImpl.upgradeProperties(session);
            return null;
          }
        });
        processEngine.execute(new Command<Object>(){
          private static final long serialVersionUID = 1L;
          public Object execute(Environment environment) throws Exception {
            Session session = environment.get(Session.class);
            // find deployments without a langid property
            List<DeploymentProperty> deploymentProperties = session.createCriteria(DeploymentProperty.class)
View Full Code Here

    /* Create command and query */
       Command<List<T>> cmd = new ProcessEngineCommand();

       /* Execute specified query using given parameters */
       ProcessEngine processEngine = getProcessEngine(ctx);
       List<T> tasks = processEngine.execute(cmd);
      
       return tasks;
  }
 
  private class ProcessEngineCommand implements Command<List<T>>
View Full Code Here

                    }
                };
                return (List<Task>) q.execute(environment);
            }
        };
        List<Task> taskList = processEngine.execute(cmd);
        if (taskList.isEmpty()) {
            loger.warning("No tasks found in queue: " + pq.getName());
            return null;
        }
        Task task = taskList.get(0);
View Full Code Here

      long start = System.currentTimeMillis();
        ProcessEngine engine = getProcessEngine(ctx);
        org.jbpm.api.ProcessInstance pi = engine.getExecutionService().findProcessInstanceById(internalId);
        final ExecutionImpl execution = (ExecutionImpl) pi.getProcessInstance();
        final List<String> transitionNames = new ArrayList<String>();
        engine.execute(new Command() {
            public Object execute(Environment env) {
                for (Transition transition : execution.getActivity().getOutgoingTransitions()) {
                    transitionNames.add(transition.getDestination().getName());
                }
                return null;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.