Sumit Start Process takes 2 to 3 secs

Hi,
I want the start process to be submitted automatically.

I tried 2 options:

I found in the Google Groups.

<form role="form" name="emptyForm">
     <script cam-script type="text/form-script">
        camForm.on('form-loaded', function() {
            $scope.complete();
        });
    </script>
</form>

Thanks to Hassan G.

<form role="form" name="emptyForm">
     <script cam-script type="text/form-script">
        camForm.on('form-loaded', function() {
            camForm.submit(function (err) {
                $scope.complete();
            });
        });
    </script>
</form>

Correct is:

<form role="form" name="emptyForm">
     <script cam-script type="text/form-script">
        $scope.complete();
    </script>
</form>

All options work but the submit takes 2 to 3 secs which is not acceptable. Is there a way to improve the performance or is there another way to do this?
Thank you

Hi,

could you find out what takes so long? I doubt it’s the Javascript execution; I think it’s the network. You can find information about the requests and their timing in the development console of your browser.

Cheers
Sebastian

Hi Sebastian,
thank you. I hope that you can find out what goes wrong here.
I have the camunda server locally and I am the only one accessing it via browser from my local machine. Here is what Firebug analyses when submitting.

Okay, that confirms my belief that it’s the actual request that takes a long time. What does you process look like? If I am not mistaken, the process engine executes your process until the next wait state before answering the request, so it can return an exception message in case anything goes wrong. For example: If you have service task after the start event that takes a long time to finish, you have to wait for it to finish before getting the response from the process engine. You can read more about it in the documentation.

Could this be the case here?

Cheers
Sebastian

2 Likes

Hi Sebastian,
yes. I have a service task after the start process that takes some time. After reading the documentation of Asynchronous Continuations I ticked the Asynchronous Before checkbox of my service task and now it is working as expected.

Thank you for your help.