Activiti

Show process definition diagram

Details

  • Type: Improvement Improvement
  • Status: Resolved Resolved
  • Priority: Critical Critical
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 5.1
  • Component/s: Explorer
  • Labels:
    None
  • Number of attachments :
    0

Description

In the list of process definitions, people should be able to navigate to the diagram.

In Explorer in the list of processes, a new action should be added in the last column called "Show diagram". Ideally the diagram should be shown as a popup.

Relevant APIs:
ReadOnlyProcessDefinition processDefinition = ((RepositoryServiceImpl)repositoryService).getDeployedProcessDefinition(processDefinitionId);
String resourceName = processDefinition.getDiagramResourceName();
String deploymentId = processDefinition.getDeploymentId();
InputStream repositoryService.getResourceAsStream(String deploymentId, String resourceName);

In a later release (we'll put that in a separate jira issue) people should be able to navigate to the diagram that indicates the current position of that task in the process diagram.

Issue Links

Activity

Hide
David Webster added a comment -

This will be done using the MOVI api and will assume that the Signavio edit will be patched to produce the required PNG file in the process package.

Show
David Webster added a comment - This will be done using the MOVI api and will assume that the Signavio edit will be patched to produce the required PNG file in the process package.
Hide
Yury Horbach added a comment -

I hope you will also enhance the REST API to allow the client using that API to be able to get the PNG too...

Show
Yury Horbach added a comment - I hope you will also enhance the REST API to allow the client using that API to be able to get the PNG too...
Hide
David Webster added a comment -

There's no plan to extend the REST API to cover that yet, however the PNG is available via a simple URL, so the lack of API shouldn't prevent you grabbing the image.

The URL is:
http://{Activiti-modeler URL}/p/model/{path to process xml (replace '/' w/ ';')}/png

E.g.
http://localhost:8080/activiti-modeler/p/model/root-directory;sample%20process.oryx.xml/png
or
http://localhost:8080/activiti-modeler/p/model/;Users;davidwebster;Activiti;Releases;activiti-5.0.alpha4;apps;activiti-model-repository;sample%20process.oryx.xml/png

Show
David Webster added a comment - There's no plan to extend the REST API to cover that yet, however the PNG is available via a simple URL, so the lack of API shouldn't prevent you grabbing the image. The URL is: http://{Activiti-modeler URL}/p/model/{path to process xml (replace '/' w/ ';')}/png E.g. http://localhost:8080/activiti-modeler/p/model/root-directory;sample%20process.oryx.xml/png or http://localhost:8080/activiti-modeler/p/model/;Users;davidwebster;Activiti;Releases;activiti-5.0.alpha4;apps;activiti-model-repository;sample%20process.oryx.xml/png
Hide
David Webster added a comment -

This feature is on hold pending issues with the MOVI api

Show
David Webster added a comment - This feature is on hold pending issues with the MOVI api
Hide
Tom Baeyens added a comment -

Hi Tom,

I've just had a look, but both the SVG and the Mashup APIs seems to have the same problem integrating with Activiti Explorer that the MOVI API did: the requirement for a URL to the model, rather than just a XML/BPML input (i.e. the modeler does the hard work on the processing of the model and the API's just call it). We would therefore still need to work around the problems I raised with the MOVI API:
1) The requirement for the Signavio Modeler install.
2) An established relationship between the location of the Deployed Resource (as stored in the DB) and the model URL (as stored in the Signavio Modeler)

It seems unlikely that any JS API is going to get around issue one, but issue two would perhaps be best resolved by patching the modeler to allow for a remote BPML file to be loaded, thus preventing the need to maintain two different stores of the model XML resources.

Additionally, and assuming the above issues are resolved, if we use this new SVG API, we would lose the ability to support users with Internet Explorer, so my preference would be to use the MOVI API - perhaps through the Mashup API, to produce a PNG output, which can be displayed easier and in more browsers.

David.

