[jboss-user] [jBPM] - Failure in ignaling a state in a process which has timer

Soheil Dowlatshahi do-not-reply at jboss.com
Sun Jul 18 06:38:50 EDT 2010


Soheil Dowlatshahi [http://community.jboss.org/people/soheildowlatshahi] replied to the discussion

"Failure in ignaling a state in a process which has timer"

To view the discussion, visit: http://community.jboss.org/message/553192#553192

--------------------------------------------------------------
Dear  http://community.jboss.org/people/swiderski.maciej Maciej Swiderski


I have changed my code as you had suggested alreay and I tried to signal the execution Id of the wait state activity instead of signaling the process itself and it didn't throw any exception. At first it seams that it works but later I have noticied that the no transtion in wait state is traveresed and the state of the process isn't changed.


you can see part of my process definition here:



<state name="*activity.investor.registeration.inquiry.suspend*" >
        <transition name="investor.inquiry.replied" to="activity.investor.registeration.inquiry.evaluate"/>





        <transition name="investor.inquiry.timeout" to="activity.investor.registeration.inquiry.check">
            <timer duedate="50 minutes" />
        </transition>
    </state>


and here is my code for signaling the above mentioned wait state:

processInstance = executionService.findProcessInstanceById(processId);

// it is not null and have a value


                if (processInstance != null) {



                    String executionId = processInstance.findActiveExecutionIn("*activity.investor.registeration.inquiry.suspend*").getId();
          

// the executionId is also not null and have the value.

                    if (executionId != null) {
                        executionService.signalExecutionById(executionId, getProcessVariables(parameters));
                    }
                }



                log.info("signal process state succeed!");

Neither *investor.inquiry.replied* nor *investor.inquiry.timeout* is not called and traversed by the workflow engine and the process remains again at "activity.investor.registeration.inquiry.suspend" state.

I should again notified that if there is not a timer in the wait state , on can signal it by the following code without any problem and it works:

executionService.signalExecutionById(processId, getProcessVariables(parameters));

But if there is timer in the wait state activity (like one that mentioned aboved) the calling of this method causes an exception and the message of due to this error  that the current status of the process is *inactive-scope*.



Thanks
Soheil

--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/553192#553192]

Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100718/2fe6c7ca/attachment.html 


More information about the jboss-user mailing list