I have seen this question appear already on this forum but I still cannot get around my problem.
I have process with several tasks in. One of the final tasks is a user task that is linked with a form. I am attempting to display a value which is stored as a property on a custom class I have created (and I have already used in other tasks) in the form. the below code is the html for the form including the script
<p>
Where shall the file live in?
</p>
I have looked into my pom file and there is the data dependency, the spin one I have seen people say you need to be able to deal with the different formats of data. But mine is in the “test” scope, so I tried changing this to main and it brought about many other issues.
Any help would be greatly appreciated
<form class="form-horizontal">
<div class="form-group">
<label class="control-label">Vehicles Team?</label>
<div class="controls">
<input type="checkbox"
cam-variable-name="Vehicle"
cam-variable-type="Boolean"/>
</div>
</div>
<div class="form-group">
<label class="control-label">Parts Team?</label>
<div class="controls">
<input type="checkbox"
cam-variable-name="Part"
cam-variable-type="Boolean"
class="form-control"/>
</div>
</div>
<h2>File Name is: {{file.Name}}</h2>
<script cam-script type="text/form-script">
camForm.on('form-loaded', function() {
// tell the form SDK to fetch the variable named 'file'
camForm.variableManager.fetchVariable('file');
});
camForm.on('variables-fetched', function() {
// work with the variable (bind it to the current AngularJS $scope)
$scope.file = camForm.variableManager.variable('file').value;
});
</script>
</form>
Any help would be greatly appreciated
But the value file.Name never displays and then once I try submit I get the cannot submit error as displayed in the title of this issue
Caused by: org.camunda.bpm.engine.ProcessEngineException: ENGINE-17007 Cannot set variable with name file. Java serialization format is prohibited
at org.camunda.bpm.engine.impl.core.CoreLogger.javaSerializationProhibitedException(CoreLogger.java:77)
at org.camunda.bpm.engine.impl.core.variable.scope.AbstractVariableScope.checkJavaSerialization(AbstractVariableScope.java:402)
at org.camunda.bpm.engine.impl.core.variable.scope.AbstractVariableScope.setVariableLocal(AbstractVariableScope.java:348)
at org.camunda.bpm.engine.impl.core.variable.scope.AbstractVariableScope.setVariable(AbstractVariableScope.java:325)
at org.camunda.bpm.engine.impl.core.variable.scope.AbstractVariableScope.setVariable(AbstractVariableScope.java:335)
at org.camunda.bpm.engine.impl.core.variable.scope.AbstractVariableScope.setVariable(AbstractVariableScope.java:310)
at org.camunda.bpm.engine.impl.form.handler.DefaultFormHandler.submitFormVariables(DefaultFormHandler.java:305)
at org.camunda.bpm.engine.impl.form.handler.SubmitFormVariablesInvocation.invoke(SubmitFormVariablesInvocation.java:42)
at org.camunda.bpm.engine.impl.delegate.DelegateInvocation.proceed(DelegateInvocation.java:58)
at org.camunda.bpm.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocationInContext(DefaultDelegateInterceptor.java:92)
at org.camunda.bpm.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocation(DefaultDelegateInterceptor.java:63)
at org.camunda.bpm.engine.impl.form.handler.DelegateFormHandler$2.call(DelegateFormHandler.java:83)
at org.camunda.bpm.engine.impl.form.handler.DelegateFormHandler$2.call(DelegateFormHandler.java:79)
at org.camunda.bpm.engine.impl.form.handler.DelegateFormHandler.doCall(DelegateFormHandler.java:70)
at org.camunda.bpm.engine.impl.form.handler.DelegateFormHandler$1.call(DelegateFormHandler.java:58)
at org.camunda.bpm.engine.impl.context.ProcessApplicationClassloaderInterceptor.call(ProcessApplicationClassloaderInterceptor.java:48)
at org.camunda.bpm.application.AbstractProcessApplication.execute(AbstractProcessApplication.java:121)
at org.camunda.bpm.application.AbstractProcessApplication.execute(AbstractProcessApplication.java:132)
at org.camunda.bpm.engine.impl.context.Context.executeWithinProcessApplication(Context.java:206)
at org.camunda.bpm.engine.impl.context.Context.executeWithinProcessApplication(Context.java:193)
at org.camunda.bpm.engine.impl.form.handler.DelegateFormHandler.performContextSwitch(DelegateFormHandler.java:56)
at org.camunda.bpm.engine.impl.form.handler.DelegateFormHandler.submitFormVariables(DelegateFormHandler.java:79)
at org.camunda.bpm.engine.impl.cmd.SubmitTaskFormCmd.execute(SubmitTaskFormCmd.java:75)
at org.camunda.bpm.engine.impl.cmd.SubmitTaskFormCmd.execute(SubmitTaskFormCmd.java:43)
at org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:28)
at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:110)
at org.camunda.bpm.engine.impl.interceptor.ProcessApplicationContextInterceptor.execute(ProcessApplicationContextInterceptor.java:70)
at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
at org.camunda.bpm.engine.impl.FormServiceImpl.submitTaskForm(FormServiceImpl.java:91)
at org.camunda.bpm.engine.rest.sub.task.impl.TaskResourceImpl.submit(TaskResourceImpl.java:148)
… 62 more
Which file does this go in exactly?
The only configuration file i have touched is the pom file, with all the dependencies. But it doesn’t seem like that should go in there.
@aravindhrs I have set this in the processes.xml file, I have ran a mavern clean, then mavern install and I am still getting the same error and I am unable to show the value from the custom class in the form.
I have set variables, recieved variables in previous java delegate methods.
But when trying to set this variable from the customer class in javaScript I keep getting this error
@aravindhrs below is everything within the form at the moment
<p>
Where shall the file live in?
</p>
<form class="form-horizontal">
<div class="form-group">
<label class="control-label">Vehicles Team?</label>
<div class="controls">
<input type="checkbox"
cam-variable-name="Vehicle"
cam-variable-type="Boolean"/>
</div>
</div>
<div class="form-group">
<label class="control-label">Parts Team?</label>
<div class="controls">
<input type="checkbox"
cam-variable-name="Part"
cam-variable-type="Boolean"
class="form-control"/>
</div>
</div>
<h2>File Name is: {{file.Name}}</h2>
<script cam-script type="text/form-script">
camForm.on('form-loaded', function() {
// tell the form SDK to fetch the variable named 'file'
camForm.variableManager.fetchVariable('file');
});
camForm.on('variables-fetched', function() {
// work with the variable (bind it to the current AngularJS $scope)
$scope.file = camForm.variableManager.variable('file').value;
});
</script>
</form>
@EthanVenencia, this javaSerializationFormatEnabled is required when you store custom objects in engine. But your use case is file already exists and you’re trying to download or list the files in user task forms. For downloading a file, refer this post:
@aravindhrs Hello, I am experiencing the same issue described here, after migrating to 7.15, we get this error after submitting our forms on the Camunda Tasklist because there is a hasmap variable not deserialized, result of evaluating a dmn table (single result). I already added the property and even added the spin dependency.
Could you please help me to find a solution for this?
Thanks!
@Alejandra if you provide minimal github project for this issue, i can take a look into it. It will be quicker to provide solution rather than asking every details about setup.
Thanks for the reply. I already saw the example, but i am not using this variable, i just required to load all the variables and it fails after submitting the form.