congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
WorkflowInstanceImpl.findActivityInstance
Code IndexAdd Tabnine to your IDE (free)

How to use
findActivityInstance
method
in
com.effektif.workflow.impl.workflowinstance.WorkflowInstanceImpl

Best Java code snippets using com.effektif.workflow.impl.workflowinstance.WorkflowInstanceImpl.findActivityInstance (Showing top 6 results out of 315)

origin: com.effektif/effektif-mongo

@SuppressWarnings("unchecked")
protected Queue<ActivityInstanceImpl> readWork(BasicDBObject dbWorkflowInstance, String fieldName, WorkflowInstanceImpl workflowInstance) {
 Queue<ActivityInstanceImpl> workQueue = null;
 List<String> workActivityInstanceIds = (List<String>) dbWorkflowInstance.get(fieldName);
 if (workActivityInstanceIds!=null) {
  workQueue = new LinkedList<>();
  for (String workActivityInstanceId: workActivityInstanceIds) {
   ActivityInstanceImpl workActivityInstance = workflowInstance.findActivityInstance(workActivityInstanceId);
   workQueue.add(workActivityInstance);
  }
 }
 return workQueue;
}
origin: effektif/effektif

protected ScopeInstanceImpl getScopeInstance(WorkflowInstanceImpl workflowInstance, String activityInstanceId) {
 ScopeInstanceImpl scopeInstance = workflowInstance;
 if (activityInstanceId!=null) {
  scopeInstance = workflowInstance.findActivityInstance(activityInstanceId);
  Exceptions.checkNotNull(scopeInstance);
 }
 return scopeInstance;
}
origin: effektif/effektif

@SuppressWarnings("unchecked")
protected Queue<ActivityInstanceImpl> readWork(BasicDBObject dbWorkflowInstance, String fieldName, WorkflowInstanceImpl workflowInstance) {
 Queue<ActivityInstanceImpl> workQueue = null;
 List<String> workActivityInstanceIds = (List<String>) dbWorkflowInstance.get(fieldName);
 if (workActivityInstanceIds!=null) {
  workQueue = new LinkedList<>();
  for (String workActivityInstanceId: workActivityInstanceIds) {
   ActivityInstanceImpl workActivityInstance = workflowInstance.findActivityInstance(workActivityInstanceId);
   workQueue.add(workActivityInstance);
  }
 }
 return workQueue;
}
origin: effektif/effektif

/**
 * Notifies event listeners tha the workflow instance has finished execution.
 */
public void workflowInstanceEnded() {
 workflow.workflowEngine.notifyWorkflowInstanceEnded(workflowInstance);
 
 destroyScopeInstance();
 
 if (callingWorkflowInstanceId != null) {
  WorkflowInstanceImpl callingWorkflowInstance = getLockedWorkflowInstance(callingWorkflowInstanceId);
  final ActivityInstanceImpl callingActivityInstance = callingWorkflowInstance.findActivityInstance(callingActivityInstanceId);
  if (log.isDebugEnabled())
   log.debug("Notifying calling activity instance " + callingActivityInstance);
  ActivityImpl activityDefinition = callingActivityInstance.getActivity();
  final SubProcessImpl callActivity = (SubProcessImpl) activityDefinition.activityType;
  callActivity.calledWorkflowInstanceEnded(callingActivityInstance, this);
 }
}
origin: effektif/effektif

public WorkflowInstance send(Message message, WorkflowInstanceImpl workflowInstance) {
 Map<String, Object> transientData = message.getTransientData();
 if (transientData !=null) {
  for (String key: transientData.keySet()) {
   workflowInstance.setTransientProperty(key, transientData.get(key));
  }
 }
 String activityInstanceId = message.getActivityInstanceId();
 ActivityInstanceImpl activityInstance = workflowInstance.findActivityInstance(activityInstanceId);
 if (activityInstance==null) {
  workflowInstanceStore.unlockWorkflowInstance(workflowInstance);
  throw new RuntimeException("Activity instance "+activityInstanceId+" not in workflow instance");
 }
 if (log.isDebugEnabled())
  log.debug("Signalling "+activityInstance);
 ActivityImpl activity = activityInstance.getActivity();
 activity.activityType.message(activityInstance, message);
 return workflowInstance.executeWork();
}
origin: effektif/effektif

 @Override
 public void execute(JobController jobController) {

  ActivityInstanceImpl activityInstance =
    jobController.getWorkflowInstance().findActivityInstance(jobController.getJob().getActivityInstanceId());

  if (activityInstance != null) {
   for (TimerImpl timer : activityInstance.activity.getTimers()) {
    if (timer.timer instanceof BoundaryEventTimer) {
     BoundaryEventTimer boundaryEventTimer = (BoundaryEventTimer) timer.timer;
     for (String transitionId : boundaryEventTimer.boundaryEvent.getToTransitionIds()) {
      activityInstance.takeTransition(
        jobController.getWorkflowInstance().getWorkflow().findTransitionByIdLocal(transitionId));
     }
    }
   }
   jobController.getWorkflowInstance().executeWork();
  } else {
   if (log.isDebugEnabled()) log.debug("activityInstance is null, job is not executed. Looked for activityInstance: " + jobController.getJob().getActivityInstanceId());
  }
 }
}
com.effektif.workflow.impl.workflowinstanceWorkflowInstanceImplfindActivityInstance

Popular methods of WorkflowInstanceImpl

  • <init>
  • getId
  • toWorkflowInstance
  • getUpdates
  • notifyUnlockListeners
  • removeLock
  • setVariableValue
  • addAsyncWork
  • addJob
  • addLockedWorkflowInstance
  • addSyncWork
  • addUnlockListener
  • addSyncWork,
  • addUnlockListener,
  • addWork,
  • cancel,
  • destroyScopeInstance,
  • endAndPropagateToParent,
  • execute,
  • executeWork,
  • findActivityInstanceByActivityId

Popular in Java

  • Updating database using SQL prepared statement
  • runOnUiThread (Activity)
  • getExternalFilesDir (Context)
  • scheduleAtFixedRate (Timer)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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