09-24-2010 08:18 AM
09-25-2010 06:05 AM
09-26-2010 08:38 AM
External rendering of forms
Above we showed the build-in task form rendering. But the API also allows for you to perform your own task form rendering outside of the Activiti Engine. These steps explain the hooks that you can use to render your task forms yourself.
You can just stick any form template resource inside the business archives that you deploy (in case you want to store them versioned with the process). It will be available as a resource in the deployment. You can use the String ProcessDefinition.getDeploymentId() and InputStream RepositoryService.getResourceAsStream(String deploymentId, String resourceName); to obtain the file that you included in the deployments. That could be your form template definition file.
Btw, you can use this capability of accessing the deployment resources beyond task forms for any other purposes as well.
The attribute <userTask activiti:form="…" is exposed by the API through String Task.getFormResourceKey(). You could for instance store a generic key in the form attribute and apply an algorithm or transformation to get to the actual template that needs to be used. This might be handy when you want to render different forms for different UI technologies like e.g. one form for usage in a web app of normal screen size, one form for mobile phone's small screens and maybe even a template for a IM form or an email form.
09-26-2010 10:27 AM
09-27-2010 05:43 AM
09-29-2010 07:57 AM
09-30-2010 06:23 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.