Flowable dynamic value in http task not working 6.8.0

When Iam using flowable version 6.7.2 it is working perfectly fine with below scenario
my delegate class Iam setting a service url like below execution.setVaraible(“url”, http://localhost/restApi) and in my http task in flowable ui Iam using request url as
<flowable:field name=“requestUrl”>

      <flowable:expression><![CDATA[${url}]]></flowable:expression>

    </flowable:field>

But when I upgraded the version to 6.8.0 Iam getting null value in my http task

Hey @Venkata,

Can you please provide a minimal reproducible example showing this problem? I do not see a reason why this wouldn’t work.

Cheers,
Filip

Thanks @filiphr for your response.

In my delegate class, iam using execution.setVaraible(“url”, http://localhost/restApi);
in my flowable using below in process work flow.

  <serviceTask id="assignuser" name="assignuser" flowable:parallelInSameTransaction="true" flowable:type="http">
      <extensionElements>
        <flowable:field name="requestMethod">
          <flowable:string><![CDATA[GET]]></flowable:string>
        </flowable:field>
        <flowable:field name="requestUrl">
          <flowable:expression><![CDATA[${url}]]></flowable:expression>
        </flowable:field>
        <flowable:field name="requestHeaders">
          <flowable:string><![CDATA[content-type: application/json]]></flowable:string>
        </flowable:field>
      </extensionElements>
    </serviceTask>

This is working with version 6.7.2 but not with 6.8.0. Getting NPE when iam using the ${url}.

Can you please share your entire stacktrace that you are getting? The XML snippet you shared looks fine.

Cheers,
Filip

Here is the error details @filiphr

Error while closing command context.

java.lang.NullPointerException: null
at java.util.concurrent.CompletableFuture.screenExecutor(Unknown Source) ~[na:1.8.0_321]
at java.util.concurrent.CompletableFuture.supplyAsync(Unknown Source) ~[na:1.8.0_321]
at org.flowable.common.engine.impl.async.DefaultAsyncTaskExecutor.submit(DefaultAsyncTaskExecutor.java:89) ~[flowable-engine-common-6.8.0.jar!/:6.8.0]
at org.flowable.common.engine.impl.async.DefaultAsyncTaskInvoker.submit(DefaultAsyncTaskInvoker.java:40) ~[flowable-engine-common-6.8.0.jar!/:6.8.0]
at org.flowable.http.common.impl.BaseHttpActivityDelegate.prepareAndExecuteRequest(BaseHttpActivityDelegate.java:223) ~[flowable-http-common-6.8.0.jar!/:6.8.0]
at org.flowable.engine.impl.bpmn.http.DefaultBpmnHttpActivityDelegate.execute(DefaultBpmnHttpActivityDelegate.java:111) ~[flowable-engine-6.8.0.jar!/:6.8.0]
at org.flowable.engine.impl.delegate.invocation.FutureJavaDelegateInvocation.invoke(FutureJavaDelegateInvocation.java:38) ~[flowable-engine-6.8.0.jar!/:6.8.0]
at org.flowable.engine.impl.delegate.invocation.DelegateInvocation.proceed(DelegateInvocation.java:32) ~[flowable-engine-6.8.0.jar!/:6.8.0]
at org.flowable.engine.impl.delegate.invocation.DefaultDelegateInterceptor.handleInvocation(DefaultDelegateInterceptor.java:26) ~[flowable-engine-6.8.0.jar!/:6.8.0]
at org.flowable.engine.impl.bpmn.behavior.ServiceTaskFutureJavaDelegateActivityBehavior.execute(ServiceTaskFutureJavaDelegateActivityBehavior.java:120) ~[flowable-engine-6.8.0.jar!/:6.8.0]
at org.flowable.engine.impl.bpmn.helper.ClassDelegate.execute(ClassDelegate.java:194) ~[flowable-engine-6.8.0.jar!/:6.8.0]
at org.flowable.engine.impl.agenda.ContinueProcessOperation.executeActivityBehavior(ContinueProcessOperation.java:298) ~[flowable-engine-6.8.0.jar!/:6.8.0]
at org.flowable.engine.impl.agenda.ContinueProcessOperation.executeSynchronous(ContinueProcessOperation.java:175) ~[flowable-engine-6.8.0.jar!/:6.8.0]
at org.flowable.engine.impl.agenda.ContinueProcessOperation.continueThroughFlowNode(ContinueProcessOperation.java:125) ~[flowable-engine-6.8.0.jar!/:6.8.0]
at org.flowable.engine.impl.agenda.ContinueProcessOperation.run(ContinueProcessOperation.java:88) ~[flowable-engine-6.8.0.jar!/:6.8.0]
at org.flowable.common.engine.impl.AbstractEngineConfiguration.lambda$new$0(AbstractEngineConfiguration.java:195) ~[flowable-engine-common-6.8.0.jar!/:6.8.0]
at org.flowable.engine.impl.interceptor.CommandInvoker.executeOperation(CommandInvoker.java:130) ~[flowable-engine-6.8.0.jar!/:6.8.0]
at org.flowable.engine.impl.interceptor.CommandInvoker.executeOperations(CommandInvoker.java:114) ~[flowable-engine-6.8.0.jar!/:6.8.0]
at org.flowable.engine.impl.interceptor.CommandInvoker.execute(CommandInvoker.java:72) ~[flowable-engine-6.8.0.jar!/:6.8.0]
at org.flowable.engine.impl.interceptor.BpmnOverrideContextInterceptor.execute(BpmnOverrideContextInterceptor.java:26) ~[flowable-engine-6.8.0.jar!/:6.8.0]
at org.flowable.common.engine.impl.interceptor.TransactionContextInterceptor.execute(TransactionContextInterceptor.java:53) ~[flowable-engine-common-6.8.0.jar!/:6.8.0]
at org.flowable.common.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:105) ~[flowable-engine-common-6.8.0.jar!/:6.8.0]
at org.flowable.common.spring.SpringTransactionInterceptor.lambda$execute$0(SpringTransactionInterceptor.java:57) [flowable-spring-common-6.8.0.jar!/:6.8.0]
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140) ~[spring-tx-5.3.24.jar!/:5.3.24]
at org.flowable.common.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:57) [flowable-spring-common-6.8.0.jar!/:6.8.0]

