# Executing Service Task from UI

**URL:** <https://forum.flowable.org/t/executing-service-task-from-ui/4350>\
**Category:** Flowable Engine\
**Created:** [August 12, 2019, 5:36pm UTC](https://forum.flowable.org/t/executing-service-task-from-ui/4350 "2019-08-12T17:36:44Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![awk123123](https://avatars.discourse-cdn.com/v4/letter/a/a5b964/32.png) [@awk123123](https://forum.flowable.org/u/awk123123)\
**Post date:** [December 16, 2020, 1:26pm UTC](https://forum.flowable.org/t/executing-service-task-from-ui/4350/7 "2020-12-16T13:26:47Z")

</div>

Hi @wwitt, I refer to your github project but I faced a problem when delegate task needs to @Autowired some service. May you please advise?

The setting of DemoConfiguration is same.

Error

> ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘testDelegate’: Unsatisfied dependency expressed through field ‘TestService’; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type ‘com.fifteenminuteflowable.demo.service.TestService’ available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}

> \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
> APPLICATION FAILED TO START  
> \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
> Description:  
> Field testService in com.fifteenminuteflowable.demo.delegates.TestDelegate required a bean of type ‘com.fifteenminuteflowable.demo.service.TestService’ that could not be found.  
> The injection point has the following annotations:  
> - @org.springframework.beans.factory.annotation.Autowired(required=true)  
>   
> Action:  
>   
> Consider defining a bean of type ‘com.fifteenminuteflowable.demo.service.TestService’ in your configuration.

TestDelegate

```
package com.fifteenminuteflowable.demo.delegates;

@Component
public class TestDelegate implements JavaDelegate {
    @Autowired
    TestService testService;

    @Override
    public void execute(DelegateExecution delegateExecution) {
       testService.call();
    }
}

```

---

_[View the full topic](https://forum.flowable.org/t/executing-service-task-from-ui/4350)._
