04-19-2017 12:09 PM
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 .
04-19-2017 01:50 PM
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
04-20-2017 03:45 AM
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.
Explore our Alfresco products with the links below. Use labels to filter content by product module.