Track the process like JBPM4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2011 04:26 AM
I want to track the process like JBPM4.
JBPM4:
// get ID from jsp pageString id = ActionUtil.getParameter("piId"); ProcessEngine pe = Configuration.getProcessEngine();RepositoryService ps = pe.getRepositoryService();ExecutionService es = pe.getExecutionService(); // query the process instanceProcessInstance pi = es.createProcessInstanceQuery().processInstanceId(id).uniqueResult();String pdId = pi.getProcessDefinitionId();Set<String> names = pi.findActiveActivityNames(); // get the coordinate of acitivityActivityCoordinates ac = ps.getActivityCoordinates(pdId,names.iterator().next());System.out.println(ac.getX() +"\t" +ac.getY());
Activiti5:[something I try] :cry:
ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery() .processDefinitionKey("leave2") .list() .get(0); ProcessDefinitionImpl pdImpl = (ProcessDefinitionImpl) processDefinition;/** * ??? ProcessDefinitionImpl.getInitial is null */ActivityImpl actImpl = pdImpl.getInitial();System.out.println(actImpl.getX() +"\t" +actImpl.getY()); ExecutionEntity execution = (ExecutionEntity) runtimeService.createExecutionQuery() .executionId("101") .singleResult();/** * ??? execution.getActivity() is null */actImpl = execution.getActivity();System.out.println(actImpl.getX() +"\t" +actImpl.getY());
Can you show me the way? Thanks very much.
- Labels:
-
Archive
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2011 04:35 AM
ReadOnlyProcessDefinition def = ((RepositoryServiceImpl)repoService).getDeployedProcessDefinition(processDefinitionId);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2011 04:37 AM
http://www.jorambarrez.be/blog/2011/02/01/screencast-proc-inst-visual/
or org.activiti.engine.impl.bpmn.diagram.ProcessDiagramCanvas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2011 07:08 AM
The ProcessDefinition returned by the query had no ActivityImpl initialized, use this (not exposed on public API) instead:
ReadOnlyProcessDefinition def = ((RepositoryServiceImpl)repoService).getDeployedProcessDefinition(processDefinitionId);
I try these code. But I found all of them return the value is -1.
What's the matter? Why all coordinates is -1?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2011 07:17 AM
// Graphical information
protected int x = -1;
protected int y = -1;
protected int width = -1;
protected int height = -1;
this is init value, but I want to get the coordinate the same as XXX.activiti.
Thanks again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2011 08:30 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2011 04:38 AM
These values are filled in during parsing, IF your process has Diagram interchange information (eg. when using Activiti Modeler or Designer)
Hi, jbarrez.
I haven't got your point. Can you explain more particularer?
Show me some java CODE.
Thanks a lot.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2011 05:22 AM
Your process must contain informations such as <bpmndi:BPMNShape … etc. Those will automatically be produced by the modeler and designer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2011 07:29 AM
I design my process by eclipse Designer and not signavio.
http://activiti.org/userguide/index.html#generatingProcessDiagram
In case no image is provided in the deployment, as described in the previous section, the Activiti engine will generate a diagram image when the process definition contains the necessary 'diagram interchange' information. This is the case when using the Activiti Modeler (and in the near future when using the Activiti Eclipse Designer).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2011 04:46 AM
Could you please upload your process so we can take a look?