Codota Logo
Process
Code IndexAdd Codota to your IDE (free)

How to use
Process
in
org.drools.definition.process

Best Java code snippets using org.drools.definition.process.Process (Showing top 16 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
LocalDateTime l =
  • Codota Iconnew LocalDateTime()
  • Codota IconLocalDateTime.now()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseLocalDateTime(text)
  • Smart code suggestions by Codota
}
origin: org.jbpm/jbpm-gwt-core

public static ProcessDefinitionRef processDefinition(Process process) {
  long version = 0;
  try {
    version = new Long(process.getVersion());
  } catch (NumberFormatException e) {
    // Do nothing, keep version 0
  }
  ProcessDefinitionRef result = new ProcessDefinitionRef(
    process.getId(), process.getName(), version);
  result.setPackageName(process.getPackageName());
  result.setDeploymentId("N/A");
  return result;
}

origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.drools

/**
 * Add a rule flow to this package.
 */
public void addProcess( Process process ) {
  if (this.ruleFlows == Collections.EMPTY_MAP) {
    this.ruleFlows = new HashMap<String, Process>();
  }
  this.ruleFlows.put( process.getId(),
            process );
}
origin: org.jbpm/jbpm-gwt-core

@Test
public void testProcessDefinition(){
  org.drools.definition.process.Process process = CommandDelegate.getProcess("Minimal");
  ProcessDefinitionRef processDefinitionRef = Transform.processDefinition(process);
  assertEquals(processDefinitionRef.getId(),process.getId());
  assertEquals(processDefinitionRef.getPackageName(),process.getPackageName());
  assertEquals(processDefinitionRef.getName(),process.getName());
}

origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.drools

  private static String createMessage(final Process process) {
    return process.getName() + " cannot be integrated";
  }
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.drools

public void removeProcess( final String id ) {
  Process process = this.processes.get( id );
  if (process == null) {
    throw new IllegalArgumentException( "Process '" + id + "' does not exist for this Rule Base." );
  }
  this.eventSupport.fireBeforeProcessRemoved( process );
  lock();
  try {
    this.processes.remove( id );
    this.pkgs.get(process.getPackageName()).removeRuleFlow(id);
  } finally {
    unlock();
  }
  this.eventSupport.fireAfterProcessRemoved( process );
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.drools

  private void overrideReSource( Package pkg, Resource res ) {
    for ( Rule r : pkg.getRules() ) {
      if ( isSwappable( r.getResource(), res ) ) {
        r.setResource( res );
      }
    }
    for ( TypeDeclaration d : pkg.getTypeDeclarations().values() ) {
      if ( isSwappable( d.getResource(), res ) ) {
        d.setResource( res );
      }
    }
    for ( Function f : pkg.getFunctions().values() ) {
      if ( isSwappable( f.getResource(), res ) ) {
        f.setResource( res );
      }
    }
    for ( Process p : pkg.getRuleFlows().values() ) {
      if  ( isSwappable( p.getResource(), res ) ) {
        p.setResource( res );
      }
    }
//        for ( WindowDeclaration w : pkg.getWindowDeclarations().values() ) {
//            if ( isSwappable( w.getResource(), res ) ) {
//                w.setResource( res );
//            }
//        }
  }

origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.drools

public void visitWorkflowProcess(final WorkflowProcess oldDefinition) {
  String oldProcessId = oldDefinition.getId();
  boolean found = false;
  for (org.drools.definition.process.Process process: newPkg.getProcesses()) {
    if (oldProcessId.equals(process.getId())) {
      found = true;
      break;
    }
  }
  if (!found){
    listener.debug("BinaryResourceDiffProducerImpl: Process "+oldProcessId+" is not present anymore. Adding to removed list.");
    this.removedDefinitions.add(oldDefinition);
    return;
  }
}
origin: org.jbpm/jbpm-gwt-core

public static Process getProcessByName(String name) {
  KnowledgeBase kbase = getSession().getKnowledgeBase();
  for (KnowledgePackage kpackage: kbase.getKnowledgePackages()) {
    for (Process process: kpackage.getProcesses()) {
      if (name.equals(process.getName())) {
        return process;
      }
    }
  }
  return null;
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.drools

public void addProcess( final Process process ) {
  // XXX: could use a synchronized(processes) here.
  this.eventSupport.fireBeforeProcessAdded( process );
  lock();
  try {
    this.processes.put( process.getId(),
              process );
  } finally {
    unlock();
  }
  this.eventSupport.fireAfterProcessAdded( process );
}
origin: org.jbpm/jbpm-gwt-core

@Test
public void testGetProcesses() {
  List<Process> processes = CommandDelegate.getProcesses();
  boolean minimalProcessFound = false;
  for( Process process : processes ) { 
    if( "Minimal Process".equals(process.getName()) ) {
      minimalProcessFound = true;
    }
  }
  assertTrue( minimalProcessFound );
}

origin: org.jbpm/jbpm-gwt-core

public static Process getProcess(String processId) {
  KnowledgeBase kbase = getSession().getKnowledgeBase();
  for (KnowledgePackage kpackage: kbase.getKnowledgePackages()) {
    for (Process process: kpackage.getProcesses()) {
      if (processId.equals(process.getId())) {
        return process;
      }
    }
  }
  return null;
}

origin: org.jbpm/jbpm-gwt-core

@Test
public void testGetProcess() {
  assertEquals("Minimal Process" , CommandDelegate.getProcess("Minimal").getName());
}

origin: org.jbpm/jbpm-gwt-core

@Test
public void testGetProcessByName(){
  assertEquals("Minimal", CommandDelegate.getProcessByName("Minimal Process").getId());
}

origin: org.jbpm/jbpm-human-task-mina

taskData.setProcessInstanceId(workItem.getProcessInstanceId());
if (session != null && session.getProcessInstance(workItem.getProcessInstanceId()) != null) {
  taskData.setProcessId(session.getProcessInstance(workItem.getProcessInstanceId()).getProcess().getId());
origin: org.jbpm/jbpm-human-task-mina

taskData.setProcessInstanceId(workItem.getProcessInstanceId());
if (session != null && session.getProcessInstance(workItem.getProcessInstanceId()) != null) {
  taskData.setProcessId(session.getProcessInstance(workItem.getProcessInstanceId()).getProcess().getId());
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.drools

  Process process = (Process) kd;
  this.listener.debug( "KnowledgeAgent removing Process=" + process );
  this.kbase.removeProcess( process.getId() );
} else if ( kd instanceof TypeDeclaration ) {
org.drools.definition.processProcess

Javadoc

A Process represents one modular piece of business logic that can be executed by a process engine. Different types of processes may exist.

Most used methods

  • getId
    The unique id of the Process.
  • getName
    The name of the Process.
  • getPackageName
    The package name of this process.
  • getResource
  • getVersion
    The version of the Process. You may use your own versioning format (as the version is not interprete
  • setResource

Popular in Java

  • Finding current android device location
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getExternalFilesDir (Context)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Reference (javax.naming)
  • JTable (javax.swing)
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now