Workflow nao respeita Mecanismo de atribuição customizado

Prezados, boa tarde.

Tenho um workflow, conforme imagem abaixo, que no processo "Aprovar contrato" possui um mercanismo de atribuição customizado "ma_aprovacao_contrato.js".

wk.png

o código do mecanismo é simples, é esse:


function resolve(process,colleague){
    log.info("ma_aprovacao_contrato: INIT");

    var userList =  new java.util.ArrayList();
    userList.add("rodrigo.mostaert"); // "rodrigo.mostaert" é a matricula do usuário
    log.info("retornou otto");
    return userList;
}

Ao startar o processo (através do RM), o responsável pelo fluxo é o mesmo do solicitante.

Consulta do processo iniciado

wk_99.png

o solicitante é o Wellington, mas, o responsável (que está igual ao solicitante) deveria ser o "rodrigo.mostaert" conforme o mecanismo de atribuição.

Analisando o log não encontrei nada que pudesse me orientar sobre o "problema".


13:21:46,754 INFO  [com.totvs.technology.ecm.workflow.ws.WorkflowEngineService] (default task-22) Inicialização do startProcess() iniciado...
13:21:47,334 INFO  [com.datasul.technology.webdesk.workflow.business.ProcessStateBO] (default task-22) getInitialProcessState - Atividades encontradas: 1
13:21:47,343 INFO  [com.datasul.technology.webdesk.workflow.business.WorkflowBO] (default task-22) Iniciando o processo 'prj_aprovacao_contrato' ativ destino '21' usuario 'mekwoerg6hc059k11405033970522' empresa '1'
[33m13:21:47,444 WARN  [com.datasul.technology.webdesk.workflow.engine.WorkflowEngine] (default task-22) Não existe nenhum anexo definido como principal.
[33m[33m13:21:47,444 WARN  [com.datasul.technology.webdesk.workflow.engine.WorkflowEngine] (default task-22) Não existe nenhum anexo definido como principal.
[33m13:21:47,444 INFO  [com.datasul.technology.webdesk.workflow.business.WorkflowBO] (default task-22) # Saving card. Process: prj_aprovacao_contrato, Instance: 99, Sequence: 21, Dados: {WKCardUpdTimestamp=1500913307369, codcoligada=1, idcnt=336, idprj=7} 
13:21:47,477 INFO  [com.datasul.technology.webdesk.customization.ScriptingLog] (default task-22) ma_aprovacao_contrato: INIT
13:21:47,484 INFO  [com.datasul.technology.webdesk.customization.ScriptingLog] (default task-22) retornou otto
13:21:47,564 INFO  [com.datasul.technology.webdesk.customization.ScriptingLog] (default task-22) ma_aprovacao_contrato: INIT
13:21:47,572 INFO  [com.datasul.technology.webdesk.customization.ScriptingLog] (default task-22) retornou otto
13:21:47,670 INFO  [com.totvs.technology.ecm.workflow.ws.WorkflowEngineService] (default task-22) startProcess() finalizado. Solicitação: 99
[33m13:21:47,672 WARN  [org.apache.activemq.artemis.core.client] (EJB ASYNC - 1907) AMQ212051: Invalid concurrent session usage. Sessions are not supposed to be used by more than one thread concurrently.: java.lang.Exception: trace
[33m    at org.apache.activemq.artemis.core.client.impl.ClientSessionImpl.startCall(ClientSessionImpl.java:1031)
[33m    at org.apache.activemq.artemis.core.client.impl.ClientProducerImpl.doSend(ClientProducerImpl.java:203)
[33m    at org.apache.activemq.artemis.core.client.impl.ClientProducerImpl.send(ClientProducerImpl.java:122)
[33m    at org.apache.activemq.artemis.jms.client.ActiveMQMessageProducer.doSendx(ActiveMQMessageProducer.java:477)
[33m    at org.apache.activemq.artemis.jms.client.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:173)
[33m    at com.datasul.technology.webdesk.forms.business.DocumentTransferHandler.dispatchAsyncMessage(DocumentTransferHandler.java:91)
[33m    at com.datasul.technology.webdesk.forms.business.DocumentTransferHandler.afterCommit(DocumentTransferHandler.java:47)
[33m    at sun.reflect.GeneratedMethodAccessor1237.invoke(Unknown Source)
[33m    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[33m    at java.lang.reflect.Method.invoke(Method.java:498)
[33m    at org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52)
[33m    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
[33m    at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:437)
[33m    at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:82)
[33m    at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:93)
[33m    at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)
[33m    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
[33m    at org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43)
[33m    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
[33m    at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:437)
[33m    at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:73)
[33m    at org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:83)
[33m    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
[33m    at org.jboss.as.ee.concurrent.ConcurrentContextInterceptor.processInvocation(ConcurrentContextInterceptor.java:45)
[33m    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
[33m    at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21)
[33m    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
[33m    at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
[33m    at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:52)
[33m    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
[33m    at org.jboss.as.ejb3.component.singleton.SingletonComponentInstanceAssociationInterceptor.processInvocation(SingletonComponentInstanceAssociationInterceptor.java:53)
[33m    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
[33m    at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:275)
[33m    at org.jboss.as.ejb3.tx.CMTTxInterceptor.requiresNew(CMTTxInterceptor.java:349)
[33m    at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:241)
[33m    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
[33m    at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)
[33m    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
[33m    at org.jboss.as.ejb3.component.invocationmetrics.WaitTimeInterceptor.processInvocation(WaitTimeInterceptor.java:47)
[33m    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
[33m    at org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:100)
[33m    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
[33m    at org.jboss.as.ejb3.deployment.processors.StartupAwaitInterceptor.processInvocation(StartupAwaitInterceptor.java:22)
[33m    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
[33m    at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:437)
[33m    at org.jboss.as.ejb3.concurrency.ContainerManagedConcurrencyInterceptor.processInvocation(ContainerManagedConcurrencyInterceptor.java:110)
[33m    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
[33m    at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64)
[33m    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
[33m    at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:67)
[33m    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
[33m    at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)
[33m    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
[33m    at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:54)
[33m    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
[33m    at org.jboss.invocation.ContextClassLoaderInterceptor.processInvocation(ContextClassLoaderInterceptor.java:64)
[33m    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
[33m    at org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:356)
[33m    at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:636)
[33m    at org.jboss.invocation.AccessCheckingInterceptor.processInvocation(AccessCheckingInterceptor.java:61)
[33m    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
[33m    at org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:356)
[33m    at org.jboss.invocation.PrivilegedWithCombinerInterceptor.processInvocation(PrivilegedWithCombinerInterceptor.java:80)
[33m    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
[33m    at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
[33m    at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:198)
[33m    at org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:185)
[33m    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
[33m    at org.jboss.as.ejb3.component.interceptors.LogDiagnosticContextRecoveryInterceptor.processInvocation(LogDiagnosticContextRecoveryInterceptor.java:82)
[33m    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
[33m    at org.jboss.as.ejb3.component.interceptors.AsyncFutureInterceptorFactory$1$2.runInvocation(AsyncFutureInterceptorFactory.java:104)
[33m    at org.jboss.as.ejb3.component.interceptors.AsyncInvocationTask.run(AsyncInvocationTask.java:74)
[33m    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[33m    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[33m    at java.lang.Thread.run(Thread.java:745)
[33m    at org.jboss.threads.JBossThread.run(JBossThread.java:320)
[33m
[33m[33m13:21:47,682 WARN  [com.fluig.ecm.async.notification.bpm.notifier.BPMNotifier] (Thread-0 (ActiveMQ-client-global-threads-2011110104)) Não notifica responsável. Solicitação - 99

Alguém saberia indicar o problema?

compartilhar
  • O usuário"mekwoerg6hc059k11405033970522" é a matricula do Wellington, que é o responsável por startar o processo no RM->Fluig

    Otto Mostaert   24 de Jul de 2017
  • Qual versão do fluig você está usando?

    Carlos Moura   25 de Jul de 2017
  • Versão: fluig 1.6.1 120

    Otto Mostaert   25 de Jul de 2017
  • Porque o usuário Wellington tem a matricula nesse padrão: "mekwoerg6hc059k11405033970522" e o usuário rodrigo está com o padrão "rodrigo.mostaert"?

    Carlos Moura   25 de Jul de 2017
  • quando eu cadastrei meu usuário coloquei minha matricula (rodrigo.mostaert) fora do padrão. Se a matricula não existisse daria erro no mecanismo de atribuição (vide log), ja testei isso tb.

    Otto Mostaert   25 de Jul de 2017
Mostrar todos os 10 comentários>
  1. Você vai ver essas setas em qualquer página de pergunta. Com elas, você pode dizer se uma pergunta ou uma resposta foram relevantes ou não.
  2. Edite sua pergunta ou resposta caso queira alterar ou adicionar detalhes.
  3. Caso haja alguma dúvida sobre a pergunta, adicione um comentário. O espaço de respostas deve ser utilizado apenas para responder a pergunta.
  4. Se o autor da pergunta marcar uma resposta como solucionada, esta marca aparecerá.
  5. Clique aqui para mais detalhes sobre o funcionamento do fluig Forum!

2 respostas

Não é a resposta que estava procurando? Procure outras perguntas com as tags workflow mecanismo atribuicao ou faça a sua própria pergunta.