Tabnine Logo
Process
Code IndexAdd Tabnine 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)

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

  • Updating database using SQL prepared statement
  • scheduleAtFixedRate (Timer)
  • onRequestPermissionsResult (Fragment)
  • getApplicationContext (Context)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • PhpStorm for WordPress
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now