Integrate JSF and SPRING with ACTIVITI

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
ilyass_act
Active Member

Integrate JSF and SPRING with ACTIVITI

Hi i'm working on JEE project and i have to integrate activiti Engine , So i need to create the Model from java code and bind it to my JSF pages . 

- Is there a way to do that 

- Is there any helpful ressources where i can find these documented .

2 Replies
gdharley
Intermediate

Re: Integrate JSF and SPRING with ACTIVITI

No sure I understand the question.

What "model" do you need to create from Java code?

What sort of integration are you looking to do? (loosely coupled, tightly coupled, fully embedded), there are examples available of all of these patterns.

Have you checked out the book (Activiti in Action)?

Thanks,

Greg

ilyass_act
Active Member

Re: Integrate JSF  and SPRING with ACTIVITI

the project is already done with spring so i already have my JSF pages , no i have to integrate Activiti Engine i started by creating a simple process to bind to my JSF pages :

1st : i created method to retrieve workflow object :

Example :

protected  EndEvent createEndEvent() {
EndEvent endEvent = new EndEvent();
endEvent.setId("end");
return endEvent;
}

...

2nd : 


ProcessEngine processEngine = ProcessEngineConfiguration.createStandaloneInMemProcessEngineConfiguration()
.setDatabaseSchemaUpdate(ProcessEngineConfiguration.DB_SCHEMA_UPDATE_TRUE)
.setJdbcUrl("jdbc:h2:mem:activiti;DB_CLOSE_DELAY=1000")
.buildProcessEngine();

RuntimeService runtimeService = processEngine.getRuntimeService();
RepositoryService repositoryService = processEngine.getRepositoryService();
TaskService taskService = processEngine.getTaskService();

//3 rd Build up the model  :

BpmnModel model = new BpmnModel();
org.activiti.bpmn.model.Process process = new org.activiti.bpmn.model.Process();
model.addProcess(process);
process.setId("my-process");

process.addFlowElement(createStartEvent());
process.addFlowElement(createUserTask("task1", "First task", "XXXX"));

i generated the graphical information, deployed the process to engine , startred the process instance and generated the process diagram.png and .bpmn20.xml .

So now i need to bind this process to my JSF pages.