Activiti: how can I get x, y, width, height

Created on 6 Nov 2018  路  3Comments  路  Source: Activiti/Activiti

ActivityImpl activity = processDefinitionEntity.findActivity(activityId);
Map<String, Object> map = new HashMap<String, Object>();
map.put("x", activity.getX());
map.put("y", activity.getY());
map.put("width", activity.getWidth());
map.put("height", activity.getHeight());
in 5.x , I can get these properties;
but 6.x , How can I get these?
please help me!

question

Most helpful comment

@salaboy thank you very much!

All 3 comments

@zx445146042zx You now need to get the BpmnModel and then check the GraphicInfo -> public GraphicInfo getGraphicInfo(String key) which gives you the coordinates:

public class GraphicInfo {

  protected double x;
  protected double y;
  protected double height;
  protected double width;

Check the test called: BpmnParseTest -> https://github.com/Activiti/Activiti/blob/develop/activiti-engine/src/test/java/org/activiti/engine/test/bpmn/parse/BpmnParseTest.java#L120

@salaboy thank you very much!

@zx445146042zx you are welcome :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ryandawsonuk picture ryandawsonuk  路  6Comments

daisuke-yoshimoto picture daisuke-yoshimoto  路  8Comments

erdemedeiros picture erdemedeiros  路  8Comments

rishisinghal picture rishisinghal  路  7Comments

leiyanfamily picture leiyanfamily  路  3Comments