Skip to content

AAE-54434 Custom timeout for orphaned connectors service tasks - #2818

Open
jesty wants to merge 6 commits into
developfrom
feature/AAE-54434-custom-connector-type-timeout
Open

jesty wants to merge 6 commits into
developfrom
feature/AAE-54434-custom-connector-type-timeout

Conversation

@jesty

@jesty jesty commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

This PR Aims to introduce a custom timeout depending on the connector type.
This is required because Agents are long running services that can requires more than 180 minutes to complete when there is a human intervantion in the middle that could not happen suddenly.
In runtime bundle we can configure a thresholds for a specific connector like below:

activiti.orphaned-integration-recovery.connector-thresholds[agenticTaskConnector]=-1

Where agenticTaskConnector is the connector name.

After merging this PR we have to merge https://github.com/Alfresco/hxp-process-services/pull/6376/ to actually enable it.

@CLAassistant

CLAassistant commented Oct 30, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

playswag — API Coverage Report

Dimension Covered Total %
Endpoints 135 140 🟢 96.4%
Status Codes 212 937 🔴 22.6%
Parameters 136 688 🔴 19.8%
Body Properties 127 668 🔴 19.0%
Response Properties 1210 3549 🔴 34.1%

Coverage by Tag

Tag Endpoints Status Codes Parameters Body Props Resp Props
task-controller-impl 🟢 100.0% 🔴 17.7% 🟡 56.3% 🟡 60.6% 🔴 40.4%
task-variable-controller-impl 🟢 100.0% 🔴 12.5% 🟢 100.0% 🟢 80.0% 🔴 4.8%
process-instance-controller-impl 🟢 100.0% 🔴 17.0% 🟡 57.1% 🔴 45.2% 🔴 42.0%
process-instance-variable-controller-impl 🟢 100.0% 🔴 12.5% 🟢 100.0% 🟡 50.0% 🔴 6.7%
task-admin-controller-impl 🟢 100.0% 🔴 12.5% 🟡 62.5% 🟡 57.1% 🔴 31.3%
task-variable-admin-controller-impl 🟢 100.0% 🔴 12.5% 🟢 100.0% 🟢 80.0% 🔴 4.8%
process-instance-admin-controller-impl 🟢 100.0% 🔴 13.6% 🟡 57.1% 🔴 39.1% 🔴 40.2%
process-instance-variable-admin-controller-impl 🟢 100.0% 🔴 12.5% 🟢 100.0% 🟡 50.0% 🔴 4.8%
candidate-user-controller-impl 🟢 100.0% 🔴 12.5% 🟢 100.0% 🟡 75.0% 🔴 4.8%
candidate-group-controller-impl 🟢 100.0% 🔴 12.5% 🟢 100.0% 🟡 75.0% 🔴 4.8%
candidate-user-admin-controller-impl 🟢 100.0% 🔴 12.5% 🟢 100.0% 🟡 75.0% 🔴 4.8%
candidate-group-admin-controller-impl 🟢 100.0% 🔴 12.5% 🟢 100.0% 🟡 75.0% 🔴 4.8%
service-task-admin-controller-impl 🟢 100.0% 🔴 12.5% 🟢 100.0% 🟢 100.0% 🔴 0.0%
home-controller-impl 🟢 100.0% 🔴 12.5% 🟢 100.0% 🟢 100.0% 🔴 10.0%
process-instance-tasks-controller-impl 🟢 100.0% 🔴 12.5% 🔴 25.0% 🟢 100.0% 🔴 33.3%
process-definition-controller-impl 🟢 100.0% 🔴 12.5% 🟡 50.0% 🟢 100.0% 🔴 18.6%
process-definition-meta-controller-impl 🟢 100.0% 🔴 12.5% 🟢 100.0% 🟢 100.0% 🔴 0.0%
connector-definition-controller-impl 🟢 100.0% 🔴 12.5% 🟢 100.0% 🟢 100.0% 🔴 16.0%
process-definition-admin-controller-impl 🟢 100.0% 🔴 12.5% 🔴 0.0% 🟢 100.0% 🔴 33.3%
task-controller 🟢 100.0% 🟡 60.0% 🔴 25.0% 🔴 6.8% 🔴 45.8%
process-instance-controller 🟢 100.0% 🟡 60.0% 🔴 10.4% 🔴 5.6% 🟡 54.1%
count-controller 🔴 0.0% 🔴 0.0% 🟢 100.0% 🔴 0.0% 🔴 0.0%
task-admin-controller 🟢 100.0% 🟡 62.9% 🔴 13.7% 🔴 8.8% 🔴 44.9%
task-delete-controller 🟢 100.0% 🔴 20.0% 🔴 0.0% 🟢 100.0% 🔴 16.7%
process-instance-admin-controller 🟢 100.0% 🔴 45.0% 🔴 8.2% 🔴 2.8% 🔴 47.6%
process-instance-delete-controller 🟢 100.0% 🔴 20.0% 🔴 0.0% 🟢 100.0% 🔴 16.7%
count-admin-controller 🔴 0.0% 🔴 0.0% 🟢 100.0% 🔴 0.0% 🔴 0.0%
task-variable-controller 🟢 100.0% 🔴 20.0% 🔴 14.3% 🟢 100.0% 🟡 50.0%
process-instance-variable-controller 🟢 100.0% 🔴 20.0% 🔴 11.1% 🟢 100.0% 🟡 50.0%
process-instance-tasks-controller 🟢 100.0% 🔴 20.0% 🔴 20.0% 🟢 100.0% 🟡 50.0%
process-instance-diagram-controller 🟢 100.0% 🔴 20.0% 🟢 100.0% 🟢 100.0% 🔴 0.0%
process-definition-controller 🟢 100.0% 🔴 20.0% 🔴 0.0% 🟢 100.0% 🟡 50.0%
process-model-controller 🟢 100.0% 🔴 20.0% 🟢 100.0% 🟢 100.0% 🔴 0.0%
application-controller 🟢 100.0% 🔴 20.0% 🔴 0.0% 🟢 100.0% 🟡 50.0%
task-variable-admin-controller 🟢 100.0% 🟡 60.0% 🔴 14.3% 🟢 100.0% 🟡 50.0%
service-task-admin-controller 🟢 100.0% 🔴 20.0% 🔴 10.0% 🟢 100.0% 🟡 57.1%
service-task-integration-context-admin-controller 🟢 100.0% 🔴 20.0% 🔴 40.0% 🟢 100.0% 🔴 49.2%
process-instance-variable-admin-controller 🟢 100.0% 🔴 40.0% 🔴 11.1% 🟢 100.0% 🟡 50.0%
process-instance-tasks-admin-controller 🟢 100.0% 🔴 20.0% 🔴 25.0% 🟢 100.0% 🟡 50.0%
process-instance-service-tasks-admin-controller 🟢 100.0% 🔴 20.0% 🔴 10.0% 🟢 100.0% 🟡 50.0%
process-instance-sequence-flows-admin-controller 🟢 100.0% 🔴 40.0% 🔴 5.3% 🟢 100.0% 🟡 50.0%
process-instance-diagram-admin-controller 🟢 100.0% 🔴 40.0% 🟢 100.0% 🟢 100.0% 🔴 0.0%
process-instance-bpmn-activities-admin-controller 🟢 100.0% 🔴 20.0% 🔴 25.0% 🟢 100.0% 🟡 50.0%
process-definition-admin-controller 🟢 100.0% 🔴 20.0% 🔴 0.0% 🟢 100.0% 🟡 50.0%
process-model-admin-controller 🟢 100.0% 🔴 20.0% 🟢 100.0% 🟢 100.0% 🔴 0.0%
integration-context-admin-controller 🟢 100.0% 🟡 60.0% 🟢 100.0% 🟢 100.0% 🟡 55.3%
application-admin-controller 🟢 100.0% 🟡 60.0% 🔴 0.0% 🟢 100.0% 🟡 50.0%
audit-events-controller-v-2-impl 🔴 0.0% 🔴 0.0% 🔴 0.0% 🟢 100.0% 🔴 0.0%
audit-events-controller-impl 🟢 100.0% 🟡 50.0% 🟢 80.0% 🟢 100.0% 🟡 67.3%
audit-events-admin-controller-v-2-impl 🔴 0.0% 🔴 0.0% 🔴 0.0% 🟢 100.0% 🔴 0.0%
audit-events-admin-controller-impl 🟢 100.0% 🟡 70.0% 🟢 100.0% 🟢 100.0% 🔴 44.4%
audit-events-delete-controller 🟢 100.0% 🔴 20.0% 🟢 100.0% 🟢 100.0% 🔴 0.0%