Show
Tom Baeyens added a comment - Hi Tom, I've just had a look, but both the SVG and the Mashup APIs seems to have the same problem integrating with Activiti Explorer that the MOVI API did: the requirement for a URL to the model, rather than just a XML/BPML input (i.e. the modeler does the hard work on the processing of the model and the API's just call it). We would therefore still need to work around the problems I raised with the MOVI API: 1) The requirement for the Signavio Modeler install. 2) An established relationship between the location of the Deployed Resource (as stored in the DB) and the model URL (as stored in the Signavio Modeler) It seems unlikely that any JS API is going to get around issue one, but issue two would perhaps be best resolved by patching the modeler to allow for a remote BPML file to be loaded, thus preventing the need to maintain two different stores of the model XML resources. Additionally, and assuming the above issues are resolved, if we use this new SVG API, we would lose the ability to support users with Internet Explorer, so my preference would be to use the MOVI API - perhaps through the Mashup API, to produce a PNG output, which can be displayed easier and in more browsers. David.
Hide
Tom Baeyens added a comment -

We'll switch strategy from depending on the modeler for the rendering to depending on an image in the resources.

We still can use the modeler to render the image, but that will be optional and done during deployment, rather then at process diagram rendering time.

In a first stage, a property will be added to the ProcessDefinition (ACT-340) and supplying that property value into RepositoryService.getResourceAsStream(...) will give the process diagram.

Later, also the activity coordinates will be exposed through the API and once that is done, the UI can then be updated to indicate the current activity.

Show
Tom Baeyens added a comment - We'll switch strategy from depending on the modeler for the rendering to depending on an image in the resources. We still can use the modeler to render the image, but that will be optional and done during deployment, rather then at process diagram rendering time. In a first stage, a property will be added to the ProcessDefinition (ACT-340) and supplying that property value into RepositoryService.getResourceAsStream(...) will give the process diagram. Later, also the activity coordinates will be exposed through the API and once that is done, the UI can then be updated to indicate the current activity.
Hide
Tom Baeyens added a comment -

We've discussed this issue with Erik and he's going to take it.

Show
Tom Baeyens added a comment - We've discussed this issue with Erik and he's going to take it.
Hide
Tom Baeyens added a comment -

(From ACT-340) Here's how to access the property:

ReadOnlyProcessDefinition processDefinition = ((RepositoryServiceImpl)repositoryService).getDeployedProcessDefinition(processDefinitionId);
String diagramResourceName = processDefinition.getDiagramResourceName();

Frederik, could you review the Rest call for this on monday with me?

Show
Tom Baeyens added a comment - (From ACT-340) Here's how to access the property: ReadOnlyProcessDefinition processDefinition = ((RepositoryServiceImpl)repositoryService).getDeployedProcessDefinition(processDefinitionId); String diagramResourceName = processDefinition.getDiagramResourceName(); Frederik, could you review the Rest call for this on monday with me?
Hide
Tom Baeyens added a comment -

postponed

Show
Tom Baeyens added a comment - postponed
Hide
Erik Winlöf added a comment - - edited

Ok ill do this on fore the 5.1 release

Show
Erik Winlöf added a comment - - edited Ok ill do this on fore the 5.1 release
Hide
Erik Winlöf added a comment -

First version committed with revision 1666 (waiting for icons from linton to fisnish the task)

Show
Erik Winlöf added a comment - First version committed with revision 1666 (waiting for icons from linton to fisnish the task)
Hide
Erik Winlöf added a comment -

Fixed on trunk since revision 1689

Show
Erik Winlöf added a comment - Fixed on trunk since revision 1689

People

Vote (2)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved:

Time Tracking

Estimated:
Not Specified
Original Estimate - Not Specified
Remaining:
2d
Time Spent - 1 week, 3 days, 1 minute Remaining Estimate - 2 days
Logged:
1w 3d 1m
Time Spent - 1 week, 3 days, 1 minute Remaining Estimate - 2 days