* How to execute flow.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package org.neuro4j.workflow.tutorial;

import java.util.HashMap;
import java.util.Map;

import org.neuro4j.workflow.ExecutionResult;
import org.neuro4j.workflow.common.WorkflowEngine;
import org.neuro4j.workflow.common.WorkflowEngine.ConfigBuilder;

/**
 * This is client's class.
 */
public class App 
{

	
    public static void main( String[] args )
    {
    	
    	// create engine with default configuration
    	WorkflowEngine engine = new WorkflowEngine(new ConfigBuilder());
    	
    	// put input parameters
    	Map<String, Object> parameters = new HashMap<String, Object>();
    	parameters.put("name", "Workflow");

    	//execute flow
    	//run flow - engine.execute("<your.package.flowName>-<StartNodeName>", parameters);
    	ExecutionResult result =  engine.execute("org.neuro4j.workflow.tutorial.HelloFlow-Start", parameters);
    	
    	if (result.getException() == null)
    	{
    		String message = (String) result.getFlowContext().get("message");
    		System.out.println("Message: " + message);
    		
    	} else {
    		result.print();
    	}

    }
}

* How to create simple workflow.

http://neuro4j.org/articles/tutorial_hello_world

 

* How to use workflow with SpringMVC.

http://neuro4j.org/articles/tutorial-java-workflow-with-springmvc

 

* How to integrate with Google Guice.

http://neuro4j.org/articles/google-guice-with-workflow

* How to debug flow.

Please read following document. http://neuro4j.org/docs/wf/flowdebugtool

Example application (http://neuro4j.org/articles/tutorial-debug-first-flow)

* How to specify own icon for custom block.

Developer needs to add image in png format with the same name like CustomBlock.

Custom Icon


 

* How to create node on workflow from existing CustomBlock.

a) Using Palette;

  • Select CustomNode on Palette;
  • Click on flow - New Node will be created;
  • Select a Node - On Properties View select Class Name;
  • Java implementation class
  • Select implementation class;

b) Using CustomBlock View;

  • Open Neuro4j Flow Perspective;
  • Open CustomBlock View.
  • CustomBlock View
  • Click on CustomBlock;
  • Click on flow;