View workflow run

@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

🐢 Slow Tests Report

🧪 Unit Tests

The following 19 unit test(s) took more than 5 seconds:

Time # Class Test
10.16s 1 org.activiti.services.connectors.IntegrationRequestSenderTest shouldSendExpirationHeaders
9.89s 2 org.activiti.cloud.alfresco.argument.resolver.AlfrescoPageArgumentMethodResolverTest resolveArgumentShouldReturnAPageableBasedOnParsedSkipCountAndMaxItems
8.72s 3 org.activiti.services.connectors.behavior.MQServiceTaskBehaviorTest executeShouldDelegateToDefaultBehaviourWhenBeanIsAvailable
7.33s 4 org.activiti.cloud.services.events.services.IncidentServiceTest shouldCreateAndSendExecutionContextIncidentEvent
7.26s 5 org.activiti.cloud.common.messaging.config.ConnectorGracefulShutdownLifecycleTest shouldBeRunningAfterStart
6.95s 6 org.activiti.cloud.common.messaging.config.ErrorHandlerDefinitionMessageRecovererTest shouldFindCauseAccurately(String, Throwable, Class, Optional)[1]
6.84s 7 org.activiti.cloud.common.messaging.config.ConnectorOutputBindingEnvironmentPostProcessorTest should_appendToExistingOutputBindings_withoutDuplicating
6.22s 8 org.activiti.cloud.security.authorization.AuthorizationConfigurerTest should_configureAuth_usingPermissions_when_everythingIsAuthenticated
6.10s 9 org.activiti.services.connectors.channel.AggregateIntegrationErrorReceivedEventCmdTest should_aggregateIntegrationErrorReceivedEvent_when_auditEventAreEnabled
6.08s 10 org.activiti.services.connectors.recovery.OrphanedIntegrationThresholdResolverTest should_returnEmpty_when_bpmnModelIsNotFound
5.99s 11 org.activit.cloud.services.metadata.test.MetadataServiceTest shouldGetMetaData
5.93s 12 org.activiti.cloud.alfresco.argument.resolver.AlfrescoPageRequestParameterParserTest parseMaxItemsShouldReturnDefaultPageSizeWhenMaxItemsIsNotSet
5.81s 13 org.activiti.cloud.services.events.converter.ProcessAuditServiceInfoAppenderTest should_setAndGetActor_when_identityLinkTypeIsActor
5.67s 14 org.activiti.cloud.api.process.model.impl.events.IntegrationRequestImplTest copyWithLightweightContext_should_copyAllRoutingMetadata
5.42s 15 org.activiti.cloud.alfresco.converter.json.AlfrescoJacksonHttpMessageConverterTest canWriteShouldFalseWhenTypeIsString
5.26s 16 org.activiti.cloud.api.process.model.impl.events.ConnectorIncidentEventTest should_beEqual_whenSameFields
5.25s 17 org.activiti.cloud.api.process.model.impl.IntegrationErrorImplTest should_fallbackToDetailedErrorMessage_when_customMessageIsNullOrBlank(String)[1]
5.21s 18 org.activiti.cloud.services.events.converter.ToCloudProcessRuntimeErrorEventsConverterTest shouldConvertBPMNErrorReceivedEventToCloudBPMNErrorReceivedEvent
5.21s 19 org.activiti.cloud.services.events.converter.TaskAuditServiceInfoAppenderTest should_setAndGetActor_when_userHasNameSet

🔗 Integration Tests

The following 2 integration test(s) took more than 5 seconds:

Time # Class Test
10.01s 1 org.activiti.cloud.examples.connectors.HeadersConnectorIT headersConnectorShouldNotSendIntegrationResult
6.50s 2 org.activiti.cloud.common.swagger.apidocs.SpringdocApiDocsIT should_generateSpringdocApiDocs

📊 Full Slow Test Report

@sonarqubecloud

sonarqubecloud Bot commented Nov 4, 2026

Copy link
Copy Markdown

import tools.jackson.databind.json.JsonMapper;

/**
* Resolves the connector template (e.g. {@code agenticTaskConnector}) of a service task.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't mention agenticTaskConnector here explicitly as it's not known for this repo.

}

/**
* Process definition ids have the form {@code <key>:<version>:<id>}.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When key:version:uuid would be longer than 64 characters, the engine drops the prefix and the process definition ID is just the generated ID, with no key or version in it.
See in Activiti/activiti-core/activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/deployer/BpmnDeployer.java:284
Please check if this is an issue. We've had such cases in the past.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants