1 Reply Latest reply on Oct 23, 2013 10:02 PM by Brian Wallis

    FormProviderService (jbpm6)

    Brian Wallis Master

      Should I be able to inject the FormProviderService?

          @Inject
          private FormProviderService formProviderService;
      

       

      so I can use the form rendering functions

          String getFormDisplayTask(long taskId);
          String getFormDisplayProcess(String deploymentId, String processId);
      

       

      When I include the injection I get an error. It looks like something might be missing (a dependency?)

       

      Caused by: org.jboss.weld.exceptions.WeldException: WELD-000049 Unable to invoke [method] @PostConstruct public org.jbpm.kie.services.impl.form.FormProviderServiceImpl.prepare() on org.jbpm.kie.services.impl.form.FormProviderServiceImpl@4bc711a9
        at org.jboss.weld.bean.AbstractClassBean.defaultPostConstruct(AbstractClassBean.java:404) [weld-core-1.1.13.Final-redhat-1.jar:1.1.13.Final-redhat-1]
        at org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget.postConstruct(ManagedBean.java:178) [weld-core-1.1.13.Final-redhat-1.jar:1.1.13.Final-redhat-1]
        at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:298) [weld-core-1.1.13.Final-redhat-1.jar:1.1.13.Final-redhat-1]
        at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:101) [weld-core-1.1.13.Final-redhat-1.jar:1.1.13.Final-redhat-1]
        at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:90) [weld-core-1.1.13.Final-redhat-1.jar:1.1.13.Final-redhat-1]
        at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:79) [weld-core-1.1.13.Final-redhat-1.jar:1.1.13.Final-redhat-1]
        at org.jbpm.kie.services.impl.form.FormProviderServiceImpl$Proxy$_$$_WeldClientProxy.getFormDisplayProcess(FormProviderServiceImpl$Proxy$_$$_WeldClientProxy.java) [jbpm-kie-services-6.0.0.CR5.jar:6.0.0.CR5]
        at au.com.infomedix.simpleflow.Workflow.getForm(Workflow.java:291) [classes:]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_17]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_17]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_17]
        at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_17]
        at org.jboss.as.ee.component.ManagedReferenceMethodInterceptorFactory$ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptorFactory.java:72) [jboss-as-ee-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
        at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
        at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:58) [jboss-as-ee-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
        at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:374) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
        at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:129) [jboss-as-weld-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
        at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:137) [jboss-as-weld-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
        at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:58) [jboss-as-ee-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
        at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
        at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:58) [jboss-as-ee-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
        at org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
        at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47) [jboss-as-jpa-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
        at org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:74) [jboss-as-weld-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
        at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
        at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
        at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:53) [jboss-as-ee-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
        at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:51) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
        at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInCallerTx(CMTTxInterceptor.java:226) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
        ... 58 more
      Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_17]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_17]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_17]
        at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_17]
        at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:267) [weld-core-1.1.13.Final-redhat-1.jar:1.1.13.Final-redhat-1]
        at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52) [weld-core-1.1.13.Final-redhat-1.jar:1.1.13.Final-redhat-1]
        at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:137) [weld-core-1.1.13.Final-redhat-1.jar:1.1.13.Final-redhat-1]
        at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:263) [weld-core-1.1.13.Final-redhat-1.jar:1.1.13.Final-redhat-1]
        at org.jboss.weld.introspector.jlr.WeldMethodImpl.invoke(WeldMethodImpl.java:174) [weld-core-1.1.13.Final-redhat-1.jar:1.1.13.Final-redhat-1]
        at org.jboss.weld.bean.AbstractClassBean.defaultPostConstruct(AbstractClassBean.java:402) [weld-core-1.1.13.Final-redhat-1.jar:1.1.13.Final-redhat-1]
        ... 96 more
      Caused by: org.jboss.weld.exceptions.WeldException: WELD-000049 Unable to invoke [method] @PostConstruct public org.jbpm.shared.services.impl.VFSFileServiceImpl.init() on org.jbpm.shared.services.impl.VFSFileServiceImpl@23bf43f0
        at org.jboss.weld.bean.AbstractClassBean.defaultPostConstruct(AbstractClassBean.java:404) [weld-core-1.1.13.Final-redhat-1.jar:1.1.13.Final-redhat-1]
        at org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget.postConstruct(ManagedBean.java:178) [weld-core-1.1.13.Final-redhat-1.jar:1.1.13.Final-redhat-1]
        at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:298) [weld-core-1.1.13.Final-redhat-1.jar:1.1.13.Final-redhat-1]
        at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:101) [weld-core-1.1.13.Final-redhat-1.jar:1.1.13.Final-redhat-1]
        at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:608) [weld-core-1.1.13.Final-redhat-1.jar:1.1.13.Final-redhat-1]
        at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:674) [weld-core-1.1.13.Final-redhat-1.jar:1.1.13.Final-redhat-1]
        at org.jboss.weld.injection.FieldInjectionPoint.inject(FieldInjectionPoint.java:134) [weld-core-1.1.13.Final-redhat-1.jar:1.1.13.Final-redhat-1]
        at org.jboss.weld.util.Beans.injectBoundFields(Beans.java:763) [weld-core-1.1.13.Final-redhat-1.jar:1.1.13.Final-redhat-1]
        at org.jboss.weld.util.Beans.injectFieldsAndInitializers(Beans.java:772) [weld-core-1.1.13.Final-redhat-1.jar:1.1.13.Final-redhat-1]
        at org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget$1$1.proceed(ManagedBean.java:165) [weld-core-1.1.13.Final-redhat-1.jar:1.1.13.Final-redhat-1]
        at org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:48) [weld-core-1.1.13.Final-redhat-1.jar:1.1.13.Final-redhat-1]
        at org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget$1.work(ManagedBean.java:161) [weld-core-1.1.13.Final-redhat-1.jar:1.1.13.Final-redhat-1]
        at org.jboss.weld.bean.ManagedBean$FixInjectionPoint.run(ManagedBean.java:135) [weld-core-1.1.13.Final-redhat-1.jar:1.1.13.Final-redhat-1]
        at org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget.inject(ManagedBean.java:157) [weld-core-1.1.13.Final-redhat-1.jar:1.1.13.Final-redhat-1]
        at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:297) [weld-core-1.1.13.Final-redhat-1.jar:1.1.13.Final-redhat-1]
        at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:101) [weld-core-1.1.13.Final-redhat-1.jar:1.1.13.Final-redhat-1]
        at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:90) [weld-core-1.1.13.Final-redhat-1.jar:1.1.13.Final-redhat-1]
        at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:79) [weld-core-1.1.13.Final-redhat-1.jar:1.1.13.Final-redhat-1]
        at org.jbpm.kie.services.impl.form.provider.VFSFormProvider$Proxy$_$$_WeldClientProxy.getPriority(VFSFormProvider$Proxy$_$$_WeldClientProxy.java) [jbpm-kie-services-6.0.0.CR5.jar:6.0.0.CR5]
        at org.jbpm.kie.services.impl.form.FormProviderServiceImpl$1.compare(FormProviderServiceImpl.java:78) [jbpm-kie-services-6.0.0.CR5.jar:6.0.0.CR5]
        at org.jbpm.kie.services.impl.form.FormProviderServiceImpl$1.compare(FormProviderServiceImpl.java:74) [jbpm-kie-services-6.0.0.CR5.jar:6.0.0.CR5]
        at java.util.TreeMap.compare(TreeMap.java:1188) [rt.jar:1.7.0_17]
        at java.util.TreeMap.put(TreeMap.java:531) [rt.jar:1.7.0_17]
        at java.util.TreeSet.add(TreeSet.java:255) [rt.jar:1.7.0_17]
        at org.jbpm.kie.services.impl.form.FormProviderServiceImpl.prepare(FormProviderServiceImpl.java:82) [jbpm-kie-services-6.0.0.CR5.jar:6.0.0.CR5]
        ... 106 more
      Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_17]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_17]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_17]
        at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_17]
        at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:267) [weld-core-1.1.13.Final-redhat-1.jar:1.1.13.Final-redhat-1]
        at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52) [weld-core-1.1.13.Final-redhat-1.jar:1.1.13.Final-redhat-1]
        at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:137) [weld-core-1.1.13.Final-redhat-1.jar:1.1.13.Final-redhat-1]
        at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:263) [weld-core-1.1.13.Final-redhat-1.jar:1.1.13.Final-redhat-1]
        at org.jboss.weld.introspector.jlr.WeldMethodImpl.invoke(WeldMethodImpl.java:174) [weld-core-1.1.13.Final-redhat-1.jar:1.1.13.Final-redhat-1]
        at org.jboss.weld.bean.AbstractClassBean.defaultPostConstruct(AbstractClassBean.java:402) [weld-core-1.1.13.Final-redhat-1.jar:1.1.13.Final-redhat-1]
        ... 130 more
      Caused by: org.jboss.weld.exceptions.UnsatisfiedResolutionException: WELD-001308 Unable to resolve any beans for Types: [interface org.kie.commons.io.IOService]; Bindings: [QualifierInstance{annotationClass=interface javax.inject.Named, values={[method] public abstract javax.inject.Named.value()=ioStrategy}, hashCode=1424329034}]
        at org.jboss.weld.manager.BeanManagerImpl.getBean(BeanManagerImpl.java:699) [weld-core-1.1.13.Final-redhat-1.jar:1.1.13.Final-redhat-1]
        at org.jboss.weld.bean.builtin.InstanceImpl.get(InstanceImpl.java:101) [weld-core-1.1.13.Final-redhat-1.jar:1.1.13.Final-redhat-1]
        at org.jbpm.shared.services.impl.VFSFileServiceImpl.getIOService(VFSFileServiceImpl.java:155) [jbpm-shared-services-6.0.0.CR5.jar:6.0.0.CR5]
        at org.jbpm.shared.services.impl.VFSFileServiceImpl.fetchChanges(VFSFileServiceImpl.java:54) [jbpm-shared-services-6.0.0.CR5.jar:6.0.0.CR5]
        at org.jbpm.shared.services.impl.VFSFileServiceImpl.init(VFSFileServiceImpl.java:50) [jbpm-shared-services-6.0.0.CR5.jar:6.0.0.CR5]
        ... 140 more
      
        • 1. Re: FormProviderService (jbpm6)
          Brian Wallis Master

          To answer my own question, I needed to define a producer for an IOService instance named ioStrategy like so

           

          @ApplicationScoped
          public class Producer
          {
          // ...
              private final IOService         ioService         = new IOServiceDotFileImpl();
          
              @Produces
              @Named("ioStrategy")
              public IOService ioService() {
                  return ioService;
              }
          
            // ...
          }
          

           

          and that seems to have done the trick for me. Not exactly sure what it does but now I can render a process or task form using the FormProviderService.