Service task not deployed

hi all,
I’m trying to deploy my application that contains Java classes that will be used in BPMN as service tasks.
after I build the project, I tried to deploy the war file to Tomcat server, the process does not appear in the cockpit.
please help me to figure out the issue.

I deployed to standalone camunda application to Tomcat. following the topic:

already connected to the SQL server database and it is working fine.

Java class that contains simple print function:
Terminatetxt.txt (904 Bytes)

<?xml version="1.0" encoding="UTF-8"?>
<process-application
  xmlns="http://www.camunda.org/schema/1.0/ProcessApplication"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

  <process-archive>
    <process-engine>default</process-engine>
    <resource>process.bpmn</resource>
    <properties>
      <property name="isDeleteUponUndeploy">false</property>
      <property name="isScanForProcessDefinitions">true</property>
    </properties>
  </process-archive>

</process-application>

can you upload your process and any errors that appear in the console

process.bpmn (43.7 KB)

18-Dec-2019 17:55:18.896 INFO [Catalina-utility-2] org.camunda.commons.logging.BaseLogger.logInfo ENGINE-08023 Deployment summary for process archive ‘hlts’:

    process.bpmn

log on tomcat:
18-Dec-2019 17:55:19.037 INFO [Catalina-utility-2] > org.camunda.commons.logging.BaseLogger.logInfo ENGINE-07021 ProcessApplication ‘hlts’ registered for DB deployments [6879ec80-21a6-11ea-990d-8cdcd4574b33]. Will execute process definitions

            FacilitiesAccProcess01[version: 1, id: FacilitiesAccProcess01:1:68884462-21a6-11ea-990d-8cdcd4574b33]
    Deployment does not provide any case definitions.

check the the table : [ACT_RE_PROCDEF]

Any suggested solutions?

Hi @ahmed,

Standalone web application distribution is a self-contained web application and includes an embedded process engine which is configured using the Spring Framework and will automatically start when the application is deployed.

And as you are looking to deploy your business process as a java process application war then you should deploy it to a container with a shared engine or it should be a standalone application itself deployed to vanilla distribution of a supported application server.

I mean try downloading the full distribution instead, then deploy your process application war
https://docs.camunda.org/manual/latest/introduction/downloading-camunda/#full-distribution

Have a look at below docs
https://docs.camunda.org/get-started/java-process-app/

Below is an overview of the most common deployment scenarios
https://docs.camunda.org/manual/7.7/introduction/architecture/

1 Like

I already tried the approach you have mentioned with simple service task.
process.bpmn (3.6 KB)

public class AcceptInvoice implements JavaDelegate {


    @Override
    public void execute(DelegateExecution execution) throws Exception {
        execution.setVariable("Amount",5000);
        System.out.println("\n **************** \n Service Task is done! ..\n **************** \n");
    }
}

kindly check the log:

19-Dec-2019 11:14:34.642 SEVERE [http-nio-8080-exec-4] org.camunda.commons.logging.BaseLogger.logError ENGINE-16004 Exception while closing command context: ENGINE-09008 Exception while instantiating class 'elm.art.AcceptInvoice': ENGINE-09017 Cannot load class 'elm.art.AcceptInvoice': elm.art.AcceptInvoice
        org.camunda.bpm.engine.ProcessEngineException: ENGINE-09008 Exception while instantiating class 'elm.art.AcceptInvoice': ENGINE-09017 Cannot load class 'elm.art.AcceptInvoice': elm.art.AcceptInvoice
                at org.camunda.bpm.engine.impl.util.EngineUtilLogger.exceptionWhileInstantiatingClass(EngineUtilLogger.java:81)
                at org.camunda.bpm.engine.impl.util.ClassDelegateUtil.instantiateDelegate(ClassDelegateUtil.java:53)
                at org.camunda.bpm.engine.impl.bpmn.behavior.ClassDelegateActivityBehavior.getActivityBehaviorInstance(ClassDelegateActivityBehavior.java:111)
                at org.camunda.bpm.engine.impl.bpmn.behavior.ClassDelegateActivityBehavior$1.call(ClassDelegateActivityBehavior.java:67)
                at org.camunda.bpm.engine.impl.bpmn.behavior.ClassDelegateActivityBehavior$1.call(ClassDelegateActivityBehavior.java:64)
                at org.camunda.bpm.engine.impl.bpmn.behavior.AbstractBpmnActivityBehavior.executeWithErrorPropagation(AbstractBpmnActivityBehavior.java:110)
                at org.camunda.bpm.engine.impl.bpmn.behavior.ClassDelegateActivityBehavior.execute(ClassDelegateActivityBehavior.java:64)
                at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityExecute$2.callback(PvmAtomicOperationActivityExecute.java:60)
                at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityExecute$2.callback(PvmAtomicOperationActivityExecute.java:49)
                at org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl.continueIfExecutionDoesNotAffectNextOperation(PvmExecutionImpl.java:1988)
                at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityExecute.execute(PvmAtomicOperationActivityExecute.java:41)
                at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityExecute.execute(PvmAtomicOperationActivityExecute.java:30)
                at org.camunda.bpm.engine.impl.interceptor.AtomicOperationInvocation.execute(AtomicOperationInvocation.java:95)
                at org.camunda.bpm.engine.impl.interceptor.CommandInvocationContext.invokeNext(CommandInvocationContext.java:127)
                at org.camunda.bpm.engine.impl.interceptor.CommandInvocationContext.performNext(CommandInvocationContext.java:107)
                at org.camunda.bpm.engine.impl.interceptor.CommandInvocationContext.performOperation(CommandInvocationContext.java:82)
                at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:640)
                at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:614)
                at org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl$6.callback(PvmExecutionImpl.java:1927)
                at org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl$6.callback(PvmExecutionImpl.java:1924)
                at org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl.continueExecutionIfNotCanceled(PvmExecutionImpl.java:1994)
                at org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl.dispatchDelayedEventsAndPerformOperation(PvmExecutionImpl.java:1943)
                at org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl.dispatchDelayedEventsAndPerformOperation(PvmExecutionImpl.java:1924)
                at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationTransitionNotifyListenerStart.eventNotificationsCompleted(PvmAtomicOperationTransitionNotifyListenerStart.java:60)

Hi @ahmed,

Can you please extract your generated war file and make sure that your class is there under the correct path

WEB-INF\classes\elm\art\AcceptInvoice.class

1 Like

@hassang thank so much for your help. its working.