cancel
Showing results for 
Search instead for 
Did you mean: 

Is activiti:form attribute support any text value?

limcheekin
Champ on-the-rise
Champ on-the-rise
Hi,

In Activiti's User Guide mentioned that "you could fill in the form attribute with any text value that you want if you are not using Activiti Explorer." at http://activiti.org/userguide/index.html#taskForms. Is this statement still valid?

For your information, this feature is important to create sample application for Grails Activiti Plugin which based on Vacation Request process. You may find out more about the discussion of sample application creation at http://groups.google.com/group/grails-activiti-plugin/browse_thread/thread/fbacae1410447321

Below is amended code snippet in VacationRequest.bpmn20.xml:

  <process id="vacationRequest" name="Vacation request">
    <startEvent id="request" activiti:form="vacationRequest/create" />

When I run the integration test cases, I see the following exception:

form 'vacationRequest/create' not available in org.activiti.impl.repository.DeploymentImpl@f64b73

org.activiti.ActivitiException: form 'vacationRequest/create' not available in org.activiti.impl.repository.DeploymentImpl@f64b73
at org.activiti.impl.cmd.GetFormCmd.getFormTemplateString(GetFormCmd.java:98)
at org.activiti.impl.cmd.GetFormCmd.execute(GetFormCmd.java:86)
at org.activiti.impl.interceptor.DefaultCommandExecutor$InternalCommandInterceptorChain.execute(DefaultCommandExecutor.java:99)
at org.activiti.impl.interceptor.DefaultCommandExecutor$InternalCommandContextCreator.invoke(DefaultCommandExecutor.java:124)
at org.activiti.impl.interceptor.DefaultCommandExecutor$InternalCommandInterceptorChain.execute(DefaultCommandExecutor.java:92)
at org.activiti.impl.interceptor.DefaultCommandExecutor.execute(DefaultCommandExecutor.java:54)
at org.activiti.impl.ProcessServiceImpl.getStartFormByKey(ProcessServiceImpl.java:168)
at com.vobject.VacationRequestService.getStartForm(VacationRequestService.groovy:9)
at com.vobject.VacationRequestService$$FastClassByCGLIB$$4c496669.invoke()
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
at com.vobject.VacationRequestService$$EnhancerByCGLIB$$7a2911e4.getStartForm()
at com.vobject.VacationRequestController$_closure1.doCall(VacationRequestController.groovy:8)
at com.vobject.VacationRequestController$_closure1.doCall(VacationRequestController.groovy)
at com.vobject.VacationRequestControllerTests.testStartProcessRedirectedUrl(VacationRequestControllerTests.groovy:33)

Please advice.
8 REPLIES 8

tombaeyens
Champ in-the-making
Champ in-the-making
did you include the form resource in the process archive?  meaning, the thing you deployed, did it contain both the process resource *and* the form resource in a zip format?  …and was the resource named  vacationRequest/create or did it have some extension in the deployment?

you also might check with probe the contents of the db to see what is actually in it.

limcheekin
Champ on-the-rise
Champ on-the-rise
Hi Tom,

There is no physical form resource, I used the activiti:form attribute to indicate where the form (GSP) is located by URI, as I am not using Activiti Explorer.

Is there anyway I can disable the form resource checking?

Alternatively, do you have better suggestion on Activiti and GSP form integration?

Thank you.

limcheekin
Champ on-the-rise
Champ on-the-rise
Hi,

May I know is there any updates? Your comments and advices is very important to us.

Thank you.

Warmest regards,
Chee Kin


Hi Tom,

There is no physical form resource, I used the activiti:form attribute to indicate where the form (GSP) is located by URI, as I am not using Activiti Explorer.

Is there anyway I can disable the form resource checking?

Alternatively, do you have better suggestion on Activiti and GSP form integration?

Thank you.

tombaeyens
Champ in-the-making
Champ in-the-making
i now looked at the stacktrace a little closer.  the problem is that you use the method ProcessServiceImpl.getStartFormByKey.  That method includes the rendering.

instead you should get the Task object and get the form attribute from there.  currently the form attribute is not yet exposed, but it should.   please add a jira issue to expose the task form property on the task interface.

in the meantime, a workaround is that you can just cast to a TaskImpl and then access the getter method on the form property.

limcheekin
Champ on-the-rise
Champ on-the-rise
Thanks. I created a jira issue at http://jira.codehaus.org/browse/ACT-82.

Regards,
Chee Kin

limcheekin
Champ on-the-rise
Champ on-the-rise
Thanks. I created a jira issue at http://jira.codehaus.org/browse/ACT-82.

Hi Tom,

Any plan to resolve this issue in beta1?

Regards,
Chee Kin

tombaeyens
Champ in-the-making
Champ in-the-making
started on it

limcheekin
Champ on-the-rise
Champ on-the-rise
Great! Thanks.