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

How to use
Action
in
org.jbpm.graph.def

Best Java code snippets using org.jbpm.graph.def.Action (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
FileOutputStream f =
  • Codota IconFile file;new FileOutputStream(file)
  • Codota IconString name;new FileOutputStream(name)
  • Codota IconFile file;new FileOutputStream(file, true)
  • Smart code suggestions by Codota
}
origin: org.jboss.seam/jboss-seam

 @Override
 void process() throws Exception
 {
   initProcessAndTask(context);
   action.execute(context);
 }
}.run();
origin: org.jbpm.jbpm3/jbpm-jpdl

public void read(Element element, JpdlXmlReader jpdlReader) {
 Delegation delegation = jpdlReader.readMailDelegation(element);
 this.action = new Action(delegation);
}
origin: org.jbpm.jbpm3/jbpm-jpdl

private void writeAction(Element parentElement, Action action) {
 String actionName = ActionTypes.getActionName(action.getClass());
 Element actionElement = parentElement.addElement(actionName);
 if (action.getName() != null) {
  actionElement.addAttribute("name", action.getName());
 }
 if (!action.acceptsPropagatedEvents()) {
  actionElement.addAttribute("accept-propagated-events", "false");
 }
 action.write(actionElement);
}
origin: com.github.albfernandez/jbpm-jpdl

public boolean equals(Object o) {
 if (this == o) return true;
 if (!(o instanceof Action)) return false;
 Action other = (Action) o;
 if (id != 0 && id == other.getId()) return true;
 if (name != null) {
  // named actions are unique at the process definition level
  return name.equals(other.getName())
   && processDefinition.equals(other.getProcessDefinition());
 }
 return (actionDelegation != null ? actionDelegation.equals(other.getActionDelegation())
   : actionExpression != null ? actionExpression.equals(other.getActionExpression())
     : referencedAction != null ? referencedAction.equals(other.getActionExpression())
       : false)
  && event.equals(other.getEvent());
}
origin: org.jbpm.jbpm3/jbpm-jpdl

private List getNamedProcessActions(Map actions) {
 List namedProcessActions = new ArrayList();
 for (Iterator iter = actions.values().iterator(); iter.hasNext();) {
  Action action = (Action) iter.next();
  if (action.getEvent() == null && action.getName() != null) {
   namedProcessActions.add(action);
  }
 }
 return namedProcessActions;
}
origin: org.jbpm.jbpm3/jbpm-jpdl

Action action = new Action(delegation);
action.setProcessDefinition(processDefinition);
action.setName(task.getName());
origin: org.jbpm.jbpm3/jbpm-jpdl

public boolean execute(JbpmContext jbpmContext) throws Exception {
 Token token = getToken();
 ExecutionContext executionContext = new ExecutionContext(token);
 executionContext.setAction(action);
 executionContext.setEvent(action.getEvent());
 Node node;
 if (token != null && (node = token.getNode()) != null) {
  node.executeAction(action, executionContext);
 }
 else {
  action.execute(executionContext);
 }
 return true;
}
origin: org.jbpm.jbpm3/jbpm-jpdl

private void executeActions(List actions, ExecutionContext executionContext,
 boolean isPropagated) {
 if (actions == null) return;
 for (Iterator iter = actions.iterator(); iter.hasNext();) {
  Action action = (Action) iter.next();
  if (!action.acceptsPropagatedEvents() && isPropagated) continue;
  if (action.isAsync()) {
   ExecuteActionJob job = createAsyncActionExecutionJob(executionContext.getToken(),
    action);
   MessageService messageService = executionContext.getJbpmContext()
    .getServices()
    .getMessageService();
   messageService.send(job);
  }
  else {
   executeAction(action, executionContext);
  }
 }
}
origin: org.jbpm.jbpm3/jbpm-jpdl

/**
 * creates a bidirectional relation between this process definition and the given action.
 * 
 * @throws IllegalArgumentException if action is null or if action.getName() is null.
 */
public Action addAction(Action action) {
 if (action == null) {
  throw new IllegalArgumentException("action is null");
 }
 if (action.getName() == null) {
  throw new IllegalArgumentException("action is unnamed");
 }
 if (actions == null) actions = new HashMap();
 actions.put(action.getName(), action);
 action.processDefinition = this;
 return action;
}
origin: org.jbpm.jbpm3/jbpm-jpdl

public void setAction(Action action) {
 this.action = action;
 if (action != null) this.event = action.getEvent();
}
origin: com.github.albfernandez/jbpm-jpdl

public void saveJob(Job job) {
 try {
  session.save(job);
  if (job instanceof Timer) {
   Timer timer = (Timer) job;
   Action action = timer.getAction();
   // if action is transient, save it
   if (action != null && action.getId() == 0L) session.save(action);
  }
 }
 catch (HibernateException e) {
  throw new JbpmPersistenceException("could not save " + job, e);
 }
}
origin: org.jbpm.jbpm3/jbpm-jpdl