@filiphr Did you get a chance check on this?

The null pointer seems to be coming due to the executor service being null. How are you creating the engine? Can you please share a minimal reproducible project?

@Venkata / @filiphr Any update on this issue. When we try to upgrade from 6.7.0 to 6.8.0 same issue appears.

@balajisundarajan8 there are some open questions from me see Flowable dynamic value in http task not working 6.8.0 - #7 by filiphr.

If you provide those details I might be able to help more

Can you please check below code snippet @filiphr . will this help …

Hi @filiphr when i change parallelInSameTransaction to false http task is invoking. Any suggestion ?

Hi @filiphr can you share any sample for this scenario Add dedicated task executor for the task invoker. This is fixing an issue with a potential deadlock when using the “true parallel” HTTP task feature

The stacktrace you shared is not related to this deadlock.

The code you shared isn’t helping much. Are you using our Spring Boot Starters or you are creating your own ProcessEngineConfiguration bean?

@filiphr we are using Default ProcessEngineConfiguration
<serviceTask id=“sendmailrecipient” name=“assignment” flowable:parallelInSameTransaction=“true” flowable:type=“http”>. when we change this highlighted flag to false it is working in 6.8.0, if it is true then fails.

Do we need to provide any custom logic ?

Same issue mentioned here HTTP task execute parallel in same transaction not working in 6.8.0

What does this mean? Are you using our Spring Boot starters or not? How does your maven / gradle config look like?

That change is only hiding the original problem, the fact that your engine configuration looks like isn’t properly configured, or you are starting a process before the entire engine has been fully booted up.

I’m not affiliated with balajisundarajan8 so not answering the question for him.

I have the same issue (6.8.0) and created a reproducable scenario with the flowable docker image for 6.8 on dockerhub. See this topic: HTTP task execute parallel in same transaction not working in 6.8.0 - #4 by CElbersen
If I’m not mistaken that image uses spring boot.

I’ve also tested this with an image running longer than 1 hour.

I did not yet try it with 6.8.1.

@filiphr yes we are using Spring Boot and flowable app deployed to PCF instance. Starting the process, after flowable app up & running in CF.

Hey @CElbersen and @balajisundarajan8,

I’m happy to say that we found the root cause for this issue and this has been fixed with Make sure DefaultAsyncTaskExecutor is started · flowable/flowable-engine@03d8680 · GitHub.

Cheers,
Filip

1 Like