osgi5——camel整合activiti

activiti是工作流,它可以实现一些请假或者面试等业务上的工作流,也可以实现ESB上一些服务编排,以便适应千变万化的互联网。

下面了解下他怎么和camel实现服务编排

blueprint.xml配置




   
        
            
            
        
    
    
    
        
        
        
        
    
    
    
        
        
    
    
    
    
    
        
        
        
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    	
    
    
    
        
         
        
    
    
         
       
        
    
    


    
    
    	
        
            
            
        

        
            
            
        
		
        
            
            
        
    

并且在src\main\resources\OSGI-INF\activiti\  文件夹下面定义check.bpmn20.xml


             


	
		

		
		 
		
                
                
                
		
		
			
		
		
                
		

		
	


bean1.java

public class Bean1 implements Processor {

    private ProcessEngine processEngine;
    private CamelContext camelContext1;
    public void setProcessEngine(ProcessEngine processEngine) {
        this.processEngine = processEngine;
    }


    public void setCamelContext1(CamelContext camelContext1) {
        this.camelContext1 = camelContext1;
    }
    

    @Override
    public void process(Exchange exchange) throws Exception {
       
        exchange.getOut().setBody("sss");
        
    }

}
pom.xml需要导入依赖

 
            org.activiti
            activiti-camel
            5.16
            provided


            org.activiti
            activiti-osgi
            5.17.0
            provided


当然servicemix需要安装插件


xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.0.0 http://karaf.apache.org/xmlns/features/v1.0.0"
>

 
activiti
 
 





你可能感兴趣的:(osgi学习)