public boolean equals(Object o) {
 if (this == o) return true;
 if (!(o instanceof Action)) return false;
 Action other = (Action) o;
 if (id != 0 && id == other.getId()) return true;
 if (name != null) {
  // named actions are unique at the process definition level
  return name.equals(other.getName())
   && processDefinition.equals(other.getProcessDefinition());
 }
 return (actionDelegation != null ? actionDelegation.equals(other.getActionDelegation())
   : actionExpression != null ? actionExpression.equals(other.getActionExpression())
     : referencedAction != null ? referencedAction.equals(other.getReferencedAction())
       : false)
  && event.equals(other.getEvent());
}
origin: com.github.albfernandez/jbpm-jpdl

Action action = new Action(delegation);
action.setProcessDefinition(processDefinition);
action.setName(task.getName());
origin: com.github.albfernandez/jbpm-jpdl

public boolean execute(JbpmContext jbpmContext) throws Exception {
 Token token = getToken();
 ExecutionContext executionContext = new ExecutionContext(token);
 executionContext.setAction(action);
 executionContext.setEvent(action.getEvent());
 Node node;
 if (token != null && (node = token.getNode()) != null) {
  node.executeAction(action, executionContext);
 }
 else {
  action.execute(executionContext);
 }
 return true;
}
origin: com.github.albfernandez/jbpm-jpdl

private List getNamedProcessActions(Map actions) {
 List namedProcessActions = new ArrayList();
 for (Iterator iter = actions.values().iterator(); iter.hasNext();) {
  Action action = (Action) iter.next();
  if (action.getEvent() == null && action.getName() != null) {
   namedProcessActions.add(action);
  }
 }
 return namedProcessActions;
}
origin: com.github.albfernandez/jbpm-jpdl

private void executeActions(List actions, ExecutionContext executionContext,
 boolean isPropagated) {
 if (actions == null) return;
 for (Iterator iter = actions.iterator(); iter.hasNext();) {
  Action action = (Action) iter.next();
  if (!action.acceptsPropagatedEvents() && isPropagated) continue;
  if (action.isAsync()) {
   ExecuteActionJob job = createAsyncActionExecutionJob(executionContext.getToken(),
    action);
   MessageService messageService = executionContext.getJbpmContext()
    .getServices()
    .getMessageService();
   messageService.send(job);
  }
  else {
   executeAction(action, executionContext);
  }
 }
}
origin: com.github.albfernandez/jbpm-jpdl

/**
 * creates a bidirectional relation between this process definition and the given action.
 * 
 * @throws IllegalArgumentException if action is null or if action.getName() is null.
 */
public Action addAction(Action action) {
 if (action == null) {
  throw new IllegalArgumentException("action is null");
 }
 if (action.getName() == null) {
  throw new IllegalArgumentException("action is unnamed");
 }
 if (actions == null) actions = new HashMap();
 actions.put(action.getName(), action);
 action.processDefinition = this;
 return action;
}
origin: com.github.albfernandez/jbpm-jpdl

public void setAction(Action action) {
 this.action = action;
 if (action != null) this.event = action.getEvent();
}
origin: org.jbpm.jbpm3/jbpm-jpdl

public void saveJob(Job job) {
 try {
  session.save(job);
  if (job instanceof Timer) {
   Timer timer = (Timer) job;
   Action action = timer.getAction();
   // if action is transient, save it
   if (action != null && action.getId() == 0L) 
    session.save(action);
  }
 }
 catch (HibernateException e) {
  throw new JbpmPersistenceException("could not save " + job, e);
 }
}
origin: org.jboss.seam/jboss-seam

public void executeAction(final Action action, final ExecutionContext context) throws Exception
{
 if ( isPageflow(context) )
 {
   action.execute(context);
 }
 else
 {
   new ContextualCall()
   {
    @Override
    void process() throws Exception
    {
      initProcessAndTask(context);
      action.execute(context);
    }
   }.run();
 }
}
org.jbpm.graph.defAction

Most used methods

  • execute
  • <init>
  • acceptsPropagatedEvents
  • equals
  • getActionDelegation
  • getActionExpression
  • getEvent
  • getId
  • getName
  • getProcessDefinition
  • hashCode
  • isAsync
  • hashCode,
  • isAsync,
  • isAsyncExclusive,
  • read,
  • setAsync,
  • setAsyncExclusive,
  • setName,
  • setProcessDefinition,
  • setPropagationAllowed,
  • setReferencedAction

Popular in Java

  • Updating database using SQL prepared statement
  • getResourceAsStream (ClassLoader)
  • onCreateOptionsMenu (Activity)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Path (java.nio.file)
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
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