Activiti

Make task form rendering consistent in API

Details

  • Type: Improvement Improvement
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 5.0.beta2
  • Component/s: Engine
  • Labels:
    None
  • Number of attachments :
    0

Description

Group all service rendering methods in the TaskService and indicate that rendering is done

RepositoryService.getStartFormByKey --> Object TaskService.getRenderedStartFormByKey(String processDefinitionKey)
RepositoryService.getStartFormById --> Object TaskService.getRenderedStartFormById(String processDefinitionId)
TaskService.getTaskForm(String taskId) --> Object TaskService.getRenderedTaskForm(String taskId)

For external rendering, following methods can be used:
Task: String getFormResourceKey();
ProcessDefinition: String getStartFormResourceKey(); (TODO add javadocs)
ProcessDefinition: String getDeploymentId();
RepositoryService: InputStream getResourceAsStream(String deploymentId, String resourceName);

(Extracting a pluggable FormRenderingSession in the ProcessEngineConfiguration is left for later)

Issue Links

Activity

Hide
Erik Winlöf added a comment -

To be honest I have no other answer than that it probably felt quite natural to put them there.
Possibly because it might have been driven by a discussion that started in the REST API where we have urls like:
/process-definition/{processDefinitionId}/form
/task/{taskID}/form

...which kind of indicates that the form methods "live" inside the "Process(Definition)Service" and "TaskService"?

Now, if the start form is aquired from the "RepositoryService" nowadays I guess this doesn't feel as natural anymore, even a bit confusing I guess. So moving the methods into a FormService might make more sense.

Cheers,
Erik

Show
Erik Winlöf added a comment - To be honest I have no other answer than that it probably felt quite natural to put them there. Possibly because it might have been driven by a discussion that started in the REST API where we have urls like: /process-definition/{processDefinitionId}/form /task/{taskID}/form ...which kind of indicates that the form methods "live" inside the "Process(Definition)Service" and "TaskService"? Now, if the start form is aquired from the "RepositoryService" nowadays I guess this doesn't feel as natural anymore, even a bit confusing I guess. So moving the methods into a FormService might make more sense. Cheers, Erik

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: