Tabnine Logo
JavaServiceTask
Code IndexAdd Tabnine to your IDE (free)

How to use
JavaServiceTask
in
com.effektif.workflow.api.activities

Best Java code snippets using com.effektif.workflow.api.activities.JavaServiceTask (Showing top 17 results out of 315)

origin: effektif/effektif

public JavaServiceTask msgExpression(String messageExpression) {
 return new JavaServiceTask()
  .javaClass(WorkflowTest.class)
  .methodName("recordMessage")
  .argExpression(messageExpression);
}
origin: com.effektif/effektif-workflow-api

public JavaServiceTask argValue(Object value) {
 addArgBinding(new Binding().value(value));
 return this;
}
public JavaServiceTask argExpression(String expression) {
origin: effektif/effektif

public JavaServiceTask msgValue(String message) {
 return new JavaServiceTask()
  .javaClass(WorkflowTest.class)
  .methodName("recordMessage")
  .argValue(message);
}
public JavaServiceTask msgExpression(String messageExpression) {
origin: effektif/effektif

@Override
public void parse(ActivityImpl activityImpl, JavaServiceTask activity, WorkflowParser parser) {
 super.parse(activityImpl, activity, parser);
 List<BindingImpl<?>> argBindingsList = parser.parseBindings((List)activity.getArgBindings(), "argBindings");
 if (argBindingsList!=null) {
  this.argBindings = argBindingsList.toArray(new BindingImpl[argBindingsList.size()]);
 }
 
 
 // TODO add parse warnings if not exactly 1 is specified of : beanName or clazz
 // TODO add parse warnings if no methodName is specified
 
 String methodName = activity.getMethodName();
 if (activity.getJavaClass()!=null && methodName!=null) {
  staticMethod = Reflection.findMethod(activity.getJavaClass(), methodName);
  if (!Modifier.isStatic(staticMethod.getModifiers())) {
   parser.addWarning("Method '"+methodName+"' is not static");
  }
  staticMethod.setAccessible(true);
 }
}
origin: effektif/effektif

@Test
public void testTextTemplateRenders() {
 ExecutableWorkflow workflow = new ExecutableWorkflow()
  .variable("world", TextType.INSTANCE)
  .activity("invoke hello", new JavaServiceTask()
   .javaClass(BindingTemplateTest.class)
   .methodName("setTemplateValue")
   .argTemplate("hello {{world}}"));
 
 deploy(workflow);
 
 start(new TriggerInstance()
  .workflowId(workflow.getId())
  .data("world", "testrunner"));
 
 assertEquals("hello testrunner", templateValue);
}
origin: effektif/effektif

 @Test
 public void testJavaServiceTaskBean() {
  ExecutableWorkflow workflow = new ExecutableWorkflow()
   .activity("invoke bean", new JavaServiceTask()
   .beanName("myBean")
   .methodName("hello")
   .argValue("world"));
  
  MyBean myBean = new MyBean();
  configuration.set(myBean, "myBean");
  
  deploy(workflow);
  
  start(workflow);
  
  assertEquals("world", myBean.msg);
 }
}
origin: effektif/effektif

public void testJavaServiceTask() {
 JavaServiceTask activity = new JavaServiceTask();
 activity.setId("profilePerformance");
 activity = serialize(activity);
 assertEquals(JavaServiceTask.class, activity.getClass());
 assertEquals("profilePerformance", activity.getId());
}
origin: effektif/effektif

 method = staticMethod;
} else {
 String beanName = activity.getBeanName();
 if (beanName!=null) {
  bean = activityInstance.getConfiguration().get(beanName);
  method = Reflection.findMethod(bean.getClass(), activity.getMethodName(), args);
origin: effektif/effektif

@Test
public void testJavaServiceTask() {
 JavaServiceTask activity = new JavaServiceTask().id("profilePerformance");
 print(activity);
}
origin: effektif/effektif

@Test
public void testTextTemplateRendersList() {
 ExecutableWorkflow workflow = new ExecutableWorkflow()
  .variable("colours", new ListType(TextType.INSTANCE))
  .activity("render", new JavaServiceTask()
   .javaClass(BindingTemplateTest.class)
   .methodName("setTemplateValue")
   .argTemplate("Colours: {{colours}}"));
 deploy(workflow);
 start(new TriggerInstance()
  .workflowId(workflow.getId())
  .data("colours", Lists.of("red", "orange", "yellow")));
 assertEquals("Colours: \n\n* red\n* orange\n* yellow\n\n", templateValue);
}
origin: effektif/effektif

@Test
public void testJavaServiceTask() {
 JavaServiceTask activity = new JavaServiceTask();
 activity.setId("profilePerformance");
 activity = serializeActivity(activity);
 assertEquals(JavaServiceTask.class, activity.getClass());
 assertEquals("profilePerformance", activity.getId());
}
origin: effektif/effektif

protected void assertExpression(String variableId, DataType variableType, Object variableValue, String expression, Object expectedExpressionValue) {
 ExecutableWorkflow workflow = new ExecutableWorkflow()
  .variable(variableId, variableType)
  .activity("invoke hello", new JavaServiceTask()
   .javaClass(ExpressionTest.class)
   .methodName("setExpressionValue")
   .argExpression(expression));
 
 deploy(workflow);
 
 start(new TriggerInstance()
  .workflowId(workflow.getId())
  .data(variableId, variableValue));
 
 assertEquals(expectedExpressionValue, expressionValue);
}
origin: com.effektif/effektif-workflow-api

public JavaServiceTask argExpression(String expression) {
 addArgBinding(new Binding().expression(expression));
 return this;
}
public JavaServiceTask argTemplate(String template) {
origin: effektif/effektif

public JavaServiceTask argValue(Object value) {
 addArgBinding(new Binding().value(value));
 return this;
}
public JavaServiceTask argExpression(String expression) {
origin: effektif/effektif

public JavaServiceTask argExpression(String expression) {
 addArgBinding(new Binding().expression(expression));
 return this;
}
public JavaServiceTask argTemplate(String template) {
origin: com.effektif/effektif-workflow-api

public JavaServiceTask argTemplate(String template) {
 addArgBinding(new Binding().template(template));
 return this;
}
origin: effektif/effektif

public JavaServiceTask argTemplate(String template) {
 addArgBinding(new Binding().template(template));
 return this;
}
com.effektif.workflow.api.activitiesJavaServiceTask

Javadoc

invokes a java method.

Most used methods

  • <init>
  • addArgBinding
  • argExpression
  • argTemplate
  • argValue
  • beanName
    the name of the bean in the brewery (engine configuration) to invoke the method on. This is mutually
  • getArgBindings
  • getBeanName
    the name of the bean in the brewery (engine configuration) to invoke the method on. This is mutually
  • getId
  • getJavaClass
    The class on which the static method will be invoked. This is mutually exclusive with the beanName p
  • getMethodName
  • id
  • getMethodName,
  • id,
  • javaClass,
  • methodName,
  • multiInstance,
  • setId,
  • transitionToNext

Popular in Java

  • Running tasks concurrently on multiple threads
  • getContentResolver (Context)
  • setRequestProperty (URLConnection)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Path (java.nio.file)
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • Best IntelliJ plugins